alicloud.edas.K8sCluster
Explore with Pulumi AI
Provides an EDAS K8s cluster resource. For information about EDAS K8s Cluster and how to use it, seeWhat is EDAS K8s Cluster.
NOTE: Available since v1.93.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as std from "@pulumi/std";
const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const _default = alicloud.getZones({
availableResourceCreation: "VSwitch",
});
const defaultGetImages = alicloud.ecs.getImages({
nameRegex: "^ubuntu_18.*64",
mostRecent: true,
owners: "system",
});
const defaultGetInstanceTypes = _default.then(_default => alicloud.ecs.getInstanceTypes({
availabilityZone: _default.zones?.[0]?.id,
cpuCoreCount: 4,
memorySize: 8,
kubernetesNodeRole: "Worker",
}));
const defaultNetwork = new alicloud.vpc.Network("default", {
vpcName: name,
cidrBlock: "10.4.0.0/16",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
vswitchName: name,
cidrBlock: "10.4.0.0/24",
vpcId: defaultNetwork.id,
zoneId: _default.then(_default => _default.zones?.[0]?.id),
});
const defaultManagedKubernetes = new alicloud.cs.ManagedKubernetes("default", {
namePrefix: name,
clusterSpec: "ack.pro.small",
workerVswitchIds: [defaultSwitch.id],
newNatGateway: true,
podCidr: std.cidrsubnet({
input: "10.0.0.0/8",
newbits: 8,
netnum: 36,
}).then(invoke => invoke.result),
serviceCidr: std.cidrsubnet({
input: "172.16.0.0/16",
newbits: 4,
netnum: 7,
}).then(invoke => invoke.result),
slbInternetEnabled: true,
});
const defaultNodePool = new alicloud.cs.NodePool("default", {
name: name,
clusterId: defaultManagedKubernetes.id,
vswitchIds: [defaultSwitch.id],
instanceTypes: [defaultGetInstanceTypes.then(defaultGetInstanceTypes => defaultGetInstanceTypes.instanceTypes?.[0]?.id)],
systemDiskCategory: "cloud_efficiency",
systemDiskSize: 40,
desiredSize: "2",
});
const defaultK8sCluster = new alicloud.edas.K8sCluster("default", {csClusterId: defaultNodePool.clusterId});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_std as std
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-example"
default = alicloud.get_zones(available_resource_creation="VSwitch")
default_get_images = alicloud.ecs.get_images(name_regex="^ubuntu_18.*64",
most_recent=True,
owners="system")
default_get_instance_types = alicloud.ecs.get_instance_types(availability_zone=default.zones[0].id,
cpu_core_count=4,
memory_size=8,
kubernetes_node_role="Worker")
default_network = alicloud.vpc.Network("default",
vpc_name=name,
cidr_block="10.4.0.0/16")
default_switch = alicloud.vpc.Switch("default",
vswitch_name=name,
cidr_block="10.4.0.0/24",
vpc_id=default_network.id,
zone_id=default.zones[0].id)
default_managed_kubernetes = alicloud.cs.ManagedKubernetes("default",
name_prefix=name,
cluster_spec="ack.pro.small",
worker_vswitch_ids=[default_switch.id],
new_nat_gateway=True,
pod_cidr=std.cidrsubnet(input="10.0.0.0/8",
newbits=8,
netnum=36).result,
service_cidr=std.cidrsubnet(input="172.16.0.0/16",
newbits=4,
netnum=7).result,
slb_internet_enabled=True)
default_node_pool = alicloud.cs.NodePool("default",
name=name,
cluster_id=default_managed_kubernetes.id,
vswitch_ids=[default_switch.id],
instance_types=[default_get_instance_types.instance_types[0].id],
system_disk_category="cloud_efficiency",
system_disk_size=40,
desired_size="2")
default_k8s_cluster = alicloud.edas.K8sCluster("default", cs_cluster_id=default_node_pool.cluster_id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cs"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/edas"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi-std/sdk/go/std"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "tf-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
AvailableResourceCreation: pulumi.StringRef("VSwitch"),
}, nil)
if err != nil {
return err
}
_, err = ecs.GetImages(ctx, &ecs.GetImagesArgs{
NameRegex: pulumi.StringRef("^ubuntu_18.*64"),
MostRecent: pulumi.BoolRef(true),
Owners: pulumi.StringRef("system"),
}, nil)
if err != nil {
return err
}
defaultGetInstanceTypes, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
AvailabilityZone: pulumi.StringRef(_default.Zones[0].Id),
CpuCoreCount: pulumi.IntRef(4),
MemorySize: pulumi.Float64Ref(8),
KubernetesNodeRole: pulumi.StringRef("Worker"),
}, nil)
if err != nil {
return err
}
defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
VpcName: pulumi.String(name),
CidrBlock: pulumi.String("10.4.0.0/16"),
})
if err != nil {
return err
}
defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
VswitchName: pulumi.String(name),
CidrBlock: pulumi.String("10.4.0.0/24"),
VpcId: defaultNetwork.ID(),
ZoneId: pulumi.String(_default.Zones[0].Id),
})
if err != nil {
return err
}
invokeCidrsubnet, err := std.Cidrsubnet(ctx, &std.CidrsubnetArgs{
Input: "10.0.0.0/8",
Newbits: 8,
Netnum: 36,
}, nil)
if err != nil {
return err
}
invokeCidrsubnet1, err := std.Cidrsubnet(ctx, &std.CidrsubnetArgs{
Input: "172.16.0.0/16",
Newbits: 4,
Netnum: 7,
}, nil)
if err != nil {
return err
}
defaultManagedKubernetes, err := cs.NewManagedKubernetes(ctx, "default", &cs.ManagedKubernetesArgs{
NamePrefix: pulumi.String(name),
ClusterSpec: pulumi.String("ack.pro.small"),
WorkerVswitchIds: pulumi.StringArray{
defaultSwitch.ID(),
},
NewNatGateway: pulumi.Bool(true),
PodCidr: pulumi.String(invokeCidrsubnet.Result),
ServiceCidr: pulumi.String(invokeCidrsubnet1.Result),
SlbInternetEnabled: pulumi.Bool(true),
})
if err != nil {
return err
}
defaultNodePool, err := cs.NewNodePool(ctx, "default", &cs.NodePoolArgs{
Name: pulumi.String(name),
ClusterId: defaultManagedKubernetes.ID(),
VswitchIds: pulumi.StringArray{
defaultSwitch.ID(),
},
InstanceTypes: pulumi.StringArray{
pulumi.String(defaultGetInstanceTypes.InstanceTypes[0].Id),
},
SystemDiskCategory: pulumi.String("cloud_efficiency"),
SystemDiskSize: pulumi.Int(40),
DesiredSize: pulumi.String("2"),
})
if err != nil {
return err
}
_, err = edas.NewK8sCluster(ctx, "default", &edas.K8sClusterArgs{
CsClusterId: defaultNodePool.ClusterId,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tf-example";
var @default = AliCloud.GetZones.Invoke(new()
{
AvailableResourceCreation = "VSwitch",
});
var defaultGetImages = AliCloud.Ecs.GetImages.Invoke(new()
{
NameRegex = "^ubuntu_18.*64",
MostRecent = true,
Owners = "system",
});
var defaultGetInstanceTypes = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
{
AvailabilityZone = @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
CpuCoreCount = 4,
MemorySize = 8,
KubernetesNodeRole = "Worker",
});
var defaultNetwork = new AliCloud.Vpc.Network("default", new()
{
VpcName = name,
CidrBlock = "10.4.0.0/16",
});
var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
{
VswitchName = name,
CidrBlock = "10.4.0.0/24",
VpcId = defaultNetwork.Id,
ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
});
var defaultManagedKubernetes = new AliCloud.CS.ManagedKubernetes("default", new()
{
NamePrefix = name,
ClusterSpec = "ack.pro.small",
WorkerVswitchIds = new[]
{
defaultSwitch.Id,
},
NewNatGateway = true,
PodCidr = Std.Cidrsubnet.Invoke(new()
{
Input = "10.0.0.0/8",
Newbits = 8,
Netnum = 36,
}).Apply(invoke => invoke.Result),
ServiceCidr = Std.Cidrsubnet.Invoke(new()
{
Input = "172.16.0.0/16",
Newbits = 4,
Netnum = 7,
}).Apply(invoke => invoke.Result),
SlbInternetEnabled = true,
});
var defaultNodePool = new AliCloud.CS.NodePool("default", new()
{
Name = name,
ClusterId = defaultManagedKubernetes.Id,
VswitchIds = new[]
{
defaultSwitch.Id,
},
InstanceTypes = new[]
{
defaultGetInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.Id),
},
SystemDiskCategory = "cloud_efficiency",
SystemDiskSize = 40,
DesiredSize = "2",
});
var defaultK8sCluster = new AliCloud.Edas.K8sCluster("default", new()
{
CsClusterId = defaultNodePool.ClusterId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
import com.pulumi.alicloud.ecs.inputs.GetInstanceTypesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.cs.ManagedKubernetes;
import com.pulumi.alicloud.cs.ManagedKubernetesArgs;
import com.pulumi.std.StdFunctions;
import com.pulumi.std.inputs.CidrsubnetArgs;
import com.pulumi.alicloud.cs.NodePool;
import com.pulumi.alicloud.cs.NodePoolArgs;
import com.pulumi.alicloud.edas.K8sCluster;
import com.pulumi.alicloud.edas.K8sClusterArgs;
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 config = ctx.config();
final var name = config.get("name").orElse("tf-example");
final var default = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableResourceCreation("VSwitch")
.build());
final var defaultGetImages = EcsFunctions.getImages(GetImagesArgs.builder()
.nameRegex("^ubuntu_18.*64")
.mostRecent(true)
.owners("system")
.build());
final var defaultGetInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
.availabilityZone(default_.zones()[0].id())
.cpuCoreCount(4)
.memorySize(8)
.kubernetesNodeRole("Worker")
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("10.4.0.0/16")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vswitchName(name)
.cidrBlock("10.4.0.0/24")
.vpcId(defaultNetwork.id())
.zoneId(default_.zones()[0].id())
.build());
var defaultManagedKubernetes = new ManagedKubernetes("defaultManagedKubernetes", ManagedKubernetesArgs.builder()
.namePrefix(name)
.clusterSpec("ack.pro.small")
.workerVswitchIds(defaultSwitch.id())
.newNatGateway(true)
.podCidr(StdFunctions.cidrsubnet(CidrsubnetArgs.builder()
.input("10.0.0.0/8")
.newbits(8)
.netnum(36)
.build()).result())
.serviceCidr(StdFunctions.cidrsubnet(CidrsubnetArgs.builder()
.input("172.16.0.0/16")
.newbits(4)
.netnum(7)
.build()).result())
.slbInternetEnabled(true)
.build());
var defaultNodePool = new NodePool("defaultNodePool", NodePoolArgs.builder()
.name(name)
.clusterId(defaultManagedKubernetes.id())
.vswitchIds(defaultSwitch.id())
.instanceTypes(defaultGetInstanceTypes.instanceTypes()[0].id())
.systemDiskCategory("cloud_efficiency")
.systemDiskSize(40)
.desiredSize("2")
.build());
var defaultK8sCluster = new K8sCluster("defaultK8sCluster", K8sClusterArgs.builder()
.csClusterId(defaultNodePool.clusterId())
.build());
}
}
configuration:
name:
type: string
default: tf-example
resources:
defaultNetwork:
type: alicloud:vpc:Network
name: default
properties:
vpcName: ${name}
cidrBlock: 10.4.0.0/16
defaultSwitch:
type: alicloud:vpc:Switch
name: default
properties:
vswitchName: ${name}
cidrBlock: 10.4.0.0/24
vpcId: ${defaultNetwork.id}
zoneId: ${default.zones[0].id}
defaultManagedKubernetes:
type: alicloud:cs:ManagedKubernetes
name: default
properties:
namePrefix: ${name}
clusterSpec: ack.pro.small
workerVswitchIds:
- ${defaultSwitch.id}
newNatGateway: true
podCidr:
fn::invoke:
function: std:cidrsubnet
arguments:
input: 10.0.0.0/8
newbits: 8
netnum: 36
return: result
serviceCidr:
fn::invoke:
function: std:cidrsubnet
arguments:
input: 172.16.0.0/16
newbits: 4
netnum: 7
return: result
slbInternetEnabled: true
defaultNodePool:
type: alicloud:cs:NodePool
name: default
properties:
name: ${name}
clusterId: ${defaultManagedKubernetes.id}
vswitchIds:
- ${defaultSwitch.id}
instanceTypes:
- ${defaultGetInstanceTypes.instanceTypes[0].id}
systemDiskCategory: cloud_efficiency
systemDiskSize: 40
desiredSize: 2
defaultK8sCluster:
type: alicloud:edas:K8sCluster
name: default
properties:
csClusterId: ${defaultNodePool.clusterId}
variables:
default:
fn::invoke:
function: alicloud:getZones
arguments:
availableResourceCreation: VSwitch
defaultGetImages:
fn::invoke:
function: alicloud:ecs:getImages
arguments:
nameRegex: ^ubuntu_18.*64
mostRecent: true
owners: system
defaultGetInstanceTypes:
fn::invoke:
function: alicloud:ecs:getInstanceTypes
arguments:
availabilityZone: ${default.zones[0].id}
cpuCoreCount: 4
memorySize: 8
kubernetesNodeRole: Worker
Create K8sCluster Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new K8sCluster(name: string, args: K8sClusterArgs, opts?: CustomResourceOptions);
@overload
def K8sCluster(resource_name: str,
args: K8sClusterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def K8sCluster(resource_name: str,
opts: Optional[ResourceOptions] = None,
cs_cluster_id: Optional[str] = None,
namespace_id: Optional[str] = None)
func NewK8sCluster(ctx *Context, name string, args K8sClusterArgs, opts ...ResourceOption) (*K8sCluster, error)
public K8sCluster(string name, K8sClusterArgs args, CustomResourceOptions? opts = null)
public K8sCluster(String name, K8sClusterArgs args)
public K8sCluster(String name, K8sClusterArgs args, CustomResourceOptions options)
type: alicloud:edas:K8sCluster
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args K8sClusterArgs
- 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 K8sClusterArgs
- 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 K8sClusterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args K8sClusterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args K8sClusterArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var k8sClusterResource = new AliCloud.Edas.K8sCluster("k8sClusterResource", new()
{
CsClusterId = "string",
NamespaceId = "string",
});
example, err := edas.NewK8sCluster(ctx, "k8sClusterResource", &edas.K8sClusterArgs{
CsClusterId: pulumi.String("string"),
NamespaceId: pulumi.String("string"),
})
var k8sClusterResource = new K8sCluster("k8sClusterResource", K8sClusterArgs.builder()
.csClusterId("string")
.namespaceId("string")
.build());
k8s_cluster_resource = alicloud.edas.K8sCluster("k8sClusterResource",
cs_cluster_id="string",
namespace_id="string")
const k8sClusterResource = new alicloud.edas.K8sCluster("k8sClusterResource", {
csClusterId: "string",
namespaceId: "string",
});
type: alicloud:edas:K8sCluster
properties:
csClusterId: string
namespaceId: string
K8sCluster Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The K8sCluster resource accepts the following input properties:
- Cs
Cluster stringId - The ID of the alicloud container service kubernetes cluster that you want to import.
- Namespace
Id string - The ID of the namespace where you want to import. You can call the ListUserDefineRegion operation to query the namespace ID.
- Cs
Cluster stringId - The ID of the alicloud container service kubernetes cluster that you want to import.
- Namespace
Id string - The ID of the namespace where you want to import. You can call the ListUserDefineRegion operation to query the namespace ID.
- cs
Cluster StringId - The ID of the alicloud container service kubernetes cluster that you want to import.
- namespace
Id String - The ID of the namespace where you want to import. You can call the ListUserDefineRegion operation to query the namespace ID.
- cs
Cluster stringId - The ID of the alicloud container service kubernetes cluster that you want to import.
- namespace
Id string - The ID of the namespace where you want to import. You can call the ListUserDefineRegion operation to query the namespace ID.
- cs_
cluster_ strid - The ID of the alicloud container service kubernetes cluster that you want to import.
- namespace_
id str - The ID of the namespace where you want to import. You can call the ListUserDefineRegion operation to query the namespace ID.
- cs
Cluster StringId - The ID of the alicloud container service kubernetes cluster that you want to import.
- namespace
Id String - The ID of the namespace where you want to import. You can call the ListUserDefineRegion operation to query the namespace ID.
Outputs
All input properties are implicitly available as output properties. Additionally, the K8sCluster resource produces the following output properties:
- Cluster
Import intStatus - The import status of cluster:
1
: success.2
: failed.3
: importing.4
: deleted. - Cluster
Name string - The name of the cluster that you want to create.
- Cluster
Type int - The type of the cluster that you want to create. Valid values only: 5: K8s cluster.
- Id string
- The provider-assigned unique ID for this managed resource.
- Network
Mode int - The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.
- Vpc
Id string - The ID of the Virtual Private Cloud (VPC) for the cluster.
- Cluster
Import intStatus - The import status of cluster:
1
: success.2
: failed.3
: importing.4
: deleted. - Cluster
Name string - The name of the cluster that you want to create.
- Cluster
Type int - The type of the cluster that you want to create. Valid values only: 5: K8s cluster.
- Id string
- The provider-assigned unique ID for this managed resource.
- Network
Mode int - The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.
- Vpc
Id string - The ID of the Virtual Private Cloud (VPC) for the cluster.
- cluster
Import IntegerStatus - The import status of cluster:
1
: success.2
: failed.3
: importing.4
: deleted. - cluster
Name String - The name of the cluster that you want to create.
- cluster
Type Integer - The type of the cluster that you want to create. Valid values only: 5: K8s cluster.
- id String
- The provider-assigned unique ID for this managed resource.
- network
Mode Integer - The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.
- vpc
Id String - The ID of the Virtual Private Cloud (VPC) for the cluster.
- cluster
Import numberStatus - The import status of cluster:
1
: success.2
: failed.3
: importing.4
: deleted. - cluster
Name string - The name of the cluster that you want to create.
- cluster
Type number - The type of the cluster that you want to create. Valid values only: 5: K8s cluster.
- id string
- The provider-assigned unique ID for this managed resource.
- network
Mode number - The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.
- vpc
Id string - The ID of the Virtual Private Cloud (VPC) for the cluster.
- cluster_
import_ intstatus - The import status of cluster:
1
: success.2
: failed.3
: importing.4
: deleted. - cluster_
name str - The name of the cluster that you want to create.
- cluster_
type int - The type of the cluster that you want to create. Valid values only: 5: K8s cluster.
- id str
- The provider-assigned unique ID for this managed resource.
- network_
mode int - The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.
- vpc_
id str - The ID of the Virtual Private Cloud (VPC) for the cluster.
- cluster
Import NumberStatus - The import status of cluster:
1
: success.2
: failed.3
: importing.4
: deleted. - cluster
Name String - The name of the cluster that you want to create.
- cluster
Type Number - The type of the cluster that you want to create. Valid values only: 5: K8s cluster.
- id String
- The provider-assigned unique ID for this managed resource.
- network
Mode Number - The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.
- vpc
Id String - The ID of the Virtual Private Cloud (VPC) for the cluster.
Look up Existing K8sCluster Resource
Get an existing K8sCluster 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?: K8sClusterState, opts?: CustomResourceOptions): K8sCluster
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cluster_import_status: Optional[int] = None,
cluster_name: Optional[str] = None,
cluster_type: Optional[int] = None,
cs_cluster_id: Optional[str] = None,
namespace_id: Optional[str] = None,
network_mode: Optional[int] = None,
vpc_id: Optional[str] = None) -> K8sCluster
func GetK8sCluster(ctx *Context, name string, id IDInput, state *K8sClusterState, opts ...ResourceOption) (*K8sCluster, error)
public static K8sCluster Get(string name, Input<string> id, K8sClusterState? state, CustomResourceOptions? opts = null)
public static K8sCluster get(String name, Output<String> id, K8sClusterState state, CustomResourceOptions options)
resources: _: type: alicloud:edas:K8sCluster get: id: ${id}
- 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.
- Cluster
Import intStatus - The import status of cluster:
1
: success.2
: failed.3
: importing.4
: deleted. - Cluster
Name string - The name of the cluster that you want to create.
- Cluster
Type int - The type of the cluster that you want to create. Valid values only: 5: K8s cluster.
- Cs
Cluster stringId - The ID of the alicloud container service kubernetes cluster that you want to import.
- Namespace
Id string - The ID of the namespace where you want to import. You can call the ListUserDefineRegion operation to query the namespace ID.
- Network
Mode int - The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.
- Vpc
Id string - The ID of the Virtual Private Cloud (VPC) for the cluster.
- Cluster
Import intStatus - The import status of cluster:
1
: success.2
: failed.3
: importing.4
: deleted. - Cluster
Name string - The name of the cluster that you want to create.
- Cluster
Type int - The type of the cluster that you want to create. Valid values only: 5: K8s cluster.
- Cs
Cluster stringId - The ID of the alicloud container service kubernetes cluster that you want to import.
- Namespace
Id string - The ID of the namespace where you want to import. You can call the ListUserDefineRegion operation to query the namespace ID.
- Network
Mode int - The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.
- Vpc
Id string - The ID of the Virtual Private Cloud (VPC) for the cluster.
- cluster
Import IntegerStatus - The import status of cluster:
1
: success.2
: failed.3
: importing.4
: deleted. - cluster
Name String - The name of the cluster that you want to create.
- cluster
Type Integer - The type of the cluster that you want to create. Valid values only: 5: K8s cluster.
- cs
Cluster StringId - The ID of the alicloud container service kubernetes cluster that you want to import.
- namespace
Id String - The ID of the namespace where you want to import. You can call the ListUserDefineRegion operation to query the namespace ID.
- network
Mode Integer - The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.
- vpc
Id String - The ID of the Virtual Private Cloud (VPC) for the cluster.
- cluster
Import numberStatus - The import status of cluster:
1
: success.2
: failed.3
: importing.4
: deleted. - cluster
Name string - The name of the cluster that you want to create.
- cluster
Type number - The type of the cluster that you want to create. Valid values only: 5: K8s cluster.
- cs
Cluster stringId - The ID of the alicloud container service kubernetes cluster that you want to import.
- namespace
Id string - The ID of the namespace where you want to import. You can call the ListUserDefineRegion operation to query the namespace ID.
- network
Mode number - The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.
- vpc
Id string - The ID of the Virtual Private Cloud (VPC) for the cluster.
- cluster_
import_ intstatus - The import status of cluster:
1
: success.2
: failed.3
: importing.4
: deleted. - cluster_
name str - The name of the cluster that you want to create.
- cluster_
type int - The type of the cluster that you want to create. Valid values only: 5: K8s cluster.
- cs_
cluster_ strid - The ID of the alicloud container service kubernetes cluster that you want to import.
- namespace_
id str - The ID of the namespace where you want to import. You can call the ListUserDefineRegion operation to query the namespace ID.
- network_
mode int - The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.
- vpc_
id str - The ID of the Virtual Private Cloud (VPC) for the cluster.
- cluster
Import NumberStatus - The import status of cluster:
1
: success.2
: failed.3
: importing.4
: deleted. - cluster
Name String - The name of the cluster that you want to create.
- cluster
Type Number - The type of the cluster that you want to create. Valid values only: 5: K8s cluster.
- cs
Cluster StringId - The ID of the alicloud container service kubernetes cluster that you want to import.
- namespace
Id String - The ID of the namespace where you want to import. You can call the ListUserDefineRegion operation to query the namespace ID.
- network
Mode Number - The network type of the cluster that you want to create. Valid values: 1: classic network. 2: VPC.
- vpc
Id String - The ID of the Virtual Private Cloud (VPC) for the cluster.
Import
EDAS cluster can be imported using the id, e.g.
$ pulumi import alicloud:edas/k8sCluster:K8sCluster cluster cluster_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.