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

[ISSUE] Issue with databricks_git_credential resource #2410

Open
abij opened this issue Jun 15, 2023 · 0 comments
Open

[ISSUE] Issue with databricks_git_credential resource #2410

abij opened this issue Jun 15, 2023 · 0 comments

Comments

@abij
Copy link

abij commented Jun 15, 2023

The environment based personal_access_token is re-evaluated during the apply phase.
But the system.access token changes per job, so they don't match anymore when the apply is in a another job/stage.

Feature implemented #1352.

reproduce

terraform {
  required_providers {
    databricks = {
      source = "databricks/databricks"
    }
  }
}

provider "databricks" {
}

resource "databricks_git_credential" "ado" {
  git_username          = "alex-was-here"
  git_provider          = "azureDevOpsServices"
  personal_access_token = null
}

Usage example

# plan
AZDO_PERSONAL_ACCESS_TOKEN=abc terraform plan -out plan.bin

# apply
AZDO_PERSONAL_ACCESS_TOKEN=other terraform apply plan.bin
# or 
terraform apply plan.bin
│ Error: Provider produced inconsistent final plan
│ 
│ When expanding the plan for
│ databricks_git_credential.ado
│ to include new values learned so far during apply, provider
│ "registry.terraform.io/databricks/databricks" produced an invalid new value
│ for .personal_access_token: inconsistent values for sensitive attribute.
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.

I think the input for the apply stage should not be dependent on environment settings anymore. The Plan phase stored the sensitive secret already in the plan file.

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

1 participant