Commit c378c1c
authored
Add a capability of providing a dev_override for the Databricks Terraform provider (#3336)
## Changes
<!-- Brief summary of your changes that is easy to understand -->
Add a capability of providing a dev_override for the Databricks
Terraform provider in acceptance tests via an environment variable.
Usage:
`DATABRICKS_TF_PROVIDER_DEV_OVERRIDE=<PATH_TO_LOCAL_FOLDER> make test`
## Why
<!-- Why are these changes needed? Provide the context that the reviewer
might be missing.
For example, were there any decisions behind the change that are not
reflected in the code itself? -->
This allows CLI developers to use a "dev preview" of Databricks
Terraform Provider in the acceptance tests.
## Tests
<!-- How have you tested the changes? -->
Manually checked that in the absence of
`DATABRICKS_TF_PROVIDER_DEV_OVERRIDE` the generated .terraformrc remains
intact. When `DATABRICKS_TF_PROVIDER_DEV_OVERRIDE` is provided a new
section is added to the file and acceptance tests start using a local
custom version of the Databricks Terraform provider:
```
# Set these env variables before running databricks cli:
# export DATABRICKS_TF_CLI_CONFIG_FILE=<REDACTED>
# export DATABRICKS_TF_EXEC_PATH=<REDACTED>
provider_installation {
dev_overrides {
"databricks/databricks" = <REDACTED>
}
filesystem_mirror {
path = <REDACTED>
include = ["registry.terraform.io/databricks/databricks"]
}
}
```
<!-- If your PR needs to be included in the release notes for next
release,
add a separate entry in NEXT_CHANGELOG.md as part of your PR. -->1 parent 4f9b8e3 commit c378c1c
1 file changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
106 | 116 | | |
107 | 117 | | |
108 | 118 | | |
109 | 119 | | |
110 | 120 | | |
111 | | - | |
| 121 | + | |
112 | 122 | | |
113 | 123 | | |
114 | 124 | | |
| |||
0 commit comments