You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The excluded regions field shows a diff to change the order of the regions, even though the contents of the list hasn't changed. It would be good if the excluded regions field did not consider a change in order to be a change to the resource.
Terraform Version
1.3.5
Affected Resource(s)
datadog_integration_aws
Terraform Configuration Files
data"aws_region""current" {}
data"aws_regions""current" {
all_regions=true
}
# This code is using the default value of this variablevariable"included_regions" {
type=list(string)
default=[]
}
locals {
aws_regions_all=data.aws_regions.current.namesaws_regions_target=length(var.included_regions) >0? var.included_regions: [data.aws_region.current.name]
}
resource"datadog_integration_aws""aws_integration" {
account_id=local.my_aws_account_idrole_name=var.datadog_role_namehost_tags=var.host_tags# only include specific regions (the Datadog provider only supports excluded regions) excluded_regions=setsubtract(local.aws_regions_all, local.aws_regions_target)
account_specific_namespace_rules=var.account_specific_namespace_rules
}
Expected Behavior
When the excluded regions list does not change, there should be no change in the datadog integration.
Actual Behavior
Sometimes (but not always), we see a flaky diff in the terraform plan to change the order of the regions, e.g.
Unfortunately, Diffs of List types are not well supported with terraform-plugin-sdk. See hashicorp/terraform-plugin-sdk#477, DiffSuppressFunc doesn't support lists. We'll see what we can do about this, possibly migrate to a set or preemptively sorting the list. Hopefully we'll have an update and/or PR up soon.
The excluded regions field shows a diff to change the order of the regions, even though the contents of the list hasn't changed. It would be good if the excluded regions field did not consider a change in order to be a change to the resource.
Terraform Version
1.3.5
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
When the excluded regions list does not change, there should be no change in the datadog integration.
Actual Behavior
Sometimes (but not always), we see a flaky diff in the terraform plan to change the order of the regions, e.g.
Steps to Reproduce
terraform plan
This step may be required multiple times, as we do not see this issue every time.
The text was updated successfully, but these errors were encountered: