Skip to content

Commit

Permalink
Sort out tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Tensho committed Dec 14, 2020
1 parent 50229c2 commit ea0fde4
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions aws/resource_aws_workspaces_workspace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ func TestAccAwsWorkspacesWorkspace_basic(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "workspace_properties.0.running_mode", workspaces.RunningModeAlwaysOn),
resource.TestCheckResourceAttr(resourceName, "workspace_properties.0.running_mode_auto_stop_timeout_in_minutes", "0"),
resource.TestCheckResourceAttr(resourceName, "workspace_properties.0.user_volume_size_gib", "10"),
resource.TestCheckResourceAttr(resourceName, "tags.%", "0"),
resource.TestCheckResourceAttr(resourceName, "tags.%", "1"),
resource.TestCheckResourceAttr(resourceName, "tags.Name", fmt.Sprintf("tf-testacc-workspaces-workspace-%[1]s", rName)),
),
},
{
Expand Down Expand Up @@ -544,7 +545,9 @@ resource "aws_workspaces_workspace" "test" {
}

func testAccWorkspacesWorkspaceConfig_WorkspacePropertiesC(rName string) string {
return testAccAwsWorkspacesWorkspaceConfig_Prerequisites(rName) + `
return composeConfig(
testAccAwsWorkspacesWorkspaceConfig_Prerequisites(rName),
fmt.Sprintf(`
resource "aws_workspaces_workspace" "test" {
bundle_id = data.aws_workspaces_bundle.test.id
directory_id = aws_workspaces_directory.test.id
Expand All @@ -555,8 +558,12 @@ resource "aws_workspaces_workspace" "test" {
workspace_properties {
}
tags = {
Name = "tf-testacc-workspaces-workspace-%[1]s"
}
}
`
`, rName))
}

func testAccWorkspacesWorkspaceConfig_validateRootVolumeSize(rName string) string {
Expand Down

0 comments on commit ea0fde4

Please sign in to comment.