scylladb / terraform-provider-scylladbcloud

Terraform provider for ScyllaDB Cloud.
https://registry.terraform.io/providers/scylladb/scylladbcloud/latest
Apache License 2.0
11 stars 10 forks source link

internalprovider: fix inconsistent datacenter references #131

Closed dkropachev closed 8 months ago

dkropachev commented 8 months ago

Fixes: https://github.com/scylladb/terraform-provider-scylladbcloud/issues/116 https://github.com/scylladb/terraform-provider-scylladbcloud/issues/130

Tested:

main.tf:

resource "random_string" "postfix" {
  length           = 8
  special          = false
}

resource "scylladbcloud_cluster" "aws" {
  name       = "AWS-statuspage-test2-${random_string.postfix.result}"
  cloud      = "AWS"
  region     = "us-east-1"
  node_count = 3
  node_type  = "t3.micro"
  cidr_block = "172.31.0.0/24"
  enable_dns = true
}

data "scylladbcloud_cql_auth" "example" {
  cluster_id = scylladbcloud_cluster.aws.id
}

Steps for upgrade scenario:

  1. Run tf init; tf apply, on current version (1.5.0) of terraform provider
  2. Upgrade tf provider and run tf apply

Steps for create scenario:

  1. Upgrade tf provider and run tf apply

Steps for create scenario with datacenter:

  1. Change cql_auth definition:
    data "scylladbcloud_cql_auth" "example" {
    cluster_id = scylladbcloud_cluster.aws.id
    datacenter = "AWS_US_EAST_1"
    }
  2. Upgrade tf provider and run tf apply