Skip to main content

Module: cloudformation-stack-set

Terraform module to provision Cloudformation Stack Set and Administrator IAM role.

Usage

This example creates a role with the name cp-prod-app with permission to assume `Chamber with S3 bucket as parameter store, and gives permission to the entities specified inassume_role_arns` to assume the role.

module "default" {
source = "git::https://github.com/cloudposse/terraform-aws-cloudformation-stack-set.git?ref=init"

enabled = "true"
namespace = "cp"
stage = "prod"
name = "app"
template_url = "https://aws-quickstart.s3.amazonaws.com/quickstart-compliance-cis-benchmark/templates/main.template"
executor_role_name = "cis-executor"

parameters = {
NotificationEmailAddressForCloudWatchAlarms = "[email protected]"
ConfigureCloudtrail = "Yes"
ConfigureConfig = "Yes"
ProfileLevel = "Level 2"
QSS3BucketName = "aws-quickstart"
QSS3KeyPrefix = "quickstart-compliance-cis-benchmark/"
}

capabilities = ["CAPABILITY_IAM"]
}

Requirements

No requirements.

Providers

NameVersion
awsn/a

Modules

NameSourceVersion
admin_rolegit::https://github.com/cloudposse/terraform-aws-iam-role.gittags/0.4.0
labelgit::https://github.com/cloudposse/terraform-null-label.gittags/0.5.3

Resources

NameType
aws_cloudformation_stack_set.defaultresource
aws_iam_policy_document.admindata source

Inputs

NameDescriptionTypeDefaultRequired
attributesAdditional attributes (_e.g._ "1")list(string)[]no
capabilitiesA list of capabilities. Valid values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, CAPABILITY_AUTO_EXPANDlist(string)[]no
delimiterDelimiter between name, namespace, stage and attributesstring"-"no
enabledSet to false to prevent the module from creating any resourcesstring"true"no
executor_role_nameName of the IAM Role in all target accounts for Stack Set operationsstring"AWSCloudFormationStackSetExecutionRole"no
nameNamestring"cis"no
namespaceNamespace (e.g. cp or cloudposse)stringn/ayes
parametersKey-value map of input parameters for the Stack Set template. (_e.g._ map("BusinessUnit","ABC")map(string){}no
stageStage (e.g. prod, dev, staging)stringn/ayes
tagsAdditional tags (_e.g._ map("BusinessUnit","ABC")map(string){}no
template_urlAmazon S3 bucket URL location of a file containing the CloudFormation template body. Maximum file size: 460,800 bytesanyn/ayes

Outputs

NameDescription
administrator_role_arnAmazon Resource Number (ARN) of the IAM Role in the administrator account
executor_role_nameName of the IAM Role in all target accounts for Stack Set operations
nameName of the Stack Set