Ovh

v0.0.4 published on Saturday, Sep 17, 2022 by lbrlabs

CloudProjectKubeIpRestrictions

Apply IP restrictions to an OVHcloud Managed Kubernetes cluster.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Ovh = Lbrlabs.PulumiPackage.Ovh;

return await Deployment.RunAsync(() => 
{
    var vrackOnly = new Ovh.CloudProjectKubeIpRestrictions("vrackOnly", new()
    {
        Ips = new[]
        {
            "10.42.0.0/16",
        },
        KubeId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx",
        ServiceName = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    });

});
package main

import (
	"github.com/lbrlabs/pulumi-ovh/sdk/go/ovh"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ovh.NewCloudProjectKubeIpRestrictions(ctx, "vrackOnly", &ovh.CloudProjectKubeIpRestrictionsArgs{
			Ips: pulumi.StringArray{
				pulumi.String("10.42.0.0/16"),
			},
			KubeId:      pulumi.String("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"),
			ServiceName: pulumi.String("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.CloudProjectKubeIpRestrictions;
import com.pulumi.ovh.CloudProjectKubeIpRestrictionsArgs;
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) {
        var vrackOnly = new CloudProjectKubeIpRestrictions("vrackOnly", CloudProjectKubeIpRestrictionsArgs.builder()        
            .ips("10.42.0.0/16")
            .kubeId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx")
            .serviceName("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
            .build());

    }
}
import pulumi
import lbrlabs_pulumi_ovh as ovh

vrack_only = ovh.CloudProjectKubeIpRestrictions("vrackOnly",
    ips=["10.42.0.0/16"],
    kube_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx",
    service_name="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";

const vrackOnly = new ovh.CloudProjectKubeIpRestrictions("vrack_only", {
    ips: ["10.42.0.0/16"],
    kubeId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx",
    serviceName: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
});
resources:
  vrackOnly:
    type: ovh:CloudProjectKubeIpRestrictions
    properties:
      ips:
        - 10.42.0.0/16
      kubeId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx
      serviceName: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Create a CloudProjectKubeIpRestrictions Resource

new CloudProjectKubeIpRestrictions(name: string, args: CloudProjectKubeIpRestrictionsArgs, opts?: CustomResourceOptions);
@overload
def CloudProjectKubeIpRestrictions(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   ips: Optional[Sequence[str]] = None,
                                   kube_id: Optional[str] = None,
                                   service_name: Optional[str] = None)
@overload
def CloudProjectKubeIpRestrictions(resource_name: str,
                                   args: CloudProjectKubeIpRestrictionsArgs,
                                   opts: Optional[ResourceOptions] = None)
func NewCloudProjectKubeIpRestrictions(ctx *Context, name string, args CloudProjectKubeIpRestrictionsArgs, opts ...ResourceOption) (*CloudProjectKubeIpRestrictions, error)
public CloudProjectKubeIpRestrictions(string name, CloudProjectKubeIpRestrictionsArgs args, CustomResourceOptions? opts = null)
public CloudProjectKubeIpRestrictions(String name, CloudProjectKubeIpRestrictionsArgs args)
public CloudProjectKubeIpRestrictions(String name, CloudProjectKubeIpRestrictionsArgs args, CustomResourceOptions options)
type: ovh:CloudProjectKubeIpRestrictions
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args CloudProjectKubeIpRestrictionsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args CloudProjectKubeIpRestrictionsArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args CloudProjectKubeIpRestrictionsArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args CloudProjectKubeIpRestrictionsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args CloudProjectKubeIpRestrictionsArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

CloudProjectKubeIpRestrictions Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The CloudProjectKubeIpRestrictions resource accepts the following input properties:

Ips List<string>

List of CIDR authorized to interact with the managed Kubernetes cluster.

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.

Ips []string

List of CIDR authorized to interact with the managed Kubernetes cluster.

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.

ips List<String>

List of CIDR authorized to interact with the managed Kubernetes cluster.

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.

ips string[]

List of CIDR authorized to interact with the managed Kubernetes cluster.

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.

ips Sequence[str]

List of CIDR authorized to interact with the managed Kubernetes cluster.

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.

ips List<String>

List of CIDR authorized to interact with the managed Kubernetes cluster.

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.

Outputs

All input properties are implicitly available as output properties. Additionally, the CloudProjectKubeIpRestrictions resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing CloudProjectKubeIpRestrictions Resource

Get an existing CloudProjectKubeIpRestrictions resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: CloudProjectKubeIpRestrictionsState, opts?: CustomResourceOptions): CloudProjectKubeIpRestrictions
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        ips: Optional[Sequence[str]] = None,
        kube_id: Optional[str] = None,
        service_name: Optional[str] = None) -> CloudProjectKubeIpRestrictions
func GetCloudProjectKubeIpRestrictions(ctx *Context, name string, id IDInput, state *CloudProjectKubeIpRestrictionsState, opts ...ResourceOption) (*CloudProjectKubeIpRestrictions, error)
public static CloudProjectKubeIpRestrictions Get(string name, Input<string> id, CloudProjectKubeIpRestrictionsState? state, CustomResourceOptions? opts = null)
public static CloudProjectKubeIpRestrictions get(String name, Output<String> id, CloudProjectKubeIpRestrictionsState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Ips List<string>

List of CIDR authorized to interact with the managed Kubernetes cluster.

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.

Ips []string

List of CIDR authorized to interact with the managed Kubernetes cluster.

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.

ips List<String>

List of CIDR authorized to interact with the managed Kubernetes cluster.

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.

ips string[]

List of CIDR authorized to interact with the managed Kubernetes cluster.

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.

ips Sequence[str]

List of CIDR authorized to interact with the managed Kubernetes cluster.

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.

ips List<String>

List of CIDR authorized to interact with the managed Kubernetes cluster.

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.

Import

OVHcloud Managed Kubernetes Service cluster IP restrictions can be imported using the id of the IP restrictions (which is the same ID as the kubernetes which it depends on),

 $ pulumi import ovh:index/cloudProjectKubeIpRestrictions:CloudProjectKubeIpRestrictions iprestrictions xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Package Details

Repository
https://github.com/lbrlabs/pulumi-ovh
License
Apache-2.0
Notes

This Pulumi package is based on the ovh Terraform Provider.