这是indexloc提供的服务,不要输入任何密码
Skip to content

[BUG] Provider produced inconsistent result after apply - changing environment variable #358

@baugarcia

Description

@baugarcia

Describe the bug

When attempting to apply a change on environment variables to production environment and making sensitive environment variables:

╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to vercel_project_environment_variables.envvars,
│ provider "provider[\"registry.terraform.io/vercel/vercel\"]" produced an
│ unexpected new value: .variables: inconsistent values for sensitive
│ attribute.
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.

To Reproduce

Run terraform apply on the below. The plan works but the apply fails with the above error.

resource "vercel_project_environment_variables" "envvars" {
  project_id = vercel_project.project.id
  team_id    = local.team_id
  variables = [
    {
      key       = "REDACTED"
      value     = var.redacted
      target    = ["production"]
      sensitive = true
    },
    {
      key       = "REDACTED"
      value     = var.redacted
      target    = ["production"]
    }
  ]
}

Terraform and Vercel Provider Version

terraform --version
Terraform v1.7.4
on windows_amd64
---
  required_providers {
    vercel = {
      source  = "vercel/vercel"
      version = ">= 3.5.0"
    }
    aws = {
      source  = "hashicorp/aws"
      version = "=5.99.1"
    }

Additional Details

Rerunning the apply (in our case, the Github Action, as we have it as CICD pipeline) works fine, but the first apply always errors out with the error above.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions