Skip to content

Commit 4f36c91

Browse files
authored
[Internal] Add Well Known Types Documentation (#4775)
## Changes <!-- Summary of your changes that are easy to understand --> Add a README.md section on well known types ## 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 NO_CHANGELOG=true
1 parent ab5f39c commit 4f36c91

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,43 @@ If you didn't check-in [`.terraform.lock.hcl`](https://www.terraform.io/language
9999
## Use of Terraform exporter
100100

101101
The exporter functionality is experimental and provided as is. It has an evolving interface, which may change or be removed in future versions of the provider.
102+
103+
## Well-Known Types
104+
105+
### Duration Fields
106+
107+
Duration fields accept Go-style duration strings. Use standard time units like `s` (seconds), `m` (minutes), `h` (hours).
108+
109+
```hcl
110+
resource "databricks_example" "this" {
111+
timeout_duration = "30m" # 30 minutes
112+
retry_delay = "10s" # 10 seconds
113+
max_lifetime = "24h" # 24 hours
114+
short_timeout = "500ms" # 500 milliseconds
115+
}
116+
```
117+
118+
### Timestamp Fields
119+
120+
Timestamp fields require RFC3339 formatted datetime strings. Include timezone information for best results.
121+
122+
```hcl
123+
resource "databricks_example" "this" {
124+
start_time = "2023-10-15T14:30:00Z" # UTC timezone
125+
end_time = "2023-10-15T14:30:00-07:00" # Pacific timezone
126+
created_at = "2023-10-15T14:30:00.123Z" # With milliseconds
127+
}
128+
```
129+
130+
### JSON Value Fields
131+
132+
JSON value fields accept JSON-encoded strings. The provider will normalize and validate the JSON structure.
133+
134+
```hcl
135+
resource "databricks_example" "this" {
136+
settings = jsonencode({
137+
enabled = true
138+
options = ["option1", "option2"]
139+
})
140+
}
141+
```

0 commit comments

Comments
 (0)