Skip to content

moabukar/terraform-aws-shield-advanced

Repository files navigation

AWS Shield Advanced Terraform module

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

Examples

Shield Advanced protection for a Cloudfront distribution

### 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"
  }
}

Requirements

Name Version
aws >= 3.74, < 5.0

Providers

Name Version
aws >= 3.74, < 5.0

Modules

Name Source Version
shield_advanced github.com/moabukar/terraform-aws-shield-advanced n/a

Resources

Name Type
aws_shield_protection.shield resource

Inputs

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

Outputs

Name Description
shield A map of properties for the created AWS Shield protection.

Local testing

export AWS_ACCESS_KEY_ID=<>
export AWS_SECRET_ACCESS_KEY=<>
export AWS_DEFAULT_REGION=<>

terraform init
terraform plan
terraform apply

About

AWS Shield Advanced Terraform custom module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages