OpsLevel / terraform-provider-opslevel

Terraform provider for OpsLevel.com
https://registry.terraform.io/providers/OpsLevel/opslevel/latest/docs
MIT License
8 stars 5 forks source link

allow empty string for Domain description and note fields #392

Closed davidbloss closed 1 month ago

davidbloss commented 1 month ago

Issues

Changelog

Tophatting

With this Terraform config, description and note are null

resource "opslevel_domain" "example" {
  name        = "Example Domain 123"
  description = null
  note        = null
}

Create Domain, terraform apply

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # opslevel_domain.example will be created
  + resource "opslevel_domain" "example" {
      + aliases = (known after apply)
      + id      = (known after apply)
      + name    = "Example Domain 123"
        # (1 unchanged attribute hidden)
    }

Plan: 1 to add, 0 to change, 0 to destroy.
opslevel_domain.example: Creating...
opslevel_domain.example: Creation complete after 1s [id=Z2lkOi8vb3BzbGV2ZWwvRW50aXR5T2JqZWN0LzI4MTUxMzc]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Destroy Domain to recreate it with new config ✅

Update Terraform config, description and note are empty strings

resource "opslevel_domain" "example" {
  name        = "Example Domain 123"
  description = ""
  note        = ""
}

Create Domain with updated config, terraform apply

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # opslevel_domain.example will be created
  + resource "opslevel_domain" "example" {
      + aliases     = (known after apply)
      + id          = (known after apply)
      + name        = "Example Domain 123"
        # (2 unchanged attributes hidden)
    }

Plan: 1 to add, 0 to change, 0 to destroy.
opslevel_domain.example: Creating...
opslevel_domain.example: Creation complete after 0s [id=Z2lkOi8vb3BzbGV2ZWwvRW50aXR5T2JqZWN0LzI4MTUxNDU]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Update Terraform config, description and note back to null

resource "opslevel_domain" "example" {
  name        = "Example Domain 123"
  description = null
  note        = null
}

terraform plan - no differences