简体   繁体   中英

Include 'RunningMode' in CloudFormation template to deploy AWS Workspaces

I am currently working on a proof of concept which also covers the deployment of AWS Workspaces using CloudFormation. Therefore, I'd like to add the RunningMode (Either 'AutoStop' or 'AlwaysOn') as parameter. So far I was not able to figure out how to include this into the CloudFormation template. Any ideas?

Cheers, Dominik

Current template (Simplified):

{
  "Parameters": {
    "UserName": {
      "Type": "String",
      "Default": "test_user"
    }
  },
  "AWSTemplateFormatVersion": "2010-09-09",
  "Resources": {
    "TestWorkspace1": {
      "Type": "AWS::WorkSpaces::Workspace",
      "Properties": {
        "BundleId": "<BUNDLE_ID>",
        "DirectoryId": "<DIRECTORY_ID>",
        "UserName": {
          "Ref": "UserName"
        },
        "RootVolumeEncryptionEnabled": false,
        "UserVolumeEncryptionEnabled": false
      }
    }
  },
  "Outputs": {
    "Username": {
      "Value": {
        "Fn::Join": [
          "",
          [
            {
              "Ref": "UserName"
            }
          ]
        ]
      },
      "Description": "Workspaces Username"
    },
    "StaticMessage": {
      "Value": "In case of first usage, you will receive a initial password for the Amazon Workspaces Client separately, once the workspace has been created.",
      "Description": "Workspaces note"
    }
  }
}

Question in AWS-Forum (Duplicate)

I just discoverd, that you can now specify the values for

RunningMode: RunningModeAutoStopTimeoutInMinutes:

in Cloudformation Templates.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-workspaces-workspace-workspaceproperties.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM