hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.82k stars 9.17k forks source link

[Enhancement]: aws_route53_traffic_policy_document does not support weighted rule #39977

Open akramhussein opened 4 hours ago

akramhussein commented 4 hours ago

Description

Currently, the aws_route53_traffic_policy_document does not support the weight rule.

This enhancement would introduce this missing rule to bring it in line with what the API permits.

Affected Resource(s) and/or Data Source(s)

Potential Terraform Configuration

data "aws_route53_traffic_policy_document" "example" {
  record_type = "A"
  start_rule  = "site_switch"

  endpoint {
    id    = "my_elb"
    type  = "elastic-load-balancer"
    value = "elb-111111.${data.aws_region.current.name}.elb.amazonaws.com"
  }
  endpoint {
    id     = "site_down_banner"
    type   = "s3-website"
    region = data.aws_region.current.name
    value  = "www.example.com"
  }

  rule {
    id   = "split_rule"
    type = "weighted"

    item {
      weight                   = 100
      evaluate_target_health   = false
      endpoint_reference       = "my_elb"
    }

    item {
      weight                   = 100
      evaluate_target_health   = false
      endpoint_reference       = "site_down_banner"
    }
  }
}

References

AWS Documentation

Would you like to implement a fix?

No

github-actions[bot] commented 4 hours ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue