Skip to content

Commit 620e757

Browse files
authored
Add testing stage (#12)
1 parent f01b9d9 commit 620e757

File tree

5 files changed

+45
-1
lines changed

5 files changed

+45
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This is a collection of reusable root modules for CloudPosse AWS accounts.
1111
Use the `terraform-root-modules` Docker image as the base image in the application `Dockerfile`, and copy the modules from `/aws` folder into `/conf` folder
1212

1313
```dockerfile
14-
FROM cloudposse/terraform-root-modules:0.3.1 as terraform-root-modules
14+
FROM cloudposse/terraform-root-modules:0.3.2 as terraform-root-modules
1515

1616
FROM cloudposse/geodesic:0.9.18
1717

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
testing_account_name="testing"
2+
testing_account_email="[email protected]"

aws/accounts/testing.tf

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
variable "testing_account_name" {
2+
type = "string"
3+
description = "Testing account name"
4+
default = "testing"
5+
}
6+
7+
variable "testing_account_email" {
8+
type = "string"
9+
description = "Testing account email"
10+
}
11+
12+
resource "aws_organizations_account" "testing" {
13+
name = "${var.testing_account_name}"
14+
email = "${var.testing_account_email}"
15+
iam_user_access_to_billing = "${var.account_iam_user_access_to_billing}"
16+
role_name = "${var.account_role_name}"
17+
}
18+
19+
output "testing_account_arn" {
20+
value = "${aws_organizations_account.testing.arn}"
21+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
testing_account_id=""
2+
testing_account_user_names=["", "",]

aws/iam/testing.tf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
variable "testing_account_id" {
2+
type = "string"
3+
description = "Testing account ID"
4+
}
5+
6+
variable "testing_account_user_names" {
7+
type = "list"
8+
description = "IAM user names to grant access to Testing account"
9+
}
10+
11+
# Provision group access to testing account. Careful! Very few people, if any should have access to this account.
12+
module "organization_access_group_testing" {
13+
source = "git::https://github.com/cloudposse/terraform-aws-organization-access-group.git?ref=tags/0.1.2"
14+
namespace = "${var.namespace}"
15+
stage = "testing"
16+
name = "admin"
17+
user_names = ["${var.testing_account_user_names}"]
18+
member_account_id = "${var.testing_account_id}"
19+
}

0 commit comments

Comments
 (0)