Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serializes WorkSpaces Directory tests #11505

Merged
merged 2 commits into from
Jan 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions aws/resource_aws_workspaces_directory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,21 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/terraform"
)

func TestAccAwsWorkspacesDirectory_basic(t *testing.T) {
// These tests need to be serialized, because they all rely on the IAM Role `workspaces_DefaultRole`.
func TestAccAwsWorkspacesDirectory(t *testing.T) {
testCases := map[string]func(t *testing.T){
"basic": testAccAwsWorkspacesDirectory_basic,
"subnetIds": testAccAwsWorkspacesDirectory_subnetIds,
}
for name, tc := range testCases {
tc := tc
t.Run(name, func(t *testing.T) {
tc(t)
})
}
}

func testAccAwsWorkspacesDirectory_basic(t *testing.T) {
booster := acctest.RandString(8)
resourceName := "aws_workspaces_directory.main"

Expand Down Expand Up @@ -75,7 +89,7 @@ func TestAccAwsWorkspacesDirectory_basic(t *testing.T) {
})
}

func TestAccAwsWorkspacesDirectory_subnetIds(t *testing.T) {
func testAccAwsWorkspacesDirectory_subnetIds(t *testing.T) {
booster := acctest.RandString(8)
resourceName := "aws_workspaces_directory.main"

Expand Down
24 changes: 12 additions & 12 deletions website/docs/r/workspaces_directory.html.markdown
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
subcategory: "Workspaces"
subcategory: "WorkSpaces"
layout: "aws"
page_title: "AWS: aws_workspaces_directory"
description: |-
Provides a directory registration in AWS Workspaces Service.
Provides a directory registration in AWS WorkSpaces Service.
---

# Resource: aws_workspaces_directory

Provides a directory registration in AWS Workspaces Service
Provides a directory registration in AWS WorkSpaces Service

## Example Usage

Expand Down Expand Up @@ -53,24 +53,24 @@ resource "aws_workspaces_directory" "main" {

The following arguments are supported:

* `directory_id` - (Required) The directory identifier for registration in Workspaces service.
* `subnet_ids` - (Optional) The identifiers of the subnets where the directory resides new workspaces.
* `tags` – (Optional) A mapping of tags assigned to the workspaces directory.
* `directory_id` - (Required) The directory identifier for registration in WorkSpaces service.
* `subnet_ids` - (Optional) The identifiers of the subnets where the directory resides.
* `tags` – (Optional) A mapping of tags assigned to the WorkSpaces directory.
* `self_service_permissions` – (Optional) The permissions to enable or disable self-service capabilities.

`self_service_permissions` supports the following:

* `change_compute_type` – (Optional) Whether workspaces directory users can change the compute type (bundle) for their workspace. Default `false`.
* `increase_volume_size` – (Optional) Whether workspaces directory users can increase the volume size of the drives on their workspace. Default `false`.
* `rebuild_workspace` – (Optional) Whether workspaces directory users can rebuild the operating system of a workspace to its original state. Default `false`.
* `restart_workspace` – (Optional) Whether workspaces directory users can restart their workspace. Default `true`.
* `switch_running_mode` – (Optional) Whether workspaces directory users can switch the running mode of their workspace. Default `false`.
* `change_compute_type` – (Optional) Whether WorkSpaces directory users can change the compute type (bundle) for their workspace. Default `false`.
* `increase_volume_size` – (Optional) Whether WorkSpaces directory users can increase the volume size of the drives on their workspace. Default `false`.
* `rebuild_workspace` – (Optional) Whether WorkSpaces directory users can rebuild the operating system of a workspace to its original state. Default `false`.
* `restart_workspace` – (Optional) Whether WorkSpaces directory users can restart their workspace. Default `true`.
* `switch_running_mode` – (Optional) Whether WorkSpaces directory users can switch the running mode of their workspace. Default `false`.

## Attributes Reference

In addition to all arguments above, the following attributes are exported:

* `id` - The workspaces directory identifier.
* `id` - The WorkSpaces directory identifier.

## Import

Expand Down