scaleway / terraform-provider-scaleway

Terraform Scaleway provider
https://www.terraform.io/docs/providers/scaleway/
Mozilla Public License 2.0
199 stars 123 forks source link

invalid plan warning #2686

Open pnodet opened 3 months ago

pnodet commented 3 months ago
2024-08-05T12:00:53.321+0200 [WARN] Provider "registry.terraform.io/scaleway/scaleway" produced an invalid plan for scaleway_iam_ssh_key.public_key, 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:
      - .disabled: planned value cty.False for a non-computed attribute
2024-08-05T12:00:53.323+0200 [WARN]  Provider "registry.terraform.io/scaleway/scaleway" produced an invalid plan for scaleway_domain_record.backend_domain_record[0], 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:
      - .keep_empty_zone: planned value cty.False for a non-computed attribute
2024-08-05T12:00:53.325+0200 [WARN]  Provider "registry.terraform.io/scaleway/scaleway" produced an invalid plan for scaleway_instance_server.server, 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_dynamic_ip: planned value cty.False for a non-computed attribute
      - .boot_type: planned value cty.StringVal("local") for a non-computed attribute
      - .replace_on_type_change: planned value cty.False for a non-computed attribute
      - .state: planned value cty.StringVal("started") for a non-computed attribute
      - .public_ips: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
      - .root_volume[0].delete_on_termination: planned value cty.True for a non-computed attribute
      - .root_volume[0].boot: planned value cty.False for a non-computed attribute

Community Note

remyleone commented 3 months ago

Hello, What version of the provider are you using? Could you share the snippet of code that produce this error?

pnodet commented 3 months ago

I'm running version 2.42.1.

terraform {
  required_version = ">= 1.9.3"
  required_providers {
    scaleway = {
      source  = "scaleway/scaleway"
      version = "2.42.1"
    }
  }
}

The output above was with the following command.

SCW_DEBUG=1 TF_LOG=WARN TF_LOG_PROVIDER=DEBUG terraform plan

Issues are from a file containing multiples scaleway commands.

resource "tls_private_key" "private_key" {
  algorithm = "RSA"
  rsa_bits  = 4096
}

resource "scaleway_iam_ssh_key" "public_key" {
  name       = "publicKey"
  public_key = tls_private_key.private_key.public_key_openssh
}

resource "scaleway_instance_ip" "public_ip" {}

resource "scaleway_instance_server" "server" {
  name  = var.instance_name
  ip_id = scaleway_instance_ip.public_ip.id
  zone  = var.instance_zone
  type  = var.instance_node_type
  image = "ubuntu_focal"

  root_volume {
    size_in_gb = var.instance_root_volume_size
  }
}
Laure-di commented 1 week ago

Hello,

You might want to try upgrading to the latest version of the Scaleway provider. I haven't encountered this issue on my side with the latest version. Let me know if you still face any problems after the upgrade!