Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r/aws_redshift_cluster: skip_final_snapshot updates state only #36635

Merged
merged 1 commit into from
Mar 28, 2024

Commits on Mar 28, 2024

  1. r/aws_redshift_cluster: skip_final_snapshot updates state only

    Previously an update to `skip_final_snapshot` would trigger a call to the ModifyCluster API, which fails if no other arguments are modified.
    
    Before:
    
      ```
      Terraform will perform the following actions:
    
      # aws_redshift_cluster.example will be updated in-place
      ~ resource "aws_redshift_cluster" "example" {
            id                                   = "tf-redshift-cluster"
          ~ skip_final_snapshot                  = false -> true
            tags                                 = {}
            # (38 unchanged attributes hidden)
    
            # (1 unchanged block hidden)
        }
    
    Plan: 0 to add, 1 to change, 0 to destroy.
    aws_redshift_cluster.example: Modifying... [id=tf-redshift-cluster]
    ╷
    │ Error: modifying Redshift Cluster (tf-redshift-cluster): InvalidParameterCombination: No modifications were requested
    │       status code: 400, request id: 0b087c95-ac6b-4ad6-8eed-ded497fb4a2e
    │
    │   with aws_redshift_cluster.example,
    │   on main.tf line 13, in resource "aws_redshift_cluster" "example":
    │   13: resource "aws_redshift_cluster" "example" {
    │
    ╵
    ```
    
    After:
    
    ```
    Terraform will perform the following actions:
    
      # aws_redshift_cluster.example will be updated in-place
      ~ resource "aws_redshift_cluster" "example" {
            id                                   = "tf-redshift-cluster"
          ~ skip_final_snapshot                  = false -> true
            tags                                 = {}
            # (38 unchanged attributes hidden)
    
            # (1 unchanged block hidden)
        }
    
    Plan: 0 to add, 1 to change, 0 to destroy.
    aws_redshift_cluster.example: Modifying... [id=tf-redshift-cluster]
    aws_redshift_cluster.example: Modifications complete after 1s [id=tf-redshift-cluster]
    
    Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
    ```
    jar-b committed Mar 28, 2024
    Configuration menu
    Copy the full SHA
    3175a5b View commit details
    Browse the repository at this point in the history