Closed jtravell closed 1 year ago
databricks_spark_version
require a workspace-level provider, and won't work with the account-level provider as your code is showing
@nkvuong Can you please show the actual code required to implement the change that you suggest? And can you please show a link to documentation that explains the code that you will please show?
We are encountering two problems when we try to include a data source of type
databricks_spark_version
into our terraform module as follows:Configuration
Expected Behavior
The expected behavior is for the code to run without error, so that other resources can use the contents of the populated data source without error as well.
Actual Behavior
Instead, we get either of two errors.
First, if we run the code exactly as above, we get an error as follows when we run
terraform apply
:Second, when we try to resolve the error by commenting out line 17 in the above code and by uncommenting every line after line 17 in the above code to include a
depends_on
per this link in the documentation, the following alternative error is returned instead, even though you can clearly see in the code above that theaccount_id
parameter is clearly included in the provider block:We confirmed that all required fields are present in the variables passed into the terraform module, and that all of the values are correct. So the value for
var.databricks_account_id
is indeed being passed in.Steps to Reproduce
To reproduce these two errors, follow these steps:
databricks_account_username
,databricks_account_password
, anddatabricks_account_id
. We got the correct values by creating a new Databricks account and then validating the values by using the values to successfully instantiate this other module before we took the steps in this issue.terraform init
terraform apply
in the same new directory to invoke the breaking code shown at the top of this issue. For this step, use the code with the comments as shown above. This will reproduce the first error.#
from all the lines after 17 to uncomment all lines after line 17.terraform apply
again to reproduce the second error.Terraform and provider versions
Debug Output
For the first error, the debug log is:
Then, for the second error, the debug log is:
Important Factoids
We are NOT using environment variables because our use case prohibits use of environment variables. So we pass the
databricks_account_username
,databricks_account_password
, anddatabricks_account_id
variables in as terraform input variables per the code above.