包括' RunningMode'在CloudFormation模板中部署AWS Workspaces

时间:2017-12-19 07:57:37

标签: amazon-web-services amazon-cloudformation

我目前正在进行概念验证,其中还包括使用CloudFormation部署AWS Workspaces。因此,我想添加RunningMode(可以使用' AutoStop'或' AlwaysOn')作为参数。到目前为止,我无法弄清楚如何将其包含在CloudFormation模板中。有什么想法吗?

干杯,多米尼克

当前模板(简体):

{
  "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)

1 个答案:

答案 0 :(得分:1)

我刚刚发现,您现在可以指定的值

RunningMode: RunningModeAutoStopTimeoutInMinutes:

在Cloudformation模板中。

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