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

databricks_workspace_conf ends up as a bug in terraform apply #564

Closed
happyfeet23 opened this issue Mar 15, 2021 · 2 comments
Closed

databricks_workspace_conf ends up as a bug in terraform apply #564

happyfeet23 opened this issue Mar 15, 2021 · 2 comments
Milestone

Comments

@happyfeet23
Copy link

Hi there,

We used databricks_workspace_conf in the terraform code to be able to whitelist some IP addresses on the databricks workspace. The plan stage seems to be fine, but apply stage fails saying this is a bug in terraform.

Terraform Version

Terraform v0.13.2
DataBricks v0.3.1

Affected Resource(s)

Please list the resources as a list, for example:

  • databricks_workspace_conf
  • databricks_ip_access_list

Environment variable names

None related

Terraform Configuration Files

resource "databricks_workspace_conf" "this" {
  custom_config = {
    "enableIpAccessLists": true
  }
}

resource "databricks_ip_access_list" "allowed-list" {
  label = "allow_in"
  list_type = "ALLOW"
  ip_addresses = [
    "1.2.3.0/24",
    "1.2.5.0/24"
  ]
  depends_on = [databricks_workspace_conf.this]
}

Debug Output

Error: Provider produced inconsistent result after apply

When applying changes to module.databricks.databricks_workspace_conf.ipaccess,
provider "registry.terraform.io/databrickslabs/databricks" produced an
unexpected new value: Root resource was present, but now absent.

This is a bug in the provider, which should be reported in the provider's own
issue tracker

Expected Behavior

the sent IP list should be added in whitelisting for db workspace

Actual Behavior

Error: Provider produced inconsistent result after apply

When applying changes to module.databricks.databricks_workspace_conf.ipaccess,
provider "registry.terraform.io/databrickslabs/databricks" produced an
unexpected new value: Root resource was present, but now absent.

This is a bug in the provider, which should be reported in the provider's own
issue tracker

Steps to Reproduce

the above block of code can be placed in the databricks_workspace file to allowlist Ips and try terraform apply. Terraform plan works fine. Apply gives the error

Important Factoids

Are there anything atypical about your accounts that we should know?
None

One similar issue we found

https://github.com/databrickslabs/terraform-provider-databricks/blob/master/docs/resources/ip_access_list.md

@nfx
Copy link
Contributor

nfx commented Mar 15, 2021

Can you try surrounding "true" with quotes?

@happyfeet23
Copy link
Author

happyfeet23 commented Mar 15, 2021 via email

@nfx nfx added this to the v0.3.2 milestone Mar 27, 2021
nfx added a commit that referenced this issue Apr 1, 2021
* 404 status was handled as resource deletion upon the first Create request, which resulted in `Provider produced inconsistent result after apply`
* This commit removes that handling from `common.Resource#Create` and properly propagates error messages back to terraform process
* Fixes #564 #576
@nfx nfx mentioned this issue Apr 1, 2021
@nfx nfx closed this as completed in 5121dfc Apr 1, 2021
michael-berk pushed a commit to michael-berk/terraform-provider-databricks that referenced this issue Feb 15, 2023
* 404 status was handled as resource deletion upon the first Create request, which resulted in `Provider produced inconsistent result after apply`
* This commit removes that handling from `common.Resource#Create` and properly propagates error messages back to terraform process
* Fixes databricks#564 databricks#576
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

2 participants