@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
255 lines (254 loc) • 7.32 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "../types/output";
/**
* Use this data source to query detailed information of vke kubeconfigs
* ## 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 foo1 = new volcengine.vke.Kubeconfig("foo1", {
* clusterId: fooCluster.id,
* type: "Private",
* validDuration: 2,
* });
* const foo2 = new volcengine.vke.Kubeconfig("foo2", {
* clusterId: fooCluster.id,
* type: "Public",
* validDuration: 2,
* });
* const fooKubeconfigs = volcengine.vke.getKubeconfigsOutput({
* ids: [
* foo1.id,
* foo2.id,
* ],
* });
* ```
*/
/** @deprecated volcengine.vke.Kubeconfigs has been deprecated in favor of volcengine.vke.getKubeconfigs */
export declare function kubeconfigs(args?: KubeconfigsArgs, opts?: pulumi.InvokeOptions): Promise<KubeconfigsResult>;
/**
* A collection of arguments for invoking Kubeconfigs.
*/
export interface KubeconfigsArgs {
/**
* A list of Cluster IDs.
*/
clusterIds?: string[];
/**
* A list of Kubeconfig IDs.
*/
ids?: string[];
/**
* A Name Regex of Kubeconfig.
*/
nameRegex?: string;
/**
* File name where to save data source results.
*/
outputFile?: string;
/**
* The page number of Kubeconfigs query.
*/
pageNumber?: number;
/**
* The page size of Kubeconfigs query.
*/
pageSize?: number;
/**
* A list of Role IDs.
*/
roleIds?: number[];
/**
* The type of Kubeconfigs query.
*/
types?: string[];
/**
* A list of User IDs.
*/
userIds?: number[];
}
/**
* A collection of values returned by Kubeconfigs.
*/
export interface KubeconfigsResult {
readonly clusterIds?: string[];
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly ids?: string[];
/**
* The collection of VkeKubeconfig query.
*/
readonly kubeconfigs: outputs.vke.KubeconfigsKubeconfig[];
readonly nameRegex?: string;
readonly outputFile?: string;
readonly pageNumber: number;
readonly pageSize: number;
readonly roleIds?: number[];
/**
* The total count of Kubeconfig query.
*/
readonly totalCount: number;
readonly types?: string[];
readonly userIds?: number[];
}
/**
* Use this data source to query detailed information of vke kubeconfigs
* ## 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 foo1 = new volcengine.vke.Kubeconfig("foo1", {
* clusterId: fooCluster.id,
* type: "Private",
* validDuration: 2,
* });
* const foo2 = new volcengine.vke.Kubeconfig("foo2", {
* clusterId: fooCluster.id,
* type: "Public",
* validDuration: 2,
* });
* const fooKubeconfigs = volcengine.vke.getKubeconfigsOutput({
* ids: [
* foo1.id,
* foo2.id,
* ],
* });
* ```
*/
/** @deprecated volcengine.vke.Kubeconfigs has been deprecated in favor of volcengine.vke.getKubeconfigs */
export declare function kubeconfigsOutput(args?: KubeconfigsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<KubeconfigsResult>;
/**
* A collection of arguments for invoking Kubeconfigs.
*/
export interface KubeconfigsOutputArgs {
/**
* A list of Cluster IDs.
*/
clusterIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* A list of Kubeconfig IDs.
*/
ids?: pulumi.Input<pulumi.Input<string>[]>;
/**
* A Name Regex of Kubeconfig.
*/
nameRegex?: pulumi.Input<string>;
/**
* File name where to save data source results.
*/
outputFile?: pulumi.Input<string>;
/**
* The page number of Kubeconfigs query.
*/
pageNumber?: pulumi.Input<number>;
/**
* The page size of Kubeconfigs query.
*/
pageSize?: pulumi.Input<number>;
/**
* A list of Role IDs.
*/
roleIds?: pulumi.Input<pulumi.Input<number>[]>;
/**
* The type of Kubeconfigs query.
*/
types?: pulumi.Input<pulumi.Input<string>[]>;
/**
* A list of User IDs.
*/
userIds?: pulumi.Input<pulumi.Input<number>[]>;
}