Creates AWS Shield Advanced protection for a single resource.
These resources can include:
-
Cloudfront distribution
-
Route 53 Hosted Zone
-
Global Accelerator
-
Application load balancer
-
Classic load balancer
-
Elastic IP address
### Shield Advanced protection for a Cloudfront distribution
module "shield_advanced" {
source = "github.com/moabukar/terraform-aws-shield-advanced"
name = "shield-advanced-cloudfront"
name_resource_arn_map = {
"cloudfront" = "arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5"
}
}| Name | Version |
|---|---|
| aws | >= 3.74, < 5.0 |
| Name | Version |
|---|---|
| aws | >= 3.74, < 5.0 |
| Name | Source | Version |
|---|---|---|
| shield_advanced | github.com/moabukar/terraform-aws-shield-advanced | n/a |
| Name | Type |
|---|---|
| aws_shield_protection.shield | resource |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| cloudfront_distribution_ids | list of CloudFront Distribution IDs which will be protected with AWS Shield Advanced | list(string) |
[] |
no |
| name | The name for Shield Protection | any |
n/a | yes |
| name_resource_arn_map | A map of names and ARNs of resources to be protected. The name will be used as the name of the resource in the AWS console. | map(string) |
{} |
no |
| tags | A map of tag names and values for tags to apply to all taggable resources created by the module. Default value is a blank map to allow for using Default Tags in the provider. | map(string) |
{} |
no |
| Name | Description |
|---|---|
| shield | A map of properties for the created AWS Shield protection. |
export AWS_ACCESS_KEY_ID=<>
export AWS_SECRET_ACCESS_KEY=<>
export AWS_DEFAULT_REGION=<>
terraform init
terraform plan
terraform apply