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.87k stars 9.21k forks source link

Cannot manage default x-ray sampling rule #23409

Open driskillb43 opened 2 years ago

driskillb43 commented 2 years ago

Community Note

Terraform CLI and Terraform AWS Provider Version

Terraform: 0.14.10 AWS Provider: 4.2.0

Affected Resource(s)

Terraform Configuration Files

resource "aws_xray_sampling_rule" "default" {
  rule_name      = "Default"
  priority       = 10000
  version        = 1
  reservoir_size = 0
  fixed_rate     = 0.00
  url_path       = "*"
  host           = "*"
  http_method    = "*"
  service_type   = "*"
  service_name   = "*"
  resource_arn   = "*"
}

Expected Behavior

The sampling rule can be updated

Actual Behavior

The following error is thrown:

Error: expected priority to be in the range (1 - 9999), got 10000

  on main.tf line 33, in resource "aws_xray_sampling_rule" "default":
  33:   priority       = 10000

Steps to Reproduce

Use the configuration file above and attempt a "terraform plan"

jon-armen commented 2 years ago

As mentioned in #24155 , this may require a similar approach by creating a new resource type: aws_default_xray_sampling_rule

lorelei-rupp-imprivata commented 11 months ago

Using terraform import also does not work here, hoping we get this support soon so we can manage this setting in our IAC