Resource: awsWorkspacesWorkspace
Provides a workspace in AWS Workspaces Service
\~> NOTE: AWS WorkSpaces service requires workspacesDefaultRole
IAM role to operate normally.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const dataAwsWorkspacesBundleValueWindows10 =
new aws.dataAwsWorkspacesBundle.DataAwsWorkspacesBundle(
this,
"value_windows_10",
{
bundleId: "wsb-bh8rsxt14",
}
);
new aws.workspacesWorkspace.WorkspacesWorkspace(this, "example", {
bundleId: dataAwsWorkspacesBundleValueWindows10.id,
directoryId: "${aws_workspaces_directory.example.id}",
rootVolumeEncryptionEnabled: true,
tags: {
Department: "IT",
},
userName: "john.doe",
userVolumeEncryptionEnabled: true,
volumeEncryptionKey: "alias/aws/workspaces",
workspaceProperties: {
computeTypeName: "VALUE",
rootVolumeSizeGib: 80,
runningMode: "AUTO_STOP",
runningModeAutoStopTimeoutInMinutes: 60,
userVolumeSizeGib: 10,
},
});
Argument Reference
The following arguments are supported:
directoryId
- (Required) The ID of the directory for the WorkSpace.bundleId
- (Required) The ID of the bundle for the WorkSpace.userName
– (Required) The user name of the user for the WorkSpace. This user name must exist in the directory for the WorkSpace.rootVolumeEncryptionEnabled
- (Optional) Indicates whether the data stored on the root volume is encrypted.userVolumeEncryptionEnabled
– (Optional) Indicates whether the data stored on the user volume is encrypted.volumeEncryptionKey
– (Optional) The symmetric AWS KMS customer master key (CMK) used to encrypt data stored on your WorkSpace. Amazon WorkSpaces does not support asymmetric CMKs.tags
- (Optional) The tags for the WorkSpace. If configured with a providerdefaultTags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.workspaceProperties
– (Optional) The WorkSpace properties.
workspaceProperties
supports the following:
computeTypeName
– (Optional) The compute type. For more information, see Amazon WorkSpaces Bundles. Valid values arevalue
,standard
,performance
,power
,graphics
,powerpro
,graphicspro
,GRAPHICS_G4DN
, andGRAPHICSPRO_G4DN
.rootVolumeSizeGib
– (Optional) The size of the root volume.runningMode
– (Optional) The running mode. For more information, see Manage the WorkSpace Running Mode. Valid values areAUTO_STOP
andALWAYS_ON
.runningModeAutoStopTimeoutInMinutes
– (Optional) The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60-minute intervals.userVolumeSizeGib
– (Optional) The size of the user storage.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- The workspaces ID.ipAddress
- The IP address of the WorkSpace.computerName
- The name of the WorkSpace, as seen by the operating system.state
- The operational state of the WorkSpace.tagsAll
- A map of tags assigned to the resource, including those inherited from the providerdefaultTags
configuration block.
Timeouts
create
- (Default30M
)update
- (Default10M
)delete
- (Default10M
)
Import
Workspaces can be imported using their ID, e.g.,