Terraform module to setup config rules
Manual testing:
# Replace "xxx" with an actual AWS profile, then execute the integration tests.
export AWS_PROFILE=xxx
make terraform/pytest PYTEST_ARGS="-v --nomock"
For automated testing, PYTEST_ARGS is optional and no profile is needed:
make mockstack/up
make terraform/pytest PYTEST_ARGS="-v"
make mockstack/clean
Name | Version |
---|---|
terraform | >= 0.13 |
aws | >= 4.0 |
Name | Version |
---|---|
aws | >= 4.0 |
Name | Type |
---|---|
aws_caller_identity.this | data source |
aws_iam_policy.custom_lambda | data source |
aws_iam_policy_document.custom_lambda | data source |
aws_partition.this | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
config_recorder_id | ID of the config recorder in the account. Required to address the implicit dependency on the config recorder | string |
n/a | yes |
config_rule | Object of attributes for the config rule resource, see https://www.terraform.io/docs/providers/aws/r/config_config_rule.html#argument-reference. When owner is AWS , set source_identifer to the AWS predefined identifier for the rule. When owner is CUSTOM_LAMBDA , set source_identifier to null and it will be set to the ARN of the lambda function |
object({ |
n/a | yes |
lambda | Object of attributes for the lambda supporting a custom config rule, see https://www.terraform.io/docs/providers/aws/r/lambda_function.html#argument-reference. Required when config_rule.owner is CUSTOM_LAMBDA |
object({ |
{ |
no |
Name | Description |
---|---|
config_rule | AWS Config Rule object |