File tree Expand file tree Collapse file tree 7 files changed +146
-0
lines changed Expand file tree Collapse file tree 7 files changed +146
-0
lines changed Original file line number Diff line number Diff line change 1+ terraform {
2+ required_version = " >= 0.11.2"
3+
4+ backend "s3" {}
5+ }
6+
7+ provider "aws" {
8+ assume_role {
9+ role_arn = " ${ var . aws_assume_role_arn } "
10+ }
11+ }
12+
13+ module "account_settings" {
14+ source = " git::https://github.com/cloudposse/terraform-aws-iam-account-settings.git?ref=tags/0.1.0"
15+ namespace = " ${ var . namespace } "
16+ stage = " ${ var . stage } "
17+ name = " ${ var . name } "
18+ enabled = " ${ var . enabled } "
19+ }
Original file line number Diff line number Diff line change 1+ output "account_alias" {
2+ value = " ${ module . account_settings . account_alias } "
3+ }
4+
5+ output "signin_url" {
6+ value = " ${ module . account_settings . signin_url } "
7+ }
Original file line number Diff line number Diff line change 1+ variable "aws_assume_role_arn" {
2+ type = " string"
3+ }
4+
5+ variable "namespace" {
6+ type = " string"
7+ description = " Namespace (e.g. `cp` or `cloudposse`)"
8+ }
9+
10+ variable "stage" {
11+ type = " string"
12+ description = " Stage (e.g. `prod`, `dev`, `staging`)"
13+ }
14+
15+ variable "name" {
16+ type = " string"
17+ description = " Application or solution name (e.g. `app`)"
18+ default = " account"
19+ }
20+
21+ variable "enabled" {
22+ description = " Whether or not to create the IAM account alias"
23+ default = " true"
24+ }
Original file line number Diff line number Diff line change @@ -19,3 +19,11 @@ module "organization_access_group_root" {
1919 admin_user_names = [" ${ var . root_account_admin_user_names } " ]
2020 readonly_user_names = [" ${ var . root_account_readonly_user_names } " ]
2121}
22+
23+ output "admin_group" {
24+ value = " ${ module . organization_access_group_root . group_admin_name } "
25+ }
26+
27+ output "readonly_group" {
28+ value = " ${ module . organization_access_group_root . group_readonly_name } "
29+ }
Original file line number Diff line number Diff line change 1+ terraform {
2+ required_version = " >= 0.11.2"
3+
4+ backend "s3" {}
5+ }
6+
7+ provider "aws" {
8+ assume_role {
9+ role_arn = " ${ var . aws_assume_role_arn } "
10+ }
11+ }
12+
13+ data "terraform_remote_state" "account_settings" {
14+ backend = " s3"
15+
16+ config {
17+ bucket = " ${ var . namespace } -${ var . stage } -terraform-state"
18+ key = " account-settings/terraform.tfstate"
19+ }
20+ }
21+
22+ data "terraform_remote_state" "root_iam" {
23+ backend = " s3"
24+
25+ config {
26+ bucket = " ${ var . namespace } -${ var . stage } -terraform-state"
27+ key = " root-iam/terraform.tfstate"
28+ }
29+ }
30+
31+ locals {
32+ account_alias = " ${ data . terraform_remote_state . account_settings . account_alias } "
33+ signin_url = " ${ data . terraform_remote_state . account_settings . signin_url } "
34+ admin_groups = [" ${ data . terraform_remote_state . root_iam . admin_group } " ]
35+ readonly_groups = [" ${ data . terraform_remote_state . root_iam . readonly_group } " ]
36+ }
37+
38+ output "account_alias" {
39+ value = " ${ local . account_alias } "
40+ }
Original file line number Diff line number Diff line change 1+ variable "aws_assume_role_arn" {}
2+
3+ variable "namespace" {
4+ type = " string"
5+ description = " Namespace (e.g. `cp` or `cloudposse`)"
6+ }
7+
8+ variable "stage" {
9+ type = " string"
10+ description = " Stage (e.g. `prod`, `dev`, `staging`)"
11+ }
12+
13+ variable "name" {
14+ type = " string"
15+ description = " Application or solution name (e.g. `app`)"
16+ default = " terraform"
17+ }
18+
19+ variable "smtp_username" {
20+ description = " Username to authenticate with the SMTP server"
21+ type = " string"
22+ }
23+
24+ variable "smtp_password" {
25+ description = " Password to authenticate with the SMTP server"
26+ type = " string"
27+ }
28+
29+ variable "smtp_host" {
30+ description = " SMTP Host"
31+ default = " smtp.mailgun.org"
32+ }
33+
34+ variable "smtp_port" {
35+ description = " SMTP Port"
36+ default = " 587"
37+ }
Original file line number Diff line number Diff line change 1+ Welcome! Here are your AWS login credentials. They've been encrypted using your Keybase public key for safety.
2+
3+ Sign-in URL: ${signin_url}
4+
5+ Username: ${username}
6+
7+ To retrieve your password, run the following command:
8+
9+ ```
10+ ${password_decrypt_command}
11+ ```
You can’t perform that action at this time.
0 commit comments