--- layout: "aws" page_title: "AWS: aws_config_config_rule" sidebar_current: "docs-aws-resource-config-config-rule" description: |- Provides an AWS Config Rule. --- # aws\_config\_config\_rule Provides an AWS Config Rule. ~> **Note:** Config Rule requires an existing [Configuration Recorder](/docs/providers/aws/r/config_configuration_recorder.html) to be present. Use of `depends_on` is recommended (as shown below) to avoid race conditions. ## Example Usage ```hcl resource "aws_config_config_rule" "r" { name = "example" source { owner = "AWS" source_identifier = "S3_BUCKET_VERSIONING_ENABLED" } depends_on = ["aws_config_configuration_recorder.foo"] } resource "aws_config_configuration_recorder" "foo" { name = "example" role_arn = "${aws_iam_role.r.arn}" } resource "aws_iam_role" "r" { name = "my-awsconfig-role" assume_role_policy = <