1. Packages
  2. OVH
  3. API Docs
  4. CloudProject
  5. getKubeIpRestrictions
OVHCloud v2.8.0 published on Wednesday, Sep 24, 2025 by OVHcloud

ovh.CloudProject.getKubeIpRestrictions

Start a Neo task
Explain and create an ovh.CloudProject.getKubeIpRestrictions resource
ovh logo
OVHCloud v2.8.0 published on Wednesday, Sep 24, 2025 by OVHcloud

    Use this data source to get a OVHcloud Managed Kubernetes Service cluster IP restrictions.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const ipRestrictions = ovh.CloudProject.getKubeIpRestrictions({
        serviceName: "XXXXXX",
        kubeId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx",
    });
    export const ips = ipRestrictions.then(ipRestrictions => ipRestrictions.ips);
    
    import pulumi
    import pulumi_ovh as ovh
    
    ip_restrictions = ovh.CloudProject.get_kube_ip_restrictions(service_name="XXXXXX",
        kube_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx")
    pulumi.export("ips", ip_restrictions.ips)
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudproject"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ipRestrictions, err := cloudproject.GetKubeIpRestrictions(ctx, &cloudproject.GetKubeIpRestrictionsArgs{
    			ServiceName: "XXXXXX",
    			KubeId:      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("ips", ipRestrictions.Ips)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var ipRestrictions = Ovh.CloudProject.GetKubeIpRestrictions.Invoke(new()
        {
            ServiceName = "XXXXXX",
            KubeId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx",
        });
    
        return new Dictionary<string, object?>
        {
            ["ips"] = ipRestrictions.Apply(getKubeIpRestrictionsResult => getKubeIpRestrictionsResult.Ips),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.CloudProject.CloudProjectFunctions;
    import com.pulumi.ovh.CloudProject.inputs.GetKubeIpRestrictionsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var ipRestrictions = CloudProjectFunctions.getKubeIpRestrictions(GetKubeIpRestrictionsArgs.builder()
                .serviceName("XXXXXX")
                .kubeId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx")
                .build());
    
            ctx.export("ips", ipRestrictions.ips());
        }
    }
    
    variables:
      ipRestrictions:
        fn::invoke:
          function: ovh:CloudProject:getKubeIpRestrictions
          arguments:
            serviceName: XXXXXX
            kubeId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx
    outputs:
      ips: ${ipRestrictions.ips}
    

    Using getKubeIpRestrictions

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getKubeIpRestrictions(args: GetKubeIpRestrictionsArgs, opts?: InvokeOptions): Promise<GetKubeIpRestrictionsResult>
    function getKubeIpRestrictionsOutput(args: GetKubeIpRestrictionsOutputArgs, opts?: InvokeOptions): Output<GetKubeIpRestrictionsResult>
    def get_kube_ip_restrictions(kube_id: Optional[str] = None,
                                 service_name: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetKubeIpRestrictionsResult
    def get_kube_ip_restrictions_output(kube_id: Optional[pulumi.Input[str]] = None,
                                 service_name: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetKubeIpRestrictionsResult]
    func LookupKubeIpRestrictions(ctx *Context, args *LookupKubeIpRestrictionsArgs, opts ...InvokeOption) (*LookupKubeIpRestrictionsResult, error)
    func LookupKubeIpRestrictionsOutput(ctx *Context, args *LookupKubeIpRestrictionsOutputArgs, opts ...InvokeOption) LookupKubeIpRestrictionsResultOutput

    > Note: This function is named LookupKubeIpRestrictions in the Go SDK.

    public static class GetKubeIpRestrictions 
    {
        public static Task<GetKubeIpRestrictionsResult> InvokeAsync(GetKubeIpRestrictionsArgs args, InvokeOptions? opts = null)
        public static Output<GetKubeIpRestrictionsResult> Invoke(GetKubeIpRestrictionsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetKubeIpRestrictionsResult> getKubeIpRestrictions(GetKubeIpRestrictionsArgs args, InvokeOptions options)
    public static Output<GetKubeIpRestrictionsResult> getKubeIpRestrictions(GetKubeIpRestrictionsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ovh:CloudProject/getKubeIpRestrictions:getKubeIpRestrictions
      arguments:
        # arguments dictionary

    The following arguments are supported:

    KubeId string
    The id of the managed kubernetes cluster.
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    KubeId string
    The id of the managed kubernetes cluster.
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    kubeId String
    The id of the managed kubernetes cluster.
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    kubeId string
    The id of the managed kubernetes cluster.
    serviceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    kube_id str
    The id of the managed kubernetes cluster.
    service_name str
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    kubeId String
    The id of the managed kubernetes cluster.
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

    getKubeIpRestrictions Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ips List<string>
    The list of CIDRs that restricts the access to the API server.
    KubeId string
    See Argument Reference above.
    ServiceName string
    See Argument Reference above.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ips []string
    The list of CIDRs that restricts the access to the API server.
    KubeId string
    See Argument Reference above.
    ServiceName string
    See Argument Reference above.
    id String
    The provider-assigned unique ID for this managed resource.
    ips List<String>
    The list of CIDRs that restricts the access to the API server.
    kubeId String
    See Argument Reference above.
    serviceName String
    See Argument Reference above.
    id string
    The provider-assigned unique ID for this managed resource.
    ips string[]
    The list of CIDRs that restricts the access to the API server.
    kubeId string
    See Argument Reference above.
    serviceName string
    See Argument Reference above.
    id str
    The provider-assigned unique ID for this managed resource.
    ips Sequence[str]
    The list of CIDRs that restricts the access to the API server.
    kube_id str
    See Argument Reference above.
    service_name str
    See Argument Reference above.
    id String
    The provider-assigned unique ID for this managed resource.
    ips List<String>
    The list of CIDRs that restricts the access to the API server.
    kubeId String
    See Argument Reference above.
    serviceName String
    See Argument Reference above.

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    OVHCloud v2.8.0 published on Wednesday, Sep 24, 2025 by OVHcloud
      Meet Neo: Your AI Platform Teammate