chronark / terraform-provider-vercel

A terraform provider for vercel's hosting platform
ff789693-5a72-142e-e45d-326ead4ae7a4.vercel.app
Mozilla Public License 2.0
25 stars 9 forks source link

`terraform import` of Vercel project not importing domain settings #57

Open fiveable-jferg opened 2 years ago

fiveable-jferg commented 2 years ago

Terraform Version

1.0.11

Affected Resource(s)

Terraform Configuration Files

I will need to sanitize the relevant configuration files, will attach shortly. 

Debug Output

Same as configuration files.

Expected Behavior

I used terraform import to import a vercel resource into my state, but the multiple domain blocks configured in that resource were not imported, so terraform wants to change the resource unnecessarily.

Actual Behavior

Terraform wants to change project domains to match

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform import vercel_project.foo myorg/foo
  2. [ Ensure that values in my terraform config match configured values in Vercel. ]
  3. terraform plan
  4. 
    # vercel_project.foo will be updated in-place
    ~ resource "vercel_project" "foo" {
        id             = "[REDACTED]"
        name           = "foo"
        # (9 unchanged attributes hidden)
    
      + domain {
          + git_branch = "main"
          + name       = "foo.bar"
        }
      + domain {
          + git_branch = "main"
          + name       = "www.foo.bar"
        }
    
        # (1 unchanged block hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.