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

Provider "registry.terraform.io/scylladb/scylladbcloud" produced an invalid plan for scylladbcloud_cluster.aws #111

Open dkropachev opened 9 months ago

dkropachev commented 9 months ago

How to reproduce:

export TF_LOG="TRACE"
terraform apply

main.tf:

resource "scylladbcloud_cluster" "aws" {
  name       = "some-cluster-name"
  cloud      = "AWS"
  region     = "us-east-1"
  node_count = 3
  node_type  = "t3.micro"
  cidr_block = "172.31.0.0/24"
  enable_dns = true
  user_api_interface = "ALTERNATOR"
  alternator_write_isolation = "only_rmw_uses_lwt"
}

Trace logs:

2024-02-06T07:14:15.751-0400 [WARN]  Provider "registry.terraform.io/scylladb/scylladbcloud" produced an invalid plan for scylladbcloud_cluster.aws, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .enable_vpc_peering: planned value cty.True for a non-computed attribute
rjeczalik commented 8 months ago

@dkropachev Is it still reproducible?

dkropachev commented 8 months ago

It is, but now you have even more errors:

2024-03-19T11:09:47.109-0400 [WARN]  Provider "registry.terraform.io/scylladb/scylladbcloud" produced an invalid plan for scylladbcloud_cluster.aws, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .alternator_write_isolation: planned value cty.StringVal("only_rmw_uses_lwt") for a non-computed attribute
      - .user_api_interface: planned value cty.StringVal("CQL") for a non-computed attribute
      - .enable_vpc_peering: planned value cty.True for a non-computed attribute
rjeczalik commented 8 months ago

but we are tolerating it because it is using the legacy plugin SDK

I guess the more higher level task here is to move to terraform-plugin-framework.

dkropachev commented 8 months ago

@rjeczalik, true, but these errors could be addressed by properly marking these fields as Computed, or not updating them upon creation.

rjeczalik commented 8 months ago

I am not entirely convinced why we are setting the

alternator_write_isolation

field for non-alternator clusters.

Making it being computed does not help either.

On Wed, 20 Mar 2024 at 14:55, Dmitry Kropachev @.***> wrote:

@rjeczalik https://github.com/rjeczalik, true, but these errors could be addressed by properly marking these fields as Computed.

— Reply to this email directly, view it on GitHub https://github.com/scylladb/terraform-provider-scylladbcloud/issues/111#issuecomment-2009626910, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3WIICEQNRFCSPQP464GTYZGIN7AVCNFSM6AAAAABC3ZOC4WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBZGYZDMOJRGA . You are receiving this because you were mentioned.Message ID: @.*** com>