Skip to content

Commit 314622b

Browse files
authored
Fix databricks_mws_workspaces import documentation (#4699)
## Changes The workspace import documentation references `databricks_mws_networks` by mistake. This is probably a copy-paste error. Additionally, I have made sure that all resources are documented using the `import` block syntax first, followed by the `terraform import` command. ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [ ] `make test` run locally - [ ] relevant change in `docs/` folder - [ ] covered with integration tests in `internal/acceptance` - [ ] using Go SDK - [ ] using TF Plugin Framework
1 parent 09c1103 commit 314622b

File tree

85 files changed

+818
-66
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+818
-66
lines changed

NEXT_CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
### Documentation
1212

13+
* Fix import documentation for all resources ([#4699](https://github.com/databricks/terraform-provider-databricks/pull/4699/files)).
14+
1315
### Exporter
1416

1517
### Internal Changes

docs/resources/aibi_dashboard_embedding_access_policy_setting.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@ The resource supports the following arguments:
2929

3030
This resource can be imported by predefined name `global`:
3131

32+
```hcl
33+
import {
34+
to = databricks_aibi_dashboard_embedding_access_policy_setting.this
35+
id = "global"
36+
}
37+
```
38+
39+
Alternatively, when using `terraform` version 1.4 or earlier, import using the `terraform import` command:
40+
3241
```bash
3342
terraform import databricks_aibi_dashboard_embedding_access_policy_setting.this global
3443
```

docs/resources/aibi_dashboard_embedding_approved_domains_setting.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ The resource supports the following arguments:
3636

3737
This resource can be imported by predefined name `global`:
3838

39+
```hcl
40+
import {
41+
to = databricks_aibi_dashboard_embedding_approved_domains_setting.this
42+
id = "global"
43+
}
44+
```
45+
46+
Alternatively, when using `terraform` version 1.4 or earlier, import using the `terraform import` command:
47+
3948
```bash
4049
terraform import databricks_aibi_dashboard_embedding_approved_domains_setting.this global
4150
```

docs/resources/alert.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,15 @@ resource "databricks_permissions" "alert_usage" {
203203

204204
This resource can be imported using alert ID:
205205

206+
```hcl
207+
import {
208+
to = databricks_alert.this
209+
id = "<alert-id>"
210+
}
211+
```
212+
213+
Alternatively, when using `terraform` version 1.4 or earlier, import using the `terraform import` command:
214+
206215
```bash
207216
terraform import databricks_alert.this <alert-id>
208217
```

docs/resources/app.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ subcategory: "Apps"
33
---
44
# databricks_app Resource
55

6-
[Databricks Apps](https://docs.databricks.com/en/dev-tools/databricks-apps/index.html) run directly on a customers Databricks instance, integrate with their data, use and extend Databricks services, and enable users to interact through single sign-on. This resource creates the application but does not handle app deployment, which should be handled separately as part of your CI/CD pipeline.
6+
[Databricks Apps](https://docs.databricks.com/en/dev-tools/databricks-apps/index.html) run directly on a customer's Databricks instance, integrate with their data, use and extend Databricks services, and enable users to interact through single sign-on. This resource creates the application but does not handle app deployment, which should be handled separately as part of your CI/CD pipeline.
77

88
-> This feature is in [Public Preview](https://docs.databricks.com/release-notes/release-types.html).
99

@@ -105,7 +105,7 @@ import {
105105
}
106106
```
107107

108-
or using the `terraform` CLI:
108+
Alternatively, when using `terraform` version 1.4 or earlier, import using the `terraform import` command:
109109

110110
```bash
111111
terraform import databricks_app.this <app_name>

docs/resources/artifact_allowlist.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,17 @@ In addition to all arguments above, the following attributes are exported:
5050

5151
This resource can be imported by name:
5252

53+
```hcl
54+
import {
55+
to = databricks_artifact_allowlist.this
56+
id = "<metastore_id>|<artifact_type>"
57+
}
58+
```
59+
60+
Alternatively, when using `terraform` version 1.4 or earlier, import using the `terraform import` command:
61+
5362
```bash
54-
terraform import databricks_artifact_allowlist.this '<metastore_id>|<artifact_type>'
63+
terraform import databricks_artifact_allowlist.this "<metastore_id>|<artifact_type>"
5564
```
5665

5766
## Related Resources

docs/resources/budget.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,19 @@ In addition to all arguments above, the following attributes are exported:
9090

9191
## Import
9292

93-
This resource can be imported by Databricks account ID and Budget.
93+
This resource can be imported by Databricks account ID and Budget:
9494

95-
```sh
96-
terraform import databricks_budget.this '<account_id>|<budget_configuration_id>'
95+
```hcl
96+
import {
97+
to = databricks_budget.this
98+
id = "<account_id>|<budget_configuration_id>"
99+
}
100+
```
101+
102+
Alternatively, when using `terraform` version 1.4 or earlier, import using the `terraform import` command:
103+
104+
```bash
105+
terraform import databricks_budget.this "<account_id>|<budget_configuration_id>"
97106
```
98107

99108
## Related Resources

docs/resources/budget_policy.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The following arguments are available:
2828

2929
### custom_tags Configuration Block
3030

31-
* `key` - The key of the tag. - Must be unique among all custom tags of the same policy. Cannot be budget-policy-name”, “budget-policy-id or "budget-policy-resolution-result" as these tags are preserved.
31+
* `key` - The key of the tag. - Must be unique among all custom tags of the same policy. Cannot be "budget-policy-name", "budget-policy-id" or "budget-policy-resolution-result" as these tags are preserved.
3232
* `value` - The value of the tag.
3333

3434
## Attribute Reference
@@ -45,6 +45,15 @@ In addition to all arguments above, the following attribute is exported:
4545

4646
This resource can be imported by ID.
4747

48+
```hcl
49+
import {
50+
to = databricks_budget_policy.this
51+
id = "policy_id"
52+
}
53+
```
54+
55+
Alternatively, when using `terraform` version 1.4 or earlier, import using the `terraform import` command:
56+
4857
```sh
4958
terraform import databricks_budget_policy.this policy_id
5059
```

docs/resources/catalog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ In addition to all arguments above, the following attributes are exported:
4949

5050
This resource can be imported by name:
5151

52+
```hcl
53+
import {
54+
to = databricks_catalog.this
55+
id = "<name>"
56+
}
57+
```
58+
59+
Alternatively, when using `terraform` version 1.4 or earlier, import using the `terraform import` command:
60+
5261
```bash
5362
terraform import databricks_catalog.this <name>
5463
```

docs/resources/catalog_workspace_binding.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ The following arguments are required:
4040

4141
This resource can be imported by using combination of workspace ID, securable type and name:
4242

43-
```sh
43+
```hcl
44+
import {
45+
to = databricks_catalog_workspace_binding.this
46+
id = "<workspace_id>|<securable_type>|<securable_name>"
47+
}
48+
```
49+
50+
Alternatively, when using `terraform` version 1.4 or earlier, import using the `terraform import` command:
51+
52+
```bash
4453
terraform import databricks_catalog_workspace_binding.this "<workspace_id>|<securable_type>|<securable_name>"
4554
```

0 commit comments

Comments
 (0)