Skip to content

Commit

Permalink
Add aws_workspaces_directory example
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Babichev committed Dec 21, 2019
1 parent 4eafe44 commit 8bd6bf1
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion examples/workspaces/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,38 @@ provider "aws" {
region = "us-east-1"
}

resource "aws_workspaces_ip_group" "example" {
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/16"
}

resource "aws_subnet" "private-a" {
vpc_id = "${aws_vpc.main.id}"
availability_zone = "us-east-1b"
cidr_block = "10.0.1.0/24"
}

resource "aws_subnet" "private-b" {
vpc_id = "${aws_vpc.main.id}"
availability_zone = "us-east-1b"
cidr_block = "10.0.2.0/24"
}

resource "aws_directory_service_directory" "main" {
name = "tf-acctest.example.com"
password = "#S1ncerely"
size = "Small"
vpc_settings {
vpc_id = "${aws_vpc.main.id}"
subnet_ids = ["${aws_subnet.private-a.id}", "${aws_subnet.private-b.id}"]
}
}

resource "aws_workspaces_directory" "main" {
directory_id = "${aws_directory_service_directory.main.id}"
subnet_ids = ["${aws_subnet.private-a.id}", "${aws_subnet.private-b.id}"]
}

resource "aws_workspaces_ip_group" "main" {
name = "main"
description = "Main IP access control group"

Expand Down

0 comments on commit 8bd6bf1

Please sign in to comment.