OVHCloud v0.45.0 published on Tuesday, Jun 4, 2024 by OVHcloud
ovh.CloudProject.getKubeIpRestrictions
Explore with Pulumi AI
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 "@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
iprestrictions = ovh.CloudProject.get_kube_ip_restrictions(service_name="XXXXXX",
    kube_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx")
pulumi.export("ips", iprestrictions.ips)
package main
import (
	"github.com/ovh/pulumi-ovh/sdk/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.applyValue(getKubeIpRestrictionsResult -> getKubeIpRestrictionsResult.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 GetKubeIpRestrictions(ctx *Context, args *GetKubeIpRestrictionsArgs, opts ...InvokeOption) (*GetKubeIpRestrictionsResult, error)
func GetKubeIpRestrictionsOutput(ctx *Context, args *GetKubeIpRestrictionsOutputArgs, opts ...InvokeOption) GetKubeIpRestrictionsResultOutput> Note: This function is named GetKubeIpRestrictions 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)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: ovh:CloudProject/getKubeIpRestrictions:getKubeIpRestrictions
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Kube
Id string - The id of the managed kubernetes cluster.
 - Service
Name string - The id of the public cloud project. If omitted,
the 
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used. 
- Kube
Id string - The id of the managed kubernetes cluster.
 - Service
Name string - The id of the public cloud project. If omitted,
the 
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used. 
- kube
Id String - The id of the managed kubernetes cluster.
 - service
Name String - The id of the public cloud project. If omitted,
the 
OVH_CLOUD_PROJECT_SERVICEenvironment variable is used. 
- kube
Id string - The id of the managed kubernetes cluster.
 - service
Name string - The id of the public cloud project. If omitted,
the 
OVH_CLOUD_PROJECT_SERVICEenvironment 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_SERVICEenvironment variable is used. 
- kube
Id String - The id of the managed kubernetes cluster.
 - service
Name String - The id of the public cloud project. If omitted,
the 
OVH_CLOUD_PROJECT_SERVICEenvironment 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.
 - Kube
Id string - See Argument Reference above.
 - Service
Name 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.
 - Kube
Id string - See Argument Reference above.
 - Service
Name 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.
 - kube
Id String - See Argument Reference above.
 - service
Name 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.
 - kube
Id string - See Argument Reference above.
 - service
Name 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.
 - kube
Id String - See Argument Reference above.
 - service
Name String - See Argument Reference above.
 
Package Details
- Repository
 - ovh ovh/pulumi-ovh
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
ovhTerraform Provider.