AWS WorkSpaces Workspace
This page shows how to write Terraform and CloudFormation for WorkSpaces Workspace and write them securely.
aws_workspaces_workspace (Terraform)
The Workspace in WorkSpaces can be configured in Terraform with the resource name aws_workspaces_workspace. The following sections describe 5 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_workspaces_workspace" "pass" {
directory_id = aws_workspaces_directory.main.id
bundle_id = data.aws_workspaces_bundle.bundle.id
user_name = var.user_name
user_volume_encryption_enabled = true
resource "aws_workspaces_workspace" "pass" {
directory_id = aws_workspaces_directory.main.id
bundle_id = data.aws_workspaces_bundle.bundle.id
user_name = var.user_name
root_volume_encryption_enabled = true
resource "aws_workspaces_workspace" "pass" {
directory_id = aws_workspaces_directory.main.id
bundle_id = data.aws_workspaces_bundle.bundle.id
user_name = var.user_name
user_volume_encryption_enabled = true
resource "aws_workspaces_workspace" "pass" {
directory_id = aws_workspaces_directory.main.id
bundle_id = data.aws_workspaces_bundle.bundle.id
user_name = var.user_name
root_volume_encryption_enabled = true
resource "aws_workspaces_workspace" "pass" {
directory_id = aws_workspaces_directory.main.id
bundle_id = data.aws_workspaces_bundle.bundle.id
user_name = var.user_name
user_volume_encryption_enabled = true
Parameters
-
bundle_idrequired - string -
computer_nameoptional computed - string -
directory_idrequired - string -
idoptional computed - string -
ip_addressoptional computed - string -
root_volume_encryption_enabledoptional - bool -
stateoptional computed - string -
tagsoptional - map from string to string -
user_namerequired - string -
user_volume_encryption_enabledoptional - bool -
volume_encryption_keyoptional - string -
timeoutssingle block -
workspace_propertieslist block-
compute_type_nameoptional - string -
root_volume_size_giboptional - number -
running_modeoptional - string -
running_mode_auto_stop_timeout_in_minutesoptional computed - number -
user_volume_size_giboptional - number
-
Explanation in Terraform Registry
Provides a workspace in AWS Workspaces Service
NOTE: AWS WorkSpaces service requires
workspaces_DefaultRoleIAM role to operate normally.
AWS::WorkSpaces::Workspace (CloudFormation)
The Workspace in WorkSpaces can be configured in CloudFormation with the resource name AWS::WorkSpaces::Workspace. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
-
BundleIdrequired - String -
DirectoryIdrequired - String -
RootVolumeEncryptionEnabledoptional - Boolean -
Tagsoptional - List of Tag -
UserNamerequired - String -
UserVolumeEncryptionEnabledoptional - Boolean -
VolumeEncryptionKeyoptional - String -
WorkspacePropertiesoptional - WorkspaceProperties
Explanation in CloudFormation Registry
The
AWS::WorkSpaces::Workspaceresource specifies a WorkSpace.Updates are not supported for the
BundleId,RootVolumeEncryptionEnabled,UserVolumeEncryptionEnabled, orVolumeEncryptionKeyproperties. To update these properties, you must also update a property that triggers a replacement, such as theUserNameproperty.
Frequently asked questions
What is AWS WorkSpaces Workspace?
AWS WorkSpaces Workspace is a resource for WorkSpaces of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.
Where can I find the example code for the AWS WorkSpaces Workspace?
For Terraform, the sprathod369/iac-example, sprathod369/iac-example and SnidermanIndustries/checkov-fork source code examples are useful. See the Terraform Example section for further details.