AWS just added support for organization level config rules - it would be nice to be able to manage programatically in terraform:
aws_config_organization_config_ruleThere 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"
}
]
}
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. ๐
Pull request submitted: https://github.com/terraform-providers/terraform-provider-aws/pull/9716
Two new resources to manage these rules have been merged:
aws_config_organization_custom_ruleaws_config_organization_managed_ruleThey 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!
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. ๐