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_id
required - string -
computer_name
optional computed - string -
directory_id
required - string -
id
optional computed - string -
ip_address
optional computed - string -
root_volume_encryption_enabled
optional - bool -
state
optional computed - string -
tags
optional - map from string to string -
user_name
required - string -
user_volume_encryption_enabled
optional - bool -
volume_encryption_key
optional - string -
timeouts
single block -
workspace_properties
list block-
compute_type_name
optional - string -
root_volume_size_gib
optional - number -
running_mode
optional - string -
running_mode_auto_stop_timeout_in_minutes
optional computed - number -
user_volume_size_gib
optional - number
-
Explanation in Terraform Registry
Provides a workspace in AWS Workspaces Service
NOTE: AWS WorkSpaces service requires
workspaces_DefaultRole
IAM 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
-
BundleId
required - String -
DirectoryId
required - String -
RootVolumeEncryptionEnabled
optional - Boolean -
Tags
optional - List of Tag -
UserName
required - String -
UserVolumeEncryptionEnabled
optional - Boolean -
VolumeEncryptionKey
optional - String -
WorkspaceProperties
optional - WorkspaceProperties
Explanation in CloudFormation Registry
The
AWS::WorkSpaces::Workspace
resource specifies a WorkSpace.Updates are not supported for the
BundleId
,RootVolumeEncryptionEnabled
,UserVolumeEncryptionEnabled
, orVolumeEncryptionKey
properties. To update these properties, you must also update a property that triggers a replacement, such as theUserName
property.
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.