This Terraform module implements state machine to update AWS account alternate contacts based on custom_fields
parameter from aft-account-requests
module. For implementation guidance, refer to the AWS Control Tower workshop for AFT.
Sample of custom_fields
implementation for aft-alternate-contacts
:
module "vending_account_1" {
source = "./modules/aft-account-request"
...
custom_fields = {
alternate_contact = jsonencode(
{
"billing"= {
"email-address" = "billing@mycompany.com",
"name" = "Account Receiveable",
"phone-number" = "+11234567890",
"title" = "Billing Department"
},
"operations"= {
"email-address" = "ops@mycompany.com",
"name" = "Operations 24/7",
"phone-number" = "+11234567890",
"title" = "DevOps Team"
},
"security"= {
"email-address" = "soc@mycompany.com",
"name" = "Security Ops Center",
"phone-number" = "+11234567890",
"title" = "SOC Team"
}
}
)
another_custom_field1 = "a"
another_custom_field1 = "b"
}
...
}
Diagram below depicts the invocation of aft-alternate-contacts
as part of aft-account-provisioning-customizations
.
The aft-alternate-contacts state machine consist of three separate Lambda functions that extracts the custom fields, validate the contacts information using regex and then updates the alternate contact in the target account.
This module requires Account Factory for Terraform (AFT) and must be deployed as part of account provisioning customization.
Name | Version |
---|---|
terraform | >= 0.15.0 |
aws | >= 3.15 |
Name | Version |
---|---|
archive | n/a |
aws | n/a |
Name | Description | Type | Default | Required |
---|---|---|---|---|
aws_ct_mgt_account_id | Control Tower Management Account Id | string |
n/a | yes |
aws_ct_mgt_org_id | Control Tower Organization Id | string |
n/a | yes |
cloudwatch_log_group_retention | Lambda CloudWatch log group retention period | string |
"0" |
no |
Name | Description |
---|---|
aft_alternate_contacts_add_lambda_arn | aft-alternate-contacts-add Lambda ARN |
aft_alternate_contacts_extract_lambda_arn | aft-alternate-contacts-extract Lambda ARN |
aft_alternate_contacts_state_machine_arn | State machine ARN |
aft_alternate_contacts_validate_lambda_arn | aft-alternate-contacts-validate Lambda ARN |