Terraform-provider-aws: New Resource: `aws_config_organization_config_rule`

Created on 10 Jul 2019  ยท  5Comments  ยท  Source: hashicorp/terraform-provider-aws

Community Note

  • Please vote on this issue by adding a ๐Ÿ‘ reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

AWS just added support for organization level config rules - it would be nice to be able to manage programatically in terraform:

New or Affected Resource(s)

  • aws_config_organization_config_rule

Potential Terraform Configuration

There are two types of rules - managed and custom. I'm not really sure how the resource should be configured for each (or if there should be two separate resources). It looks like the request shape is different than they used for single-account config rules:

{
   "ExcludedAccounts": [ "string" ],
   "OrganizationConfigRuleName": "string",
   "OrganizationCustomRuleMetadata": { 
      "Description": "string",
      "InputParameters": "string",
      "LambdaFunctionArn": "string",
      "MaximumExecutionFrequency": "string",
      "OrganizationConfigRuleTriggerTypes": [ "string" ],
      "ResourceIdScope": "string",
      "ResourceTypesScope": [ "string" ],
      "TagKeyScope": "string",
      "TagValueScope": "string"
   },
   "OrganizationManagedRuleMetadata": { 
      "Description": "string",
      "InputParameters": "string",
      "MaximumExecutionFrequency": "string",
      "ResourceIdScope": "string",
      "ResourceTypesScope": [ "string" ],
      "RuleIdentifier": "string",
      "TagKeyScope": "string",
      "TagValueScope": "string"
   }
}

vs original config rule:

{
   "ConfigRule": { 
      "ConfigRuleArn": "string",
      "ConfigRuleId": "string",
      "ConfigRuleName": "string",
      "ConfigRuleState": "string",
      "CreatedBy": "string",
      "Description": "string",
      "InputParameters": "string",
      "MaximumExecutionFrequency": "string",
      "Scope": { 
         "ComplianceResourceId": "string",
         "ComplianceResourceTypes": [ "string" ],
         "TagKey": "string",
         "TagValue": "string"
      },
      "Source": { 
         "Owner": "string",
         "SourceDetails": [ 
            { 
               "EventSource": "string",
               "MaximumExecutionFrequency": "string",
               "MessageType": "string"
            }
         ],
         "SourceIdentifier": "string"
      }
   },
   "Tags": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ]
}

References

new-resource servicconfigservice

Most helpful comment

Hi folks ๐Ÿ‘‹ The team at HashiCorp is picking this feature request up for implementation and we can provide an update about this later today or Monday. ๐Ÿ‘

All 5 comments

Hi folks ๐Ÿ‘‹ The team at HashiCorp is picking this feature request up for implementation and we can provide an update about this later today or Monday. ๐Ÿ‘

Two new resources to manage these rules have been merged:

  • New Resource: aws_config_organization_custom_rule
  • New Resource: aws_config_organization_managed_rule

They will release with version 2.24.0 of the Terraform AWS Provider, later this week.

This has been released in version 2.24.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

Was this page helpful?
0 / 5 - 0 ratings