Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Removal of maximum_execution_frequency argument for 3 rules. #171

Merged

Conversation

hajkeats
Copy link
Contributor

@hajkeats hajkeats commented Nov 1, 2022

Description

Setting check_elb_logging_enabled = true and check_s3_bucket_level_public_access_prohibited = true results in errors like so:


Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

module.config_rules.module.aws_config.aws_config_config_rule.s3-bucket-level-public-access-prohibited[0]: Creating...
module.config_rules.module.aws_config.aws_config_config_rule.elb-logging-enabled[0]: Creating...
╷
│ Error: Error creating AWSConfig rule: Failed to create AWSConfig rule: InvalidParameterValueException: A maximum execution frequency for this rule is not allowed because only a change in resources triggers this managed rule.
│
│   with module.config_rules.module.aws_config.aws_config_config_rule.elb-logging-enabled[0],
│   on .terraform/modules/config_rules.aws_config/config-rules.tf line 771, in resource "aws_config_config_rule" "elb-logging-enabled":
│  771: resource "aws_config_config_rule" "elb-logging-enabled" {
│
╵
╷
│ Error: Error creating AWSConfig rule: Failed to create AWSConfig rule: InvalidParameterValueException: A maximum execution frequency for this rule is not allowed because only a change in resources triggers this managed rule.
│
│   with module.config_rules.module.aws_config.aws_config_config_rule.s3-bucket-level-public-access-prohibited[0],
│   on .terraform/modules/config_rules.aws_config/config-rules.tf line 896, in resource "aws_config_config_rule" "s3-bucket-level-public-access-prohibited":
│  896: resource "aws_config_config_rule" "s3-bucket-level-public-access-prohibited" {
│

There may be more than 2 rules affected by this issue, but these are the ones we have been trying to enable.

Fix

Removing the maximum_execution_frequency argument for the two rules allows for the rules to be created.

Update

3rd rule found with the same issue: dynamodb-table-encrypted-kms

hajkeats added 2 commits November 1, 2022 17:01
…m execution frequency is not allowed because only a change in resources triggers them.
@hajkeats hajkeats changed the title Fix: Removal of maximum_execution_frequency argument for 2 rules. Fix: Removal of maximum_execution_frequency argument for 3 rules. Nov 2, 2022
@hajkeats
Copy link
Contributor Author

hajkeats commented Nov 2, 2022

Update - 3rd rule found with the same issue:

│ Error: Error creating AWSConfig rule: Failed to create AWSConfig rule: InvalidParameterValueException: A maximum execution frequency for this rule is not allowed because only a change in resources triggers this managed rule.
│
│   with module.config_rules.module.aws_config.aws_config_config_rule.dynamodb-table-encrypted-kms[0],
│   on .terraform/modules/config_rules.aws_config/config-rules.tf line 629, in resource "aws_config_config_rule" "dynamodb-table-encrypted-kms":
│  629: resource "aws_config_config_rule" "dynamodb-table-encrypted-kms" {

@rpdelaney
Copy link
Contributor

rpdelaney commented Nov 10, 2022

Thanks @hajkeats ! This is in our backlog to investigate. In the mean time, we would accept a PR :) (edit: this is a PR 🤦 )

@esacteksab esacteksab merged commit c8f162c into trussworks:main Nov 10, 2022
@esacteksab
Copy link
Contributor

Released in https://github.com/trussworks/terraform-aws-config/releases/tag/v5.1.0 thank you very much for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants