diff --git a/README.md b/README.md index ada4a59..7a3cd4f 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ --> -Terraform module to provision Service Control Policies (SCP) for AWS Organizations and Organizational Units. +Terraform module to provision Service Control Policies (SCP) for AWS Organizations, Organizational Units, and AWS accounts. --- @@ -64,7 +64,9 @@ We literally have [*hundreds of terraform modules*][terraform_modules] that are Service Control Policies are configured in YAML configuration files. -See [policies](examples/complete/policies) for Service Control Policies configuration examples. +We maintain a comprehensive [catalog](catalog) of SCP configurations and welcome contributions via pull request! + +The [example](examples/complete) in this module uses the catalog to provision the SCPs on AWS. ## Usage @@ -84,7 +86,7 @@ For automated tests of the complete example using [bats](https://github.com/bats source = "git::https://github.com/cloudposse/terraform-yaml-config.git?ref=master" list_config_local_base_path = path.module - list_config_paths = ["policies/*.yaml"] + list_config_paths = ["catalog/*.yaml"] context = module.this.context } diff --git a/README.yaml b/README.yaml index 20659e3..4d342a2 100644 --- a/README.yaml +++ b/README.yaml @@ -86,13 +86,15 @@ references: # Short description of this project description: |- - Terraform module to provision Service Control Policies (SCP) for AWS Organizations and Organizational Units. + Terraform module to provision Service Control Policies (SCP) for AWS Organizations, Organizational Units, and AWS accounts. # Introduction to the project introduction: |- Service Control Policies are configured in YAML configuration files. - See [policies](examples/complete/policies) for Service Control Policies configuration examples. + We maintain a comprehensive [catalog](catalog) of SCP configurations and welcome contributions via pull request! + + The [example](examples/complete) in this module uses the catalog to provision the SCPs on AWS. # How to use this module. Should be an easy example to copy and paste. usage: |- @@ -107,7 +109,7 @@ usage: |- source = "git::https://github.com/cloudposse/terraform-yaml-config.git?ref=master" list_config_local_base_path = path.module - list_config_paths = ["policies/*.yaml"] + list_config_paths = ["catalog/*.yaml"] context = module.this.context } diff --git a/examples/complete/policies/cloudwatch-logs-policies.yaml b/catalog/cloudwatch-logs-policies.yaml similarity index 100% rename from examples/complete/policies/cloudwatch-logs-policies.yaml rename to catalog/cloudwatch-logs-policies.yaml diff --git a/examples/complete/policies/deny-all-policies.yaml b/catalog/deny-all-policies.yaml similarity index 100% rename from examples/complete/policies/deny-all-policies.yaml rename to catalog/deny-all-policies.yaml diff --git a/examples/complete/policies/iam-policies.yaml b/catalog/iam-policies.yaml similarity index 100% rename from examples/complete/policies/iam-policies.yaml rename to catalog/iam-policies.yaml diff --git a/examples/complete/policies/kms-policies.yaml b/catalog/kms-policies.yaml similarity index 100% rename from examples/complete/policies/kms-policies.yaml rename to catalog/kms-policies.yaml diff --git a/examples/complete/policies/organization-policies.yaml b/catalog/organization-policies.yaml similarity index 100% rename from examples/complete/policies/organization-policies.yaml rename to catalog/organization-policies.yaml diff --git a/examples/complete/policies/route53-policies.yaml b/catalog/route53-policies.yaml similarity index 100% rename from examples/complete/policies/route53-policies.yaml rename to catalog/route53-policies.yaml diff --git a/examples/complete/policies/s3-policies.yaml b/catalog/s3-policies.yaml similarity index 100% rename from examples/complete/policies/s3-policies.yaml rename to catalog/s3-policies.yaml diff --git a/examples/complete/fixtures.us-east-2.tfvars b/examples/complete/fixtures.us-east-2.tfvars index 25429b7..172d2d4 100644 --- a/examples/complete/fixtures.us-east-2.tfvars +++ b/examples/complete/fixtures.us-east-2.tfvars @@ -9,3 +9,5 @@ stage = "test" name = "scp" service_control_policy_description = "Test Service Control Policy" + +service_control_policy_paths = ["../../catalog/*.yaml"] diff --git a/examples/complete/main.tf b/examples/complete/main.tf index 9ed6942..111a795 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -2,7 +2,7 @@ module "yaml_config" { source = "git::https://github.com/cloudposse/terraform-yaml-config.git?ref=tags/0.1.0" list_config_local_base_path = path.module - list_config_paths = ["policies/*.yaml"] + list_config_paths = var.service_control_policy_paths context = module.this.context } diff --git a/examples/complete/variables.tf b/examples/complete/variables.tf index 1f9b032..31885e4 100644 --- a/examples/complete/variables.tf +++ b/examples/complete/variables.tf @@ -8,3 +8,8 @@ variable "service_control_policy_description" { default = null description = "Description of the combined Service Control Policy" } + +variable "service_control_policy_paths" { + type = list(string) + description = "List of paths to Service Control Policy configurations" +}