@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
300 lines (299 loc) • 13.4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs } from "../types";
/**
* Manages a dedicated microservice instance resource within HuaweiCloud.
*
* > Before creating a configuration, make sure the engine has enabled the rules shown in the appendix
* table.
*
* ## Example Usage
* ## Appendix
*
* <a name="microserviceInstanceDefaultEngineAccessRules"></a>
* Security group rules required to access the engine:
* (Remote is not the minimum range and can be adjusted according to business needs)
*
* | Direction | Priority | Action | Protocol | Ports | Ethertype | Remote |
* | --------- | -------- | ------ | -------- | ------------- | --------- | --------------------- |
* | Ingress | 1 | Allow | ICMP | All | Ipv6 | ::/0 |
* | Ingress | 1 | Allow | TCP | 30100-30130 | Ipv6 | ::/0 |
* | Ingress | 1 | Allow | All | All | Ipv6 | cse-engine-default-sg |
* | Ingress | 1 | Allow | ICMP | All | Ipv4 | 0.0.0.0/0 |
* | Ingress | 1 | Allow | TCP | 30100-30130 | Ipv4 | 0.0.0.0/0 |
* | Ingress | 1 | Allow | All | All | Ipv4 | cse-engine-default-sg |
* | Egress | 100 | Allow | All | All | Ipv6 | ::/0 |
* | Egress | 100 | Allow | All | All | Ipv4 | 0.0.0.0/0 |
*
* ## Import
*
* Microservice instances can be imported using related `auth_address`, `connect_address`, `microservice_id` and their `id`, separated by the slashes (/), e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Cse/microserviceInstance:MicroserviceInstance test <auth_address>/<connect_address>/<microservice_id>/<id>
* ```
*
* If you enabled the **RBAC** authorization in the microservice engine, it's necessary to provide the account name (`admin_user`) and password (`admin_pass`) of the microservice engine. All fields separated by the slashes (/), e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Cse/microserviceInstance:MicroserviceInstance test <auth_address>/<connect_address>/<microservice_id>/<id>/<admin_user>/<admin_pass>
* ```
*
* The single quotes (') or backslashes (\\) can help you solve the problem of special characters reporting errors on bash. bash
*
* ```sh
* $ pulumi import huaweicloud:Cse/microserviceInstance:MicroserviceInstance test https://124.70.26.32:30100/https://124.70.26.32:30100/f14960ba495e03f59f85aacaaafbdef3fbff3f0d/336e7428dd9411eca913fa163e7364b7/root/Test\!123
* ```
*
* bash
*
* ```sh
* $ pulumi import huaweicloud:Cse/microserviceInstance:MicroserviceInstance test 'https://124.70.26.32:30100/https://124.70.26.32:30100/f14960ba495e03f59f85aacaaafbdef3fbff3f0d/336e7428dd9411eca913fa163e7364b7/root/Test!123'
* ```
*/
export declare class MicroserviceInstance extends pulumi.CustomResource {
/**
* Get an existing MicroserviceInstance 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?: MicroserviceInstanceState, opts?: pulumi.CustomResourceOptions): MicroserviceInstance;
/**
* Returns true if the given object is an instance of MicroserviceInstance. 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 MicroserviceInstance;
/**
* Specifies the account password.
* Required if the `authType` of engine is **RBAC**. Changing this will create a new microservice instance.
* The password format must meet the following conditions:
* + Must be `8` to `32` characters long.
* + A password must contain at least one digit, one uppercase letter, one lowercase letter, and one special character
* (-~!@#%^*_=+?$&()|<>{}[]).
* + Cannot be the account name or account name spelled backwards.
* + The password can only start with a letter.
*/
readonly adminPass: pulumi.Output<string | undefined>;
/**
* Specifies the account name. The initial account name is **root**.
* Required if the `authType` of engine is **RBAC**. Changing this will create a new microservice instance.
*/
readonly adminUser: pulumi.Output<string | undefined>;
/**
* Specifies the address that used to request the access token.
* Usually is the connection address of service center.
* Changing this will create a new resource.
*/
readonly authAddress: pulumi.Output<string>;
/**
* Specifies the address that used to access engine and manages
* microservice instance.
* Usually is the connection address of service center.
* Changing this will create a new resource.
*/
readonly connectAddress: pulumi.Output<string>;
/**
* Specifies the data center configuration.
* The object structure is documented below.
* Changing this will create a new microservice instance.
*/
readonly dataCenter: pulumi.Output<outputs.Cse.MicroserviceInstanceDataCenter>;
/**
* Specifies the access addresses information.
* Changing this will create a new microservice instance.
*/
readonly endpoints: pulumi.Output<string[]>;
/**
* Specifies the health check configuration.
* The object structure is documented below.
* Changing this will create a new microservice instance.
*/
readonly healthCheck: pulumi.Output<outputs.Cse.MicroserviceInstanceHealthCheck>;
/**
* Specifies the host name, such as `localhost`.
* Changing this will create a new microservice instance.
*/
readonly hostName: pulumi.Output<string>;
/**
* Specifies the ID of the dedicated microservice to which the instance
* belongs. Changing this will create a new microservice instance.
*/
readonly microserviceId: pulumi.Output<string>;
/**
* Specifies the extended attributes.
* Changing this will create a new microservice instance.
*/
readonly properties: pulumi.Output<{
[key: string]: string;
}>;
/**
* The microservice instance status. The values supports **UP**, **DOWN**, **STARTING** and **OUTOFSERVICE**.
*/
readonly status: pulumi.Output<string>;
/**
* Specifies the version of the dedicated microservice instance.
* Changing this will create a new microservice instance.
*/
readonly version: pulumi.Output<string>;
/**
* Create a MicroserviceInstance 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: MicroserviceInstanceArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering MicroserviceInstance resources.
*/
export interface MicroserviceInstanceState {
/**
* Specifies the account password.
* Required if the `authType` of engine is **RBAC**. Changing this will create a new microservice instance.
* The password format must meet the following conditions:
* + Must be `8` to `32` characters long.
* + A password must contain at least one digit, one uppercase letter, one lowercase letter, and one special character
* (-~!@#%^*_=+?$&()|<>{}[]).
* + Cannot be the account name or account name spelled backwards.
* + The password can only start with a letter.
*/
adminPass?: pulumi.Input<string>;
/**
* Specifies the account name. The initial account name is **root**.
* Required if the `authType` of engine is **RBAC**. Changing this will create a new microservice instance.
*/
adminUser?: pulumi.Input<string>;
/**
* Specifies the address that used to request the access token.
* Usually is the connection address of service center.
* Changing this will create a new resource.
*/
authAddress?: pulumi.Input<string>;
/**
* Specifies the address that used to access engine and manages
* microservice instance.
* Usually is the connection address of service center.
* Changing this will create a new resource.
*/
connectAddress?: pulumi.Input<string>;
/**
* Specifies the data center configuration.
* The object structure is documented below.
* Changing this will create a new microservice instance.
*/
dataCenter?: pulumi.Input<inputs.Cse.MicroserviceInstanceDataCenter>;
/**
* Specifies the access addresses information.
* Changing this will create a new microservice instance.
*/
endpoints?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the health check configuration.
* The object structure is documented below.
* Changing this will create a new microservice instance.
*/
healthCheck?: pulumi.Input<inputs.Cse.MicroserviceInstanceHealthCheck>;
/**
* Specifies the host name, such as `localhost`.
* Changing this will create a new microservice instance.
*/
hostName?: pulumi.Input<string>;
/**
* Specifies the ID of the dedicated microservice to which the instance
* belongs. Changing this will create a new microservice instance.
*/
microserviceId?: pulumi.Input<string>;
/**
* Specifies the extended attributes.
* Changing this will create a new microservice instance.
*/
properties?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The microservice instance status. The values supports **UP**, **DOWN**, **STARTING** and **OUTOFSERVICE**.
*/
status?: pulumi.Input<string>;
/**
* Specifies the version of the dedicated microservice instance.
* Changing this will create a new microservice instance.
*/
version?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a MicroserviceInstance resource.
*/
export interface MicroserviceInstanceArgs {
/**
* Specifies the account password.
* Required if the `authType` of engine is **RBAC**. Changing this will create a new microservice instance.
* The password format must meet the following conditions:
* + Must be `8` to `32` characters long.
* + A password must contain at least one digit, one uppercase letter, one lowercase letter, and one special character
* (-~!@#%^*_=+?$&()|<>{}[]).
* + Cannot be the account name or account name spelled backwards.
* + The password can only start with a letter.
*/
adminPass?: pulumi.Input<string>;
/**
* Specifies the account name. The initial account name is **root**.
* Required if the `authType` of engine is **RBAC**. Changing this will create a new microservice instance.
*/
adminUser?: pulumi.Input<string>;
/**
* Specifies the address that used to request the access token.
* Usually is the connection address of service center.
* Changing this will create a new resource.
*/
authAddress?: pulumi.Input<string>;
/**
* Specifies the address that used to access engine and manages
* microservice instance.
* Usually is the connection address of service center.
* Changing this will create a new resource.
*/
connectAddress: pulumi.Input<string>;
/**
* Specifies the data center configuration.
* The object structure is documented below.
* Changing this will create a new microservice instance.
*/
dataCenter?: pulumi.Input<inputs.Cse.MicroserviceInstanceDataCenter>;
/**
* Specifies the access addresses information.
* Changing this will create a new microservice instance.
*/
endpoints: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the health check configuration.
* The object structure is documented below.
* Changing this will create a new microservice instance.
*/
healthCheck?: pulumi.Input<inputs.Cse.MicroserviceInstanceHealthCheck>;
/**
* Specifies the host name, such as `localhost`.
* Changing this will create a new microservice instance.
*/
hostName: pulumi.Input<string>;
/**
* Specifies the ID of the dedicated microservice to which the instance
* belongs. Changing this will create a new microservice instance.
*/
microserviceId: pulumi.Input<string>;
/**
* Specifies the extended attributes.
* Changing this will create a new microservice instance.
*/
properties?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies the version of the dedicated microservice instance.
* Changing this will create a new microservice instance.
*/
version?: pulumi.Input<string>;
}