@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
375 lines (374 loc) • 15.4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs } from "../types";
/**
* Use this resource to register or unregister the Workspace service in HuaweiCloud.
*
* > **NOTE:** Only one resource can be created in a region.
*
* ## Example Usage
* ### Register the Workspace service and use local authentication
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const vpcId = config.requireObject("vpcId");
* const networkIds = config.requireObject("networkIds");
* const test = new huaweicloud.workspace.Service("test", {
* accessMode: "INTERNET",
* vpcId: vpcId,
* networkIds: networkIds,
* otpConfigInfo: {
* enable: true,
* receiveMode: "VMFA",
* ruleType: "ACCESS_MODE",
* rule: "PRIVATE",
* },
* });
* ```
* ## Appendix
*
* <a name="secgroupRulesForAdDomainConnection"></a>
* If a firewall is deployed between Windows AD and the Workspace service, you need to open the following ports on the
* firewall for the desktops of Workspace service to connect to Windows AD or DNS:
*
* | Protocol | Ports | Usage |
* | ---- | ---- | ---- |
* | TCP | 135 | RPC protocol (required for LDAP, Distributed File System, and Distributed File Replication) |
* | UDP | 137 | NetBIOS name resolution (required by the network login service) |
* | UDP | 138 | NetBIOS datagram service (distributed file system, network login and other services need to use this port) |
* | TCP | 139 | NetBIOS-SSN Service (Network Basic I/O Interface) |
* | TCP | 445 | NetBIOS-SSN Service (Network Basic I/O Interface) |
* | UDP | 445 | NetBIOS-SSN Service (Network Basic I/O Interface) |
* | TCP | 49152-65535 | RPC dynamic ports (ports that are not hardened and open by AD. If AD is hardened, ports 50152-51151 need to be opened) |
* | UDP | 49152-65535 | RPC dynamic ports (ports that are not hardened and open by AD. If AD is hardened, ports 50152-51151 need to be opened) |
* | TCP | 88 | Kerberos Key Distribution Center Service |
* | UDP | 88 | Kerberos Key Distribution Center Service |
* | UDP | 123 | Port used by NTP service |
* | TCP | 389 | LDAP server |
* | UDP | 389 | LDAP server |
* | TCP | 464 | Kerberos authentication protocol |
* | UDP | 464 | Kerberos Authentication Protocol |
* | UDP | 500 | isakmp |
* | TCP | 593 | RPC over HTTP |
* | TCP | 636 | LDAP SSL |
* | TCP | 53 | DNS server |
* | UDP | 53 | DNS server |
*
* ## Import
*
* Service can be imported using the `id`, e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Workspace/service:Service test <id>
* ```
*
* 'NA' or other characters can be used to instead of the `id`. bash
*
* ```sh
* $ pulumi import huaweicloud:Workspace/service:Service test NA
* ```
*/
export declare class Service extends pulumi.CustomResource {
/**
* Get an existing Service 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?: ServiceState, opts?: pulumi.CustomResourceOptions): Service;
/**
* Returns true if the given object is an instance of Service. 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 Service;
/**
* Specifies the access mode of Workspace service.
* The valid values are as follows:
* + **INTERNET**: internet access.
* + **DEDICATED**: dedicated line access.
* + **BOTH**: both internet access and dedicated access are supported.
*/
readonly accessMode: pulumi.Output<string>;
/**
* Specifies the configuration of AD domain.
* Required if `authType` is **LOCAL_AD**. Make sure that the selected VPC network and the network to which AD
* belongs can be connected. The object structure is documented below.
*/
readonly adDomain: pulumi.Output<outputs.Workspace.ServiceAdDomain>;
/**
* Specifies the authentication type of Workspace service.
* The valid values are as follows:
* + **LITE_AS**: Local authentication.
* + **LOCAL_AD**: Connect to AD domain.
*/
readonly authType: pulumi.Output<string | undefined>;
/**
* The subnet segments of the dedicated access.
*/
readonly dedicatedSubnets: pulumi.Output<string[]>;
/**
* The desktop security group automatically created under the specified VPC after the service
* is registered. The object structure is documented below.
*/
readonly desktopSecurityGroups: pulumi.Output<outputs.Workspace.ServiceDesktopSecurityGroup[]>;
/**
* Specifies the enterprise ID.
* The enterprise ID is the unique identification in the Workspace service.
* If omitted, the system will automatically generate an enterprise ID.
* The ID can contain `1` to `32` characters, only letters, digits, hyphens (-) and underscores (_) are allowed.
*/
readonly enterpriseId: pulumi.Output<string>;
/**
* The management component security group automatically created under the specified
* VPC after the service is registered. The object structure is documented below.
*/
readonly infrastructureSecurityGroups: pulumi.Output<outputs.Workspace.ServiceInfrastructureSecurityGroup[]>;
/**
* The internet access address.
* This attribute is returned only when the accessMode is **INTERNET** or **BOTH**.
*/
readonly internetAccessAddress: pulumi.Output<string>;
/**
* Specifies the internet access port.
* The valid value is range from `1,025` to `65,535`.
*/
readonly internetAccessPort: pulumi.Output<number>;
/**
* Whether the Workspace service is locked. The valid values are as follows:
* + **0**: Indicates not locked.
* + **1**: Indicates locked.
*/
readonly isLocked: pulumi.Output<number>;
/**
* Specifies whether to allow the provider to automatically unlock locked service
* when it is running. The default value is **false**.
*/
readonly lockEnabled: pulumi.Output<boolean | undefined>;
/**
* The reason of the Workspace service is locked.
*/
readonly lockReason: pulumi.Output<string>;
/**
* The time of the Workspace service is locked.
*/
readonly lockTime: pulumi.Output<string>;
/**
* The subnet segment of the management component.
*/
readonly managementSubnetCidr: pulumi.Output<string>;
/**
* The network ID list of subnets that the service have.
* The subnets corresponding to this parameter must be included in the VPC resource corresponding to `vpcId`.
* These subnet segments cannot conflict with `172.16.0.0/12`.
*/
readonly networkIds: pulumi.Output<string[]>;
/**
* Specifies the configuration of auxiliary authentication.
* The object structure is documented below.
*/
readonly otpConfigInfo: pulumi.Output<outputs.Workspace.ServiceOtpConfigInfo | undefined>;
/**
* The region in which to register the Workspace service.
* If omitted, the provider-level region will be used. Changing this will create a new resource.
*/
readonly region: pulumi.Output<string>;
/**
* The current status of the Workspace service.
*/
readonly status: pulumi.Output<string>;
/**
* Specifies the VPC ID to which the service belongs.
* Changing this will create a new resource.
*/
readonly vpcId: pulumi.Output<string>;
/**
* Create a Service 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: ServiceArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Service resources.
*/
export interface ServiceState {
/**
* Specifies the access mode of Workspace service.
* The valid values are as follows:
* + **INTERNET**: internet access.
* + **DEDICATED**: dedicated line access.
* + **BOTH**: both internet access and dedicated access are supported.
*/
accessMode?: pulumi.Input<string>;
/**
* Specifies the configuration of AD domain.
* Required if `authType` is **LOCAL_AD**. Make sure that the selected VPC network and the network to which AD
* belongs can be connected. The object structure is documented below.
*/
adDomain?: pulumi.Input<inputs.Workspace.ServiceAdDomain>;
/**
* Specifies the authentication type of Workspace service.
* The valid values are as follows:
* + **LITE_AS**: Local authentication.
* + **LOCAL_AD**: Connect to AD domain.
*/
authType?: pulumi.Input<string>;
/**
* The subnet segments of the dedicated access.
*/
dedicatedSubnets?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The desktop security group automatically created under the specified VPC after the service
* is registered. The object structure is documented below.
*/
desktopSecurityGroups?: pulumi.Input<pulumi.Input<inputs.Workspace.ServiceDesktopSecurityGroup>[]>;
/**
* Specifies the enterprise ID.
* The enterprise ID is the unique identification in the Workspace service.
* If omitted, the system will automatically generate an enterprise ID.
* The ID can contain `1` to `32` characters, only letters, digits, hyphens (-) and underscores (_) are allowed.
*/
enterpriseId?: pulumi.Input<string>;
/**
* The management component security group automatically created under the specified
* VPC after the service is registered. The object structure is documented below.
*/
infrastructureSecurityGroups?: pulumi.Input<pulumi.Input<inputs.Workspace.ServiceInfrastructureSecurityGroup>[]>;
/**
* The internet access address.
* This attribute is returned only when the accessMode is **INTERNET** or **BOTH**.
*/
internetAccessAddress?: pulumi.Input<string>;
/**
* Specifies the internet access port.
* The valid value is range from `1,025` to `65,535`.
*/
internetAccessPort?: pulumi.Input<number>;
/**
* Whether the Workspace service is locked. The valid values are as follows:
* + **0**: Indicates not locked.
* + **1**: Indicates locked.
*/
isLocked?: pulumi.Input<number>;
/**
* Specifies whether to allow the provider to automatically unlock locked service
* when it is running. The default value is **false**.
*/
lockEnabled?: pulumi.Input<boolean>;
/**
* The reason of the Workspace service is locked.
*/
lockReason?: pulumi.Input<string>;
/**
* The time of the Workspace service is locked.
*/
lockTime?: pulumi.Input<string>;
/**
* The subnet segment of the management component.
*/
managementSubnetCidr?: pulumi.Input<string>;
/**
* The network ID list of subnets that the service have.
* The subnets corresponding to this parameter must be included in the VPC resource corresponding to `vpcId`.
* These subnet segments cannot conflict with `172.16.0.0/12`.
*/
networkIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the configuration of auxiliary authentication.
* The object structure is documented below.
*/
otpConfigInfo?: pulumi.Input<inputs.Workspace.ServiceOtpConfigInfo>;
/**
* The region in which to register the Workspace service.
* If omitted, the provider-level region will be used. Changing this will create a new resource.
*/
region?: pulumi.Input<string>;
/**
* The current status of the Workspace service.
*/
status?: pulumi.Input<string>;
/**
* Specifies the VPC ID to which the service belongs.
* Changing this will create a new resource.
*/
vpcId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Service resource.
*/
export interface ServiceArgs {
/**
* Specifies the access mode of Workspace service.
* The valid values are as follows:
* + **INTERNET**: internet access.
* + **DEDICATED**: dedicated line access.
* + **BOTH**: both internet access and dedicated access are supported.
*/
accessMode: pulumi.Input<string>;
/**
* Specifies the configuration of AD domain.
* Required if `authType` is **LOCAL_AD**. Make sure that the selected VPC network and the network to which AD
* belongs can be connected. The object structure is documented below.
*/
adDomain?: pulumi.Input<inputs.Workspace.ServiceAdDomain>;
/**
* Specifies the authentication type of Workspace service.
* The valid values are as follows:
* + **LITE_AS**: Local authentication.
* + **LOCAL_AD**: Connect to AD domain.
*/
authType?: pulumi.Input<string>;
/**
* The subnet segments of the dedicated access.
*/
dedicatedSubnets?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the enterprise ID.
* The enterprise ID is the unique identification in the Workspace service.
* If omitted, the system will automatically generate an enterprise ID.
* The ID can contain `1` to `32` characters, only letters, digits, hyphens (-) and underscores (_) are allowed.
*/
enterpriseId?: pulumi.Input<string>;
/**
* Specifies the internet access port.
* The valid value is range from `1,025` to `65,535`.
*/
internetAccessPort?: pulumi.Input<number>;
/**
* Specifies whether to allow the provider to automatically unlock locked service
* when it is running. The default value is **false**.
*/
lockEnabled?: pulumi.Input<boolean>;
/**
* The subnet segment of the management component.
*/
managementSubnetCidr?: pulumi.Input<string>;
/**
* The network ID list of subnets that the service have.
* The subnets corresponding to this parameter must be included in the VPC resource corresponding to `vpcId`.
* These subnet segments cannot conflict with `172.16.0.0/12`.
*/
networkIds: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the configuration of auxiliary authentication.
* The object structure is documented below.
*/
otpConfigInfo?: pulumi.Input<inputs.Workspace.ServiceOtpConfigInfo>;
/**
* The region in which to register the Workspace service.
* If omitted, the provider-level region will be used. Changing this will create a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the VPC ID to which the service belongs.
* Changing this will create a new resource.
*/
vpcId: pulumi.Input<string>;
}