@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
140 lines (139 loc) • 4.79 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides a resource to manage vke kubeconfig
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@pulumi/volcengine";
* import * as volcengine from "@volcengine/pulumi";
*
* const fooZones = volcengine.ecs.getZones({});
* const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
* vpcName: "acc-test-vpc",
* cidrBlock: "172.16.0.0/16",
* });
* const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
* subnetName: "acc-test-subnet",
* cidrBlock: "172.16.0.0/24",
* zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
* vpcId: fooVpc.id,
* });
* const fooSecurityGroup = new volcengine.vpc.SecurityGroup("fooSecurityGroup", {
* securityGroupName: "acc-test-security-group",
* vpcId: fooVpc.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 fooKubeconfig = new volcengine.vke.Kubeconfig("fooKubeconfig", {
* clusterId: fooCluster.id,
* type: "Private",
* validDuration: 2,
* });
* ```
*
* ## Import
*
* VkeKubeconfig can be imported using the id, e.g.
*
* ```sh
* $ pulumi import volcengine:vke/kubeconfig:Kubeconfig default kce8simvqtofl0l6u4qd0
* ```
*/
export declare class Kubeconfig extends pulumi.CustomResource {
/**
* Get an existing Kubeconfig 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?: KubeconfigState, opts?: pulumi.CustomResourceOptions): Kubeconfig;
/**
* Returns true if the given object is an instance of Kubeconfig. 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 Kubeconfig;
/**
* The cluster id of the Kubeconfig.
*/
readonly clusterId: pulumi.Output<string>;
/**
* The type of the Kubeconfig, the value of type should be Public or Private.
*/
readonly type: pulumi.Output<string>;
/**
* The ValidDuration of the Kubeconfig, the range of the ValidDuration is 1 hour to 43800 hour.
*/
readonly validDuration: pulumi.Output<number | undefined>;
/**
* Create a Kubeconfig 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: KubeconfigArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Kubeconfig resources.
*/
export interface KubeconfigState {
/**
* The cluster id of the Kubeconfig.
*/
clusterId?: pulumi.Input<string>;
/**
* The type of the Kubeconfig, the value of type should be Public or Private.
*/
type?: pulumi.Input<string>;
/**
* The ValidDuration of the Kubeconfig, the range of the ValidDuration is 1 hour to 43800 hour.
*/
validDuration?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a Kubeconfig resource.
*/
export interface KubeconfigArgs {
/**
* The cluster id of the Kubeconfig.
*/
clusterId: pulumi.Input<string>;
/**
* The type of the Kubeconfig, the value of type should be Public or Private.
*/
type: pulumi.Input<string>;
/**
* The ValidDuration of the Kubeconfig, the range of the ValidDuration is 1 hour to 43800 hour.
*/
validDuration?: pulumi.Input<number>;
}