Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error inconsistent result after apply with vercel_project #187

Closed
mdenkinger opened this issue Jun 6, 2024 · 3 comments
Closed

Error inconsistent result after apply with vercel_project #187

mdenkinger opened this issue Jun 6, 2024 · 3 comments

Comments

@mdenkinger
Copy link

mdenkinger commented Jun 6, 2024

I am having problems with the vercel_project. Here is the full error message:

  # vercel_project.default-project_779E12D6 (default-project/project) will be updated in-place
  ~ resource "vercel_project" "default-project_779E12D6" {
        id                                                = "prj_1y64fxxxx"
        name                                              = "xxxx"
      + password_protection                               = {
          + deployment_type = "all_deployments"
          + password        = (sensitive value)
        }
      + protection_bypass_for_automation_secret           = (known after apply)
      + trusted_ips                                       = {
          + addresses       = (sensitive value)
          + deployment_type = "all_deployments"
          + protection_mode = "trusted_ip_required"
        }
        # (14 unchanged attributes hidden)
    }
Plan: 0 to add, 1 to change, 0 to destroy.
vercel_project.default-project_779E12D6: Modifying... [id=prj_1y64fxxx]
╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to vercel_project.default-project_779E12D6 (default-project/project), provider
│ "provider[\"registry.terraform.io/vercel/vercel\"]" produced an unexpected
│ new value: .trusted_ips.addresses: planned set element
│ cty.ObjectVal(map[string]cty.Value{"note":cty.NullVal(cty.String),
│ "value":cty.StringVal("xx.xxx.xxx.xxx")}) does not correlate with any element
│ in actual.
│ 
│ This is a bug in the provider, which should be reported in the provider's own
│ issue tracker.

I've faced the issue currently with trusted_ips, where it persists. I have seen it also for environment with the same provider version.

I am using this terraform configuration for this:

 "terraformProviders": [
    "vercel/vercel@~> 1.11"
  ]
@mdenkinger
Copy link
Author

Adding some note to the trusted ip addresses fixes the issue as a workaround. And sure, adding notes is a best practices :)

export interface ProjectTrustedIpsAddresses {
  /**
  * A description for the value
  *
  * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/vercel/vercel/1.11.0/docs/resources/project#note Project#note}
  */
  readonly note?: string;
  /**
  * The address or CIDR range that can access deployments.
  *
  * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/vercel/vercel/1.11.0/docs/resources/project#value Project#value}
  */
  readonly value: string;
}

@dglsparsons
Copy link
Collaborator

Hi, sorry you're experiencing this. It's a provider bug - we will look into getting it sorted asap.

@kitfoster
Copy link
Collaborator

Thanks for raising @mdenkinger 🙏 this is fixed in v1.11.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants