Account Alternate Contact
This Terraform Module configures an AWS Account Alternate Contact. This is useful for ensuring that AWS can reach the appropriate person in your organization for security-related notifications, satisfying CIS AWS Foundations Benchmark v3.0.0 Account.1.
Features
-
Set an alternate security, billing, or operations contact for your AWS account
-
Defaults to the
SECURITYcontact type -
Supports conditional resource creation via the
create_resourcesvariable
Learn
Note
This repo is a part of the Gruntwork Infrastructure as Code Library, a collection of reusable, battle-tested, production ready infrastructure code. If you’ve never used the Infrastructure as Code Library before, make sure to read How to use the Gruntwork Infrastructure as Code Library!
Core concepts
Repo organization
-
modules: the main implementation code for this repo, broken down into multiple standalone, orthogonal submodules.
-
examples: This folder contains working examples of how to use the submodules.
-
test: Automated tests for the modules and examples.
Deploy
Non-production deployment (quick start for learning)
If you just want to try this module out, check out the following resources:
- examples/account-alternate-contact: A sample configuration optimized for learning, experimenting, and testing (but not production usage).
Production deployment
If you want to deploy this module in production, check out the following resources:
Sample Usage
- Terraform
- Terragrunt
# ------------------------------------------------------------------------------------------------------
# DEPLOY GRUNTWORK'S ACCOUNT-ALTERNATE-CONTACT MODULE
# ------------------------------------------------------------------------------------------------------
module "account_alternate_contact" {
source = "git::git@github.com:gruntwork-io/terraform-aws-security.git//modules/account-alternate-contact?ref=v1.4.0"
# ----------------------------------------------------------------------------------------------------
# REQUIRED VARIABLES
# ----------------------------------------------------------------------------------------------------
# The email address for the alternate contact.
email_address = <string>
# The name of the alternate contact.
name = <string>
# The phone number for the alternate contact.
phone_number = <string>
# The title for the alternate contact.
title = <string>
# ----------------------------------------------------------------------------------------------------
# OPTIONAL VARIABLES
# ----------------------------------------------------------------------------------------------------
# The type of alternate contact. Allowed values are: BILLING, OPERATIONS,
# SECURITY.
alternate_contact_type = "SECURITY"
# Set to false to have this module skip creating resources. This weird
# parameter exists solely because Terraform does not support conditional
# modules. Therefore, this is a hack to allow you to conditionally decide if
# the resources in this module should be created or not.
create_resources = true
}
# ------------------------------------------------------------------------------------------------------
# DEPLOY GRUNTWORK'S ACCOUNT-ALTERNATE-CONTACT MODULE
# ------------------------------------------------------------------------------------------------------
terraform {
source = "git::git@github.com:gruntwork-io/terraform-aws-security.git//modules/account-alternate-contact?ref=v1.4.0"
}
inputs = {
# ----------------------------------------------------------------------------------------------------
# REQUIRED VARIABLES
# ----------------------------------------------------------------------------------------------------
# The email address for the alternate contact.
email_address = <string>
# The name of the alternate contact.
name = <string>
# The phone number for the alternate contact.
phone_number = <string>
# The title for the alternate contact.
title = <string>
# ----------------------------------------------------------------------------------------------------
# OPTIONAL VARIABLES
# ----------------------------------------------------------------------------------------------------
# The type of alternate contact. Allowed values are: BILLING, OPERATIONS,
# SECURITY.
alternate_contact_type = "SECURITY"
# Set to false to have this module skip creating resources. This weird
# parameter exists solely because Terraform does not support conditional
# modules. Therefore, this is a hack to allow you to conditionally decide if
# the resources in this module should be created or not.
create_resources = true
}
Reference
- Inputs
- Outputs
Required
email_addressstringThe email address for the alternate contact.
namestringThe name of the alternate contact.
phone_numberstringThe phone number for the alternate contact.
titlestringThe title for the alternate contact.
Optional
alternate_contact_typestringThe type of alternate contact. Allowed values are: BILLING, OPERATIONS, SECURITY.
"SECURITY"create_resourcesboolSet to false to have this module skip creating resources. This weird parameter exists solely because Terraform does not support conditional modules. Therefore, this is a hack to allow you to conditionally decide if the resources in this module should be created or not.
trueThe type of the alternate contact.