UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

547 lines (546 loc) 24.8 kB
import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "../types"; /** * ## Example Usage * * ## Import * * The BCS instance can be imported using `id`, e.g. bash * * ```sh * $ pulumi import huaweicloud:Bcs/instance:Instance test <id> * ``` * * Note that the imported state may not be identical to your resource definition, due to some attributes missing from the API response, security or some other reason. The missing attributes include`delete_storage`, `eip_enable`, `enterprise_project_id`, `fabric_version`, `orderer_node_num`, `org_disk_size`, `password` and `volume_type`. It is generally recommended running `terraform plan` after importing a instance. You can then decide if changes should be applied to the instance, or the resource definition should be updated to align with the instance. Also you can ignore changes as below. hcl resource "huaweicloud_bcs_instance" "test" { * * ... * * lifecycle { * * ignore_changes = [ * * delete_storage, eip_enable, enterprise_project_id, fabric_version, orderer_node_num, org_disk_size, password, volume_type, * * ] * * } } */ export declare class Instance extends pulumi.CustomResource { /** * Get an existing Instance 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?: InstanceState, opts?: pulumi.CustomResourceOptions): Instance; /** * Returns true if the given object is an instance of Instance. 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 Instance; /** * The agent addresses and port numbers on the user data plane of the BCS service. * * `peer_orgs/pvc_name` - The name of the PersistentVolumeClaim (PVC) used by the peer. * * `peer_orgs/status` - The peer status. The value contains `IsCreating`, `IsUpgrading`, `Adding/IsScaling`, * `Isdeleting`, `Normal`, `AbNormal` and `Unknown`. * * `peer_orgs/status_detail` - The peer status in the format like `1/1`. The denominator is the total number of peers in * the organization, and the numerator is the number of normal peers. * * `peer_orgs/address` - The peer domain name or IP address of the cluster. * * `peer_orgs/address/domain_port` - The domain name address. * * `peer_orgs/address/ip_port` - The IP address. * * `kafka/name` - The Kafka instance name. */ readonly agentPortalAddresses: pulumi.Output<string[]>; /** * Specifies the configuration of block generation. The blockInfo object * structure is documented below. */ readonly blockInfo: pulumi.Output<outputs.Bcs.InstanceBlockInfo | undefined>; /** * Specifies the blockchain type of the BCS instance. Valid values * are `private` and `union`. Default is `private`. Changing this will create a new instance. */ readonly blockchainType: pulumi.Output<string>; /** * Specifies the ID of the CCE cluster to attach to the BCS instance. The * BCS service needs to exclusively occupy the CCE cluster. Please make sure that the CCE cluster is not occupied before * deploying the BCS service. Changing this will create a new instance. */ readonly cceClusterId: pulumi.Output<string>; /** * Specifies an array of one or more channels to attach to the BCS instance. If * omitted, the bcs instance will create a `channels` named `channel` by default. Changing this will create a new * instance. The channels object structure is documented below. */ readonly channels: pulumi.Output<outputs.Bcs.InstanceChannel[]>; /** * The type of the cluster where the BCS service is deployed. */ readonly clusterType: pulumi.Output<string>; /** * Specifies the consensus algorithm used by the BCS instance. The valid * values of fabric 1.4 are `solo`, `kafka` and `SFLIC`, and the valid values of fabric 2.0 are `SFLIC` * and `etcdraft`. Changing this will create a new instance. */ readonly consensus: pulumi.Output<string>; /** * Specifies the NoSQL database used by BCS instance. If omitted, the bcs instance * will create a `goleveldb`(File Database) database by default. This field is required when databaseType is `couchdb`. * Changing this will create a new instance. The couchdb object structure is documented below. */ readonly couchdb: pulumi.Output<outputs.Bcs.InstanceCouchdb | undefined>; /** * Whether the BCS instance is deployed across regions. */ readonly crossRegionSupport: pulumi.Output<boolean>; /** * Specifies the type of the database used by the BCS service. * Valid values are `goleveldb` and `couchdb`. The default value is `goleveldb`. * If `couchdb` is used, specify the couchdb field. Changing this will create a new instance. */ readonly databaseType: pulumi.Output<string>; /** * Specified whether to delete the associated OBS bucket when deleting BCS instance. * `deleteObs` is used to delete the OBS created by the BCS instance of the Kafka consensus strategy. Default is false. */ readonly deleteObs: pulumi.Output<boolean | undefined>; /** * Specified whether to delete the associated SFS resources when deleting BCS * instance. Default is false. */ readonly deleteStorage: pulumi.Output<boolean | undefined>; /** * Specifies Service edition of the BCS instance. Valid values are `1`, `2` and `4` * . Changing this will create a new instance. */ readonly edition: pulumi.Output<number>; /** * Specifies whether to use the EIP of the CCE to bind the BCS instance. * Changing this will create a new instance. Default is true. */ readonly eipEnable: pulumi.Output<boolean | undefined>; /** * Specifies the ID of the enterprise project that the BCS * instance belong to. */ readonly enterpriseProjectId: pulumi.Output<string>; /** * Specifies version of fabric for the BCS instance. Valid values * are `1.4` and `2.0` * Changing this will create a new instance. */ readonly fabricVersion: pulumi.Output<string>; /** * Specifies the kafka configuration for the BCS instance. Changing this will create * a new instance. The kafka object structure is documented below. */ readonly kafka: pulumi.Output<outputs.Bcs.InstanceKafka | undefined>; /** * Specifies the name of the channel. Changing this creates a new instance. */ readonly name: pulumi.Output<string>; /** * The version of an old BCS service. */ readonly oldServiceVersion: pulumi.Output<string>; /** * Specifies the number of peers in the orderer organizaion. Changing this * will create a new instance. */ readonly ordererNodeNum: pulumi.Output<number>; /** * Specifies the storage capacity of peer organization. Changing this will * create a new instance. * + The minimum storage capacity of `efs` volume type is 500GB. */ readonly orgDiskSize: pulumi.Output<number>; /** * Specifies the password of the couch database. The password consists of 8 to * 26 characters and must consist at least three of following: uppercase letters, lowercase letters, digits, special * characters(!@$%^-_=+[{}]:,./?). Changing this creates a new instance. */ readonly password: pulumi.Output<string>; /** * Specifies an array of one or more Peer organizations to attach to the BCS * instance. Changing this will create a new instance. If omitted, the bcs instance will create a `peerOrgs` * named `organization` by default and the node count is 2. The peerOrgs object structure is documented below. */ readonly peerOrgs: pulumi.Output<outputs.Bcs.InstancePeerOrg[]>; /** * The deployment type of the BCS instance. */ readonly purchaseType: pulumi.Output<string>; /** * Specifies the region in which to create the instance. If omitted, the * provider-level region will be used. Changing this will create a new instance. */ readonly region: pulumi.Output<string>; /** * Specified whether to add RESTful API support. Changing this will * create a new instance. */ readonly restfulApiSupport: pulumi.Output<boolean>; /** * Whether rollback is supported when the BCS service fails to br upgraded. */ readonly rollbackSupport: pulumi.Output<boolean>; /** * Specifies the security mechanism used by the BCS instance. Valid * values are `ECDSA` and `SM2`(Chinese cryptographic algorithms, The basic and professional don't support this * algorithm). Default is `ECDSA`. Changing this will create a new instance. */ readonly securityMechanism: pulumi.Output<string>; /** * Specifies the information about the SFS Turbo file system. Changing this will * create a new instance. The sfsTurbo object structure is documented below. */ readonly sfsTurbo: pulumi.Output<outputs.Bcs.InstanceSfsTurbo | undefined>; /** * The status of the BCS instance. */ readonly status: pulumi.Output<string>; /** * Specified whether to add Trusted computing platform. Changing this will create * a new instance. */ readonly tc3Need: pulumi.Output<boolean>; /** * The service version of the BCS instance. */ readonly version: pulumi.Output<string>; /** * Specifies the storage volume type to attach to each organization of the * BCS instance. Valid values are `nfs` (SFS) and `efs` (SFS Turbo). Changing this will create a new instance. */ readonly volumeType: pulumi.Output<string>; /** * Create a Instance 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: InstanceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Instance resources. */ export interface InstanceState { /** * The agent addresses and port numbers on the user data plane of the BCS service. * * `peer_orgs/pvc_name` - The name of the PersistentVolumeClaim (PVC) used by the peer. * * `peer_orgs/status` - The peer status. The value contains `IsCreating`, `IsUpgrading`, `Adding/IsScaling`, * `Isdeleting`, `Normal`, `AbNormal` and `Unknown`. * * `peer_orgs/status_detail` - The peer status in the format like `1/1`. The denominator is the total number of peers in * the organization, and the numerator is the number of normal peers. * * `peer_orgs/address` - The peer domain name or IP address of the cluster. * * `peer_orgs/address/domain_port` - The domain name address. * * `peer_orgs/address/ip_port` - The IP address. * * `kafka/name` - The Kafka instance name. */ agentPortalAddresses?: pulumi.Input<pulumi.Input<string>[]>; /** * Specifies the configuration of block generation. The blockInfo object * structure is documented below. */ blockInfo?: pulumi.Input<inputs.Bcs.InstanceBlockInfo>; /** * Specifies the blockchain type of the BCS instance. Valid values * are `private` and `union`. Default is `private`. Changing this will create a new instance. */ blockchainType?: pulumi.Input<string>; /** * Specifies the ID of the CCE cluster to attach to the BCS instance. The * BCS service needs to exclusively occupy the CCE cluster. Please make sure that the CCE cluster is not occupied before * deploying the BCS service. Changing this will create a new instance. */ cceClusterId?: pulumi.Input<string>; /** * Specifies an array of one or more channels to attach to the BCS instance. If * omitted, the bcs instance will create a `channels` named `channel` by default. Changing this will create a new * instance. The channels object structure is documented below. */ channels?: pulumi.Input<pulumi.Input<inputs.Bcs.InstanceChannel>[]>; /** * The type of the cluster where the BCS service is deployed. */ clusterType?: pulumi.Input<string>; /** * Specifies the consensus algorithm used by the BCS instance. The valid * values of fabric 1.4 are `solo`, `kafka` and `SFLIC`, and the valid values of fabric 2.0 are `SFLIC` * and `etcdraft`. Changing this will create a new instance. */ consensus?: pulumi.Input<string>; /** * Specifies the NoSQL database used by BCS instance. If omitted, the bcs instance * will create a `goleveldb`(File Database) database by default. This field is required when databaseType is `couchdb`. * Changing this will create a new instance. The couchdb object structure is documented below. */ couchdb?: pulumi.Input<inputs.Bcs.InstanceCouchdb>; /** * Whether the BCS instance is deployed across regions. */ crossRegionSupport?: pulumi.Input<boolean>; /** * Specifies the type of the database used by the BCS service. * Valid values are `goleveldb` and `couchdb`. The default value is `goleveldb`. * If `couchdb` is used, specify the couchdb field. Changing this will create a new instance. */ databaseType?: pulumi.Input<string>; /** * Specified whether to delete the associated OBS bucket when deleting BCS instance. * `deleteObs` is used to delete the OBS created by the BCS instance of the Kafka consensus strategy. Default is false. */ deleteObs?: pulumi.Input<boolean>; /** * Specified whether to delete the associated SFS resources when deleting BCS * instance. Default is false. */ deleteStorage?: pulumi.Input<boolean>; /** * Specifies Service edition of the BCS instance. Valid values are `1`, `2` and `4` * . Changing this will create a new instance. */ edition?: pulumi.Input<number>; /** * Specifies whether to use the EIP of the CCE to bind the BCS instance. * Changing this will create a new instance. Default is true. */ eipEnable?: pulumi.Input<boolean>; /** * Specifies the ID of the enterprise project that the BCS * instance belong to. */ enterpriseProjectId?: pulumi.Input<string>; /** * Specifies version of fabric for the BCS instance. Valid values * are `1.4` and `2.0` * Changing this will create a new instance. */ fabricVersion?: pulumi.Input<string>; /** * Specifies the kafka configuration for the BCS instance. Changing this will create * a new instance. The kafka object structure is documented below. */ kafka?: pulumi.Input<inputs.Bcs.InstanceKafka>; /** * Specifies the name of the channel. Changing this creates a new instance. */ name?: pulumi.Input<string>; /** * The version of an old BCS service. */ oldServiceVersion?: pulumi.Input<string>; /** * Specifies the number of peers in the orderer organizaion. Changing this * will create a new instance. */ ordererNodeNum?: pulumi.Input<number>; /** * Specifies the storage capacity of peer organization. Changing this will * create a new instance. * + The minimum storage capacity of `efs` volume type is 500GB. */ orgDiskSize?: pulumi.Input<number>; /** * Specifies the password of the couch database. The password consists of 8 to * 26 characters and must consist at least three of following: uppercase letters, lowercase letters, digits, special * characters(!@$%^-_=+[{}]:,./?). Changing this creates a new instance. */ password?: pulumi.Input<string>; /** * Specifies an array of one or more Peer organizations to attach to the BCS * instance. Changing this will create a new instance. If omitted, the bcs instance will create a `peerOrgs` * named `organization` by default and the node count is 2. The peerOrgs object structure is documented below. */ peerOrgs?: pulumi.Input<pulumi.Input<inputs.Bcs.InstancePeerOrg>[]>; /** * The deployment type of the BCS instance. */ purchaseType?: pulumi.Input<string>; /** * Specifies the region in which to create the instance. If omitted, the * provider-level region will be used. Changing this will create a new instance. */ region?: pulumi.Input<string>; /** * Specified whether to add RESTful API support. Changing this will * create a new instance. */ restfulApiSupport?: pulumi.Input<boolean>; /** * Whether rollback is supported when the BCS service fails to br upgraded. */ rollbackSupport?: pulumi.Input<boolean>; /** * Specifies the security mechanism used by the BCS instance. Valid * values are `ECDSA` and `SM2`(Chinese cryptographic algorithms, The basic and professional don't support this * algorithm). Default is `ECDSA`. Changing this will create a new instance. */ securityMechanism?: pulumi.Input<string>; /** * Specifies the information about the SFS Turbo file system. Changing this will * create a new instance. The sfsTurbo object structure is documented below. */ sfsTurbo?: pulumi.Input<inputs.Bcs.InstanceSfsTurbo>; /** * The status of the BCS instance. */ status?: pulumi.Input<string>; /** * Specified whether to add Trusted computing platform. Changing this will create * a new instance. */ tc3Need?: pulumi.Input<boolean>; /** * The service version of the BCS instance. */ version?: pulumi.Input<string>; /** * Specifies the storage volume type to attach to each organization of the * BCS instance. Valid values are `nfs` (SFS) and `efs` (SFS Turbo). Changing this will create a new instance. */ volumeType?: pulumi.Input<string>; } /** * The set of arguments for constructing a Instance resource. */ export interface InstanceArgs { /** * Specifies the configuration of block generation. The blockInfo object * structure is documented below. */ blockInfo?: pulumi.Input<inputs.Bcs.InstanceBlockInfo>; /** * Specifies the blockchain type of the BCS instance. Valid values * are `private` and `union`. Default is `private`. Changing this will create a new instance. */ blockchainType?: pulumi.Input<string>; /** * Specifies the ID of the CCE cluster to attach to the BCS instance. The * BCS service needs to exclusively occupy the CCE cluster. Please make sure that the CCE cluster is not occupied before * deploying the BCS service. Changing this will create a new instance. */ cceClusterId: pulumi.Input<string>; /** * Specifies an array of one or more channels to attach to the BCS instance. If * omitted, the bcs instance will create a `channels` named `channel` by default. Changing this will create a new * instance. The channels object structure is documented below. */ channels?: pulumi.Input<pulumi.Input<inputs.Bcs.InstanceChannel>[]>; /** * Specifies the consensus algorithm used by the BCS instance. The valid * values of fabric 1.4 are `solo`, `kafka` and `SFLIC`, and the valid values of fabric 2.0 are `SFLIC` * and `etcdraft`. Changing this will create a new instance. */ consensus: pulumi.Input<string>; /** * Specifies the NoSQL database used by BCS instance. If omitted, the bcs instance * will create a `goleveldb`(File Database) database by default. This field is required when databaseType is `couchdb`. * Changing this will create a new instance. The couchdb object structure is documented below. */ couchdb?: pulumi.Input<inputs.Bcs.InstanceCouchdb>; /** * Specifies the type of the database used by the BCS service. * Valid values are `goleveldb` and `couchdb`. The default value is `goleveldb`. * If `couchdb` is used, specify the couchdb field. Changing this will create a new instance. */ databaseType?: pulumi.Input<string>; /** * Specified whether to delete the associated OBS bucket when deleting BCS instance. * `deleteObs` is used to delete the OBS created by the BCS instance of the Kafka consensus strategy. Default is false. */ deleteObs?: pulumi.Input<boolean>; /** * Specified whether to delete the associated SFS resources when deleting BCS * instance. Default is false. */ deleteStorage?: pulumi.Input<boolean>; /** * Specifies Service edition of the BCS instance. Valid values are `1`, `2` and `4` * . Changing this will create a new instance. */ edition: pulumi.Input<number>; /** * Specifies whether to use the EIP of the CCE to bind the BCS instance. * Changing this will create a new instance. Default is true. */ eipEnable?: pulumi.Input<boolean>; /** * Specifies the ID of the enterprise project that the BCS * instance belong to. */ enterpriseProjectId: pulumi.Input<string>; /** * Specifies version of fabric for the BCS instance. Valid values * are `1.4` and `2.0` * Changing this will create a new instance. */ fabricVersion: pulumi.Input<string>; /** * Specifies the kafka configuration for the BCS instance. Changing this will create * a new instance. The kafka object structure is documented below. */ kafka?: pulumi.Input<inputs.Bcs.InstanceKafka>; /** * Specifies the name of the channel. Changing this creates a new instance. */ name?: pulumi.Input<string>; /** * Specifies the number of peers in the orderer organizaion. Changing this * will create a new instance. */ ordererNodeNum: pulumi.Input<number>; /** * Specifies the storage capacity of peer organization. Changing this will * create a new instance. * + The minimum storage capacity of `efs` volume type is 500GB. */ orgDiskSize: pulumi.Input<number>; /** * Specifies the password of the couch database. The password consists of 8 to * 26 characters and must consist at least three of following: uppercase letters, lowercase letters, digits, special * characters(!@$%^-_=+[{}]:,./?). Changing this creates a new instance. */ password: pulumi.Input<string>; /** * Specifies an array of one or more Peer organizations to attach to the BCS * instance. Changing this will create a new instance. If omitted, the bcs instance will create a `peerOrgs` * named `organization` by default and the node count is 2. The peerOrgs object structure is documented below. */ peerOrgs?: pulumi.Input<pulumi.Input<inputs.Bcs.InstancePeerOrg>[]>; /** * Specifies the region in which to create the instance. If omitted, the * provider-level region will be used. Changing this will create a new instance. */ region?: pulumi.Input<string>; /** * Specified whether to add RESTful API support. Changing this will * create a new instance. */ restfulApiSupport?: pulumi.Input<boolean>; /** * Specifies the security mechanism used by the BCS instance. Valid * values are `ECDSA` and `SM2`(Chinese cryptographic algorithms, The basic and professional don't support this * algorithm). Default is `ECDSA`. Changing this will create a new instance. */ securityMechanism?: pulumi.Input<string>; /** * Specifies the information about the SFS Turbo file system. Changing this will * create a new instance. The sfsTurbo object structure is documented below. */ sfsTurbo?: pulumi.Input<inputs.Bcs.InstanceSfsTurbo>; /** * Specified whether to add Trusted computing platform. Changing this will create * a new instance. */ tc3Need?: pulumi.Input<boolean>; /** * Specifies the storage volume type to attach to each organization of the * BCS instance. Valid values are `nfs` (SFS) and `efs` (SFS Turbo). Changing this will create a new instance. */ volumeType: pulumi.Input<string>; }