terraform-aws-redshift
terraform-aws-redshift copied to clipboard
fix: Master username when specifying snapshot identifier
Description
In the steps below, the cluster with the difference will be recreated.
1 - specify snapshot_identifier, terraform apply 2 - same condition, terraform plan
$ terraform plan
...
# module.redshift.aws_redshift_cluster.this[0] must be replaced
-/+ resource "aws_redshift_cluster" "this" {
...
- master_username = "master" -> null # forces replacement
...
Motivation and Context
We want to restore the cluster from a snapshot. However, I have this problem and am looking for a solution.
Breaking Changes
It will affect cases where both master_username and snapshot_identifier are specified.
How Has This Been Tested?
- [ ] I have updated at least one of the
examples/*to demonstrate and validate my change(s) - [ ] I have tested and validated these changes using one or more of the provided
examples/*projects
- [ ] I have executed
pre-commit run -aon my pull request
I believe what we have is correct per https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/redshift_cluster#master_username
I believe what we have is correct per https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/redshift_cluster#master_username
I believe so too. However, it is happening in my environment.
environment
aws provider version: 4.26
terraform-aws-modules/redshift/aws : 4.0.1
Is it related to this issue? https://github.com/hashicorp/terraform-provider-aws/issues/17448
Until the terraform provider side improves, what should the side using this module do ?
can this be merged please?
I'm running into an issue here upgrading the cluster created from a snapshot. it always try to recreate which is not the right behavior. I tested with this fork and it was fine.
This PR is included in version 4.0.2 :tada:
I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.