Ovh

v0.1.0 published on Friday, Nov 4, 2022 by lbrlabs

getKubeIpRestrictions

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

Example Usage

using System.Collections.Generic;
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 main

import (
	"github.com/lbrlabs/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
	})
}
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()));
    }
}
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)
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);
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 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
https://github.com/lbrlabs/pulumi-ovh
License
Apache-2.0
Notes

This Pulumi package is based on the ovh Terraform Provider.