hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.82k stars 9.17k forks source link

[Enhancement]: Support AWS Config proactive compliance #38847

Open srgoni opened 2 months ago

srgoni commented 2 months ago

Description

AWS has recently released a new feature that supports checking resources against compliance rules by means of so-called proactive controls. The feature is detailed here: https://aws.amazon.com/blogs/aws/new-aws-config-rules-now-support-proactive-compliance/

From the way the feature is designed, it primarily targets CloudFormation deployments and is probably based on/integrated with CloudFormation Guard. With the new APIs released, however, the feature could potentially also be used in other IaC tools.

It would be great if the Terraform AWS provider could take advantage of proactive controls and support their evaluation when doing changes to AWS infrastructure.

The biggest hurdle to implementing this currently is the fact that the StartResourceEvaluation API call only supports a CloudFormation template-like data structure as input, which means that the change plan prepared by Terraform needs to be transformed into this format.

Affected Resource(s) and/or Data Source(s)

The provider block as well as all resources currently supported by CloudFormation: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html

Potential Terraform Configuration

provider "aws" {
  region = "us-east-1"
  evaluate_resources {
    mode = "PROACTIVE"
    timeout = 60
  }
}

References

Would you like to implement a fix?

None

github-actions[bot] commented 2 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue