Use this Terraform module to create Fastly services with multiple backends, domains, dictionaries, ACLs, VCL snippets etc.
Functionality in this module assumes the following
-
Use of S3 as the remote backend to save the state info (bucket-name : base-bucket)
-
Use of AWS SSM paramater store to fetch S3 credentials for log streaming (bucket name & region: configurable as variable)
-
Terraform version 0.12 & above
-
Supports all VCL snippets - recv, fetch, hit, error, deliver
-
Supports multiple domains, origins
-
Supports multiple ACLs & adding entries to them
-
Supports multiple edge dictionaries - can be used in VCLs
-
Supports S3 log streaming
-
Duplicate the
example-service
directory and modify the values to create Fastly services -
Export your AWS credentials and Fastly API keys
export FASTLY_API_KEY=xxxxxxxxx
export AWS_PROFILE=xxxxxxxxx
- Initialize and execute Terraform
terraform init
terraform plan
terraform apply
- Destroy the setup (if needed)
terraform destroy