@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
268 lines (267 loc) • 9.42 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Provides a resource to manage vke default node pool batch attach
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@volcengine/pulumi";
*
* const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
* vpcName: "acc-test-project1",
* cidrBlock: "172.16.0.0/16",
* });
* const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
* subnetName: "acc-subnet-test-2",
* cidrBlock: "172.16.0.0/24",
* zoneId: "cn-beijing-a",
* vpcId: fooVpc.id,
* });
* const fooSecurityGroup = new volcengine.vpc.SecurityGroup("fooSecurityGroup", {
* vpcId: fooVpc.id,
* securityGroupName: "acc-test-security-group2",
* });
* const fooInstance = new volcengine.ecs.Instance("fooInstance", {
* imageId: "image-ybqi99s7yq8rx7mnk44b",
* instanceType: "ecs.g1ie.large",
* instanceName: "acc-test-ecs-name2",
* password: "93f0cb0614Aab12",
* instanceChargeType: "PostPaid",
* systemVolumeType: "ESSD_PL0",
* systemVolumeSize: 40,
* subnetId: fooSubnet.id,
* securityGroupIds: [fooSecurityGroup.id],
* });
* const foo2 = new volcengine.ecs.Instance("foo2", {
* imageId: "image-ybqi99s7yq8rx7mnk44b",
* instanceType: "ecs.g1ie.large",
* instanceName: "acc-test-ecs-name2",
* password: "93f0cb0614Aab12",
* instanceChargeType: "PostPaid",
* systemVolumeType: "ESSD_PL0",
* systemVolumeSize: 40,
* subnetId: fooSubnet.id,
* securityGroupIds: [fooSecurityGroup.id],
* });
* const fooCluster = new volcengine.vke.Cluster("fooCluster", {
* description: "created by terraform",
* deleteProtectionEnabled: false,
* clusterConfig: {
* subnetIds: [fooSubnet.id],
* apiServerPublicAccessEnabled: true,
* apiServerPublicAccessConfig: {
* publicAccessNetworkConfig: {
* billingType: "PostPaidByBandwidth",
* bandwidth: 1,
* },
* },
* resourcePublicAccessDefaultEnabled: true,
* },
* podsConfig: {
* podNetworkMode: "VpcCniShared",
* vpcCniConfig: {
* subnetIds: [fooSubnet.id],
* },
* },
* servicesConfig: {
* serviceCidrsv4s: ["172.30.0.0/18"],
* },
* tags: [{
* key: "tf-k1",
* value: "tf-v1",
* }],
* });
* const fooDefaultNodePool = new volcengine.vke.DefaultNodePool("fooDefaultNodePool", {
* clusterId: fooCluster.id,
* nodeConfig: {
* security: {
* login: {
* password: "amw4WTdVcTRJVVFsUXpVTw==",
* },
* securityGroupIds: [fooSecurityGroup.id],
* securityStrategies: ["Hids"],
* },
* initializeScript: "ISMvYmluL2Jhc2gKZWNobyAx",
* },
* kubernetesConfig: {
* labels: [
* {
* key: "tf-key1",
* value: "tf-value1",
* },
* {
* key: "tf-key2",
* value: "tf-value2",
* },
* ],
* taints: [
* {
* key: "tf-key3",
* value: "tf-value3",
* effect: "NoSchedule",
* },
* {
* key: "tf-key4",
* value: "tf-value4",
* effect: "NoSchedule",
* },
* ],
* cordon: true,
* },
* tags: [{
* key: "tf-k1",
* value: "tf-v1",
* }],
* });
* const fooDefaultNodePoolBatchAttach = new volcengine.vke.DefaultNodePoolBatchAttach("fooDefaultNodePoolBatchAttach", {
* clusterId: fooCluster.id,
* defaultNodePoolId: fooDefaultNodePool.id,
* instances: [
* {
* instanceId: fooInstance.id,
* keepInstanceName: true,
* additionalContainerStorageEnabled: false,
* },
* {
* instanceId: foo2.id,
* keepInstanceName: true,
* additionalContainerStorageEnabled: false,
* },
* ],
* kubernetesConfig: {
* labels: [
* {
* key: "tf-key1",
* value: "tf-value1",
* },
* {
* key: "tf-key2",
* value: "tf-value2",
* },
* ],
* taints: [
* {
* key: "tf-key3",
* value: "tf-value3",
* effect: "NoSchedule",
* },
* {
* key: "tf-key4",
* value: "tf-value4",
* effect: "NoSchedule",
* },
* ],
* cordon: true,
* },
* });
* ```
*/
export declare class DefaultNodePoolBatchAttach extends pulumi.CustomResource {
/**
* Get an existing DefaultNodePoolBatchAttach resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DefaultNodePoolBatchAttachState, opts?: pulumi.CustomResourceOptions): DefaultNodePoolBatchAttach;
/**
* Returns true if the given object is an instance of DefaultNodePoolBatchAttach. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is DefaultNodePoolBatchAttach;
/**
* The ClusterId of NodePool.
*/
readonly clusterId: pulumi.Output<string>;
/**
* The default NodePool ID.
*/
readonly defaultNodePoolId: pulumi.Output<string>;
/**
* The ECS InstanceIds add to NodePool.
*/
readonly instances: pulumi.Output<outputs.vke.DefaultNodePoolBatchAttachInstance[] | undefined>;
/**
* Is import of the DefaultNodePool. It only works when imported, set to true.
*/
readonly isImport: pulumi.Output<boolean>;
/**
* The KubernetesConfig of NodeConfig. Please note that this field is the configuration of the node. The same key is subject to the config of the node pool. Different keys take effect together.
*/
readonly kubernetesConfig: pulumi.Output<outputs.vke.DefaultNodePoolBatchAttachKubernetesConfig | undefined>;
/**
* The Config of NodePool.
*/
readonly nodeConfigs: pulumi.Output<outputs.vke.DefaultNodePoolBatchAttachNodeConfig[]>;
/**
* Tags.
*/
readonly tags: pulumi.Output<outputs.vke.DefaultNodePoolBatchAttachTag[]>;
/**
* Create a DefaultNodePoolBatchAttach resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: DefaultNodePoolBatchAttachArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering DefaultNodePoolBatchAttach resources.
*/
export interface DefaultNodePoolBatchAttachState {
/**
* The ClusterId of NodePool.
*/
clusterId?: pulumi.Input<string>;
/**
* The default NodePool ID.
*/
defaultNodePoolId?: pulumi.Input<string>;
/**
* The ECS InstanceIds add to NodePool.
*/
instances?: pulumi.Input<pulumi.Input<inputs.vke.DefaultNodePoolBatchAttachInstance>[]>;
/**
* Is import of the DefaultNodePool. It only works when imported, set to true.
*/
isImport?: pulumi.Input<boolean>;
/**
* The KubernetesConfig of NodeConfig. Please note that this field is the configuration of the node. The same key is subject to the config of the node pool. Different keys take effect together.
*/
kubernetesConfig?: pulumi.Input<inputs.vke.DefaultNodePoolBatchAttachKubernetesConfig>;
/**
* The Config of NodePool.
*/
nodeConfigs?: pulumi.Input<pulumi.Input<inputs.vke.DefaultNodePoolBatchAttachNodeConfig>[]>;
/**
* Tags.
*/
tags?: pulumi.Input<pulumi.Input<inputs.vke.DefaultNodePoolBatchAttachTag>[]>;
}
/**
* The set of arguments for constructing a DefaultNodePoolBatchAttach resource.
*/
export interface DefaultNodePoolBatchAttachArgs {
/**
* The ClusterId of NodePool.
*/
clusterId: pulumi.Input<string>;
/**
* The default NodePool ID.
*/
defaultNodePoolId: pulumi.Input<string>;
/**
* The ECS InstanceIds add to NodePool.
*/
instances?: pulumi.Input<pulumi.Input<inputs.vke.DefaultNodePoolBatchAttachInstance>[]>;
/**
* The KubernetesConfig of NodeConfig. Please note that this field is the configuration of the node. The same key is subject to the config of the node pool. Different keys take effect together.
*/
kubernetesConfig?: pulumi.Input<inputs.vke.DefaultNodePoolBatchAttachKubernetesConfig>;
}