Terraform overrides
The Golden Path uses Boilerplate templating to set up your infrastructure. To get all the benefits from being on the Golden Path, use Terraform overrides when you need to diverge from the path.
Learn more about overrides
Reference implementation
Why use overrides?
Overrides let you make changes based on your needs while still getting infrastructure updates. We collect data about which overrides teams create and add them to the Golden Path when possible.
Frequently asked questions
What if I don't need a resource created by Boilerplate?
Considerations
Before you remove resources from Boilerplate you should consider if the change you need could be done as a feature toggle in Boilerplate. You should also consider that other parts of the Golden Path may depend on the resource you are trying to remove. Removing resources in this way should be a last resort.
You can remove a resource added by Boilerplate by adding a count
to the resource. Given the following Terraform code:
resource "aws_s3_bucket" "example" {
bucket = "my-tf-test-bucket"
tags = {
Name = "My bucket"
Environment = "Dev"
}
}
Adding a count
override to the resource in a file with the ending _override.tf
removes the resource: