forked from cloudposse/terraform-aws-components
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
testing_account_name="testing" | ||
testing_account_email="[email protected]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
variable "testing_account_name" { | ||
type = "string" | ||
description = "Testing account name" | ||
default = "testing" | ||
} | ||
|
||
variable "testing_account_email" { | ||
type = "string" | ||
description = "Testing account email" | ||
} | ||
|
||
resource "aws_organizations_account" "testing" { | ||
name = "${var.testing_account_name}" | ||
email = "${var.testing_account_email}" | ||
iam_user_access_to_billing = "${var.account_iam_user_access_to_billing}" | ||
role_name = "${var.account_role_name}" | ||
} | ||
|
||
output "testing_account_arn" { | ||
value = "${aws_organizations_account.testing.arn}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
testing_account_id="" | ||
testing_account_user_names=["", "",] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
variable "testing_account_id" { | ||
type = "string" | ||
description = "Testing account ID" | ||
} | ||
|
||
variable "testing_account_user_names" { | ||
type = "list" | ||
description = "IAM user names to grant access to Testing account" | ||
} | ||
|
||
# Provision group access to testing account. Careful! Very few people, if any should have access to this account. | ||
module "organization_access_group_testing" { | ||
source = "git::https://github.com/cloudposse/terraform-aws-organization-access-group.git?ref=tags/0.1.2" | ||
namespace = "${var.namespace}" | ||
stage = "testing" | ||
name = "admin" | ||
user_names = ["${var.testing_account_user_names}"] | ||
member_account_id = "${var.testing_account_id}" | ||
} |