Lab: Deploying AWS Service Control Policies (SCPs) via Terraform

How to deploy AWS Service Control Policies via Terraform

Already Know Terraform?

Overview

The Terraform code for this module has been left in a simplified state (i.e., not using modules, loops, or other advanced Terraform features) to be more easily accessible. You can customize it further to meet your specific requirements.

Deployment

Cost Alert

# clone the AWS Security Cookbook repository
git clone https://github.com/Ty182/AWS-Security-Cookbook-by-Tyler

# navigate to AWS Service Control Policies (SCPs) directory
cd AWS_Cookbook_by_Tyler/recipes/aws_serviceControlPolicies/code

# initialize the directory and download the required terraform providers
terraform init

# check formatting and validate the syntax is correct
terraform fmt && terraform validate

# check the resources that will be created
terraform plan 

# deploy the resources
terraform apply
  • Once complete, head to the AWS Organizations console and check it out!

AWS Organizations console showing Service Control Policies

Cleanup

Clean up the resources

Last updated

Was this helpful?