Skip to content

Commit 1989fe1

Browse files
authored
Document missing id attributes in a number of resources (#2672)
Some customers are confused when to use `id` vs other attributes/parameters when creating dependencies between resources, so adding missing documentation for exported attributes. Also fixed import documentation for `databricks_connection` resource.
1 parent 64f0e73 commit 1989fe1

File tree

12 files changed

+75
-4
lines changed

12 files changed

+75
-4
lines changed

docs/resources/catalog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ The following arguments are required:
3636
* `options` - (Optional) For Foreign Catalogs: the name of the entity from an external data source that maps to a catalog. For example, the database name in a PostgreSQL server.
3737
* `force_destroy` - (Optional) Delete catalog regardless of its contents.
3838

39+
## Attribute Reference
40+
41+
In addition to all arguments above, the following attributes are exported:
42+
43+
* `id` - ID of this catalog - same as the `name`.
44+
3945
## Import
4046

4147
This resource can be imported by name:

docs/resources/connection.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,16 @@ The following arguments are supported:
4040
- `properties` - (Optional) Free-form connection properties.
4141
- `comment` - (Optional) Free-form text.
4242

43+
## Attribute Reference
44+
45+
In addition to all arguments above, the following attributes are exported:
46+
47+
* `id` - ID of this connection in form of `<metastore_id>|<name>`.
48+
4349
## Import
4450

45-
This resource can be imported by `name`
51+
This resource can be imported by `id`:
4652

4753
```bash
48-
terraform import databricks_connection.this <connection_name>
54+
terraform import databricks_connection.this '<metastore_id>|<name>'
4955
```

docs/resources/external_location.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,15 @@ The following arguments are required:
128128
- `access_point` - (Optional) The ARN of the s3 access point to use with the external location (AWS).
129129
- `encryption_details` - (Optional) The options for Server-Side Encryption to be used by each Databricks s3 client when connecting to S3 cloud storage (AWS).
130130

131+
## Attribute Reference
132+
133+
In addition to all arguments above, the following attributes are exported:
134+
135+
* `id` - ID of this external location - same as `name`.
136+
131137
## Import
132138

133-
This resource can be imported by name:
139+
This resource can be imported by `name`:
134140

135141
```bash
136142
terraform import databricks_external_location.this <name>

docs/resources/metastore.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ The following arguments are required:
5858
* `delta_sharing_organization_name` - (Optional) The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing. Once this is set it cannot be removed and can only be modified to another valid value. To delete this value please taint and recreate the resource.
5959
* `force_destroy` - (Optional) Destroy metastore regardless of its contents.
6060

61+
## Attribute Reference
62+
63+
In addition to all arguments above, the following attributes are exported:
64+
65+
* `id` - system-generated ID of this Unity Catalog Metastore.
6166
## Import
6267

6368
This resource can be imported by ID:

docs/resources/metastore_assignment.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,9 @@ The following arguments are required:
2929
* `metastore_id` - Unique identifier of the parent Metastore
3030
* `workspace_id` - id of the workspace for the assignment
3131
* `default_catalog_name` - (Optional) Default catalog used for this assignment, default to `hive_metastore`
32+
33+
## Attribute Reference
34+
35+
In addition to all arguments above, the following attributes are exported:
36+
37+
* `id` - ID of this metastore assignment in form of `<metastore_id>|<metastore_id>`.

docs/resources/metastore_data_access.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ The following arguments are required:
7777
* `application_id` - The application ID of the application registration within the referenced AAD tenant
7878
* `client_secret` - The client secret generated for the above app ID in AAD. **This field is redacted on output**
7979

80+
## Attribute Reference
81+
82+
In addition to all arguments above, the following attributes are exported:
83+
84+
* `id` - ID of this data access configuration in form of `<metastore_id>|<name>`.
85+
8086
## Import
8187

8288
-> **Note** Importing this resource is not currently supported.

docs/resources/provider.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ The following arguments are required:
3636
* `authentication_type` - (Optional) The delta sharing authentication type. Valid values are `TOKEN`.
3737
* `recipient_profile_str` - (Optional) This is the json file that is created from a recipient url.
3838

39+
## Attribute Reference
40+
41+
In addition to all arguments above, the following attributes are exported:
42+
43+
* `id` - ID of this provider - same as the `name`.
44+
3945
## Related Resources
4046

4147
The following resources are used in the same context:

docs/resources/recipient.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ In addition to all arguments above, the following attributes are exported:
100100
* `updated_at` - Time at which this recipient Token was updated, in epoch milliseconds.
101101
* `updated_by` - Username of recipient Token updater.
102102

103+
## Attribute Reference
104+
105+
In addition to all arguments above, the following attributes are exported:
106+
107+
* `id` - ID of this recipient - same as the `name`.
108+
103109
## Related Resources
104110

105111
The following resources are often used in the same context:

docs/resources/schema.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ The following arguments are required:
4141
* `properties` - (Optional) Extensible Schema properties.
4242
* `force_destroy` - (Optional) Delete schema regardless of its contents.
4343

44+
## Attribute Reference
45+
46+
In addition to all arguments above, the following attributes are exported:
47+
48+
* `id` - ID of this schema in form of `<catalog_name>.<name>`.
49+
4450
## Import
4551

4652
This resource can be imported by its full name:

docs/resources/sql_table.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ Currently, changing the column definitions for a table will require dropping and
9191
* `comment` - (Optional) User-supplied free-form text.
9292
* `nullable` - (Optional) Whether field is nullable (Default: `true`)
9393

94+
## Attribute Reference
95+
96+
In addition to all arguments above, the following attributes are exported:
97+
98+
* `id` - ID of this table in form of `<catalog_name>.<schema_name>.<name>`.
99+
94100
## Import
95101

96102
This resource can be imported by its full name:

0 commit comments

Comments
 (0)