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

main.tf#L1
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
main.tf#L1
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
main.tf#L1
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
main.tf#L1
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
main.tf#L1
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

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

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

Explanation in CloudFormation Registry

The AWS::WorkSpaces::Workspace resource specifies a WorkSpace.

Updates are not supported for the BundleId, RootVolumeEncryptionEnabled, UserVolumeEncryptionEnabled, or VolumeEncryptionKey properties. To update these properties, you must also update a property that triggers a replacement, such as the UserName 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.