Terraform-provider-digitalocean: digitalocean_database_cluster: redis cluster "version" attribute always forces replacement

Created on 6 Dec 2019  路  4Comments  路  Source: digitalocean/terraform-provider-digitalocean

Issue trying to use the digitalocean_database_cluster with the version field specified.

Expected Behavior

No plan difference.

Actual Behavior

The provider tries to replace the cluster

  # module.do_redis_cluster.digitalocean_database_cluster.cluster must be replaced
-/+ resource "digitalocean_database_cluster" "cluster" {
      + database     = (known after apply)
        engine       = "redis"
      ~ host         = "redis-stage-nyc3-do-user-6595292-0.db.ondigitalocean.com" -> (known after apply)
      ~ id           = "cc3e108e-aeb1-4eaa-977f-7eda06aba84c" -> (known after apply)
        name         = "leads2b-redis-stage-nyc3"
        node_count   = 1
      ~ password     = (sensitive value)
      ~ port         = 25061 -> (known after apply)
      ~ private_host = "private-redis-stage-nyc3-do-user-6595292-0.db.ondigitalocean.com" -> (known after apply)
      ~ private_uri  = (sensitive value)
        region       = "nyc3"
        size         = "db-s-1vcpu-1gb"
      - tags         = [] -> null
      ~ uri          = (sensitive value)
      ~ urn          = "do:dbaas:cc3e108e-aeb1-4eaa-977f-7eda06aba84c" -> (known after apply)
      ~ user         = "default" -> (known after apply)
      + version      = "5" # forces replacement
    }

Steps to Reproduce

Create a redis resource with the version field specified.

Most helpful comment

This was fixed on our API to return a proper version for Redis. The downside now is you'll have to add the version = 5 back to your config or you'll get the same message.

All 4 comments

@vkruoso sorry you hit this and thanks for reporting.

The issue here is that the API does not return a version for Redis like the other DB engines. I checked with the team and this appears to just be an oversight which will get fixed.

For the time being I'd recommend leaving off the version attribute since it's optional and we currently only support 5.x

Thanks a lot for returning on this. That is what we did in the meantime. This is just to make sure we don't accidentally create clusters with a more recent version if that is executed later.

This was fixed on our API to return a proper version for Redis. The downside now is you'll have to add the version = 5 back to your config or you'll get the same message.

Awesome! Thanks for the fix!

Was this page helpful?
0 / 5 - 0 ratings