Closed busla closed 9 months ago
Setting ignore_changes
on tags_all
fixes the issue (tested).
resource "aws_appautoscaling_target" "this" {
count = local.create && var.autoscaling_enabled && !local.is_serverless ? 1 : 0
max_capacity = var.autoscaling_max_capacity
min_capacity = var.autoscaling_min_capacity
resource_id = "cluster:${aws_rds_cluster.this[0].cluster_identifier}"
scalable_dimension = "rds:cluster:ReadReplicaCount"
service_namespace = "rds"
tags = var.tags
lifecycle {
ignore_changes = [
tags_all,
]
}
}
This issue has been resolved in version 9.0.2 :tada:
I'm going to lock this issue because it has been closed for 30 days β³. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Description
The aws_appautoscaling_target is causing a perpetual drift (version 8.5.0/9.0.0)
What I have tried so far without success:
default_tags
from the provider blockThe cluster was originally created in 2020 and according to the docs,
tags
ordefault_tags
from the provider block cannot be used on clusters created before2023-03-20
I am not sure how to proceed to fix this π€·πΌ
Perhaps add a new variable to allow ignoring tags on the resource?
Something like
Versions
Module version [Required]:
Terraform version: Tested in
1.6.4
and1.7.3
.Provider version(s):
Reproduction Code [Required]
Steps to reproduce the behavior:
No
Yes
After upgrading the provider version to
5.26.0
the drift started to appear.Expected behavior
Changes should be applied and not cause a perpetual drift.
Actual behavior
Causes perpetual drift