Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in manifest documentation #2359

Merged
merged 4 commits into from
Dec 4, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions website/docs/r/manifest.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -236,19 +236,23 @@ The following arguments are supported:
- `fields` (Optional) A map of field paths and a corresponding regular expression with a pattern to wait for. The provider will wait until the field's value matches the regular expression. Use `*` for any value.

A field path is a string that describes the fully qualified address of a field within the resource, including its parent fields all the way up to "object". The syntax of a path string follows the rules below:
* Fields of objects are addressed with `.`
* Keys of a map field are addressed with `["<key-string>"]`
* Elements of a list or tuple field are addresed with `[<index-numeral>]`

* Fields of objects are addressed with `.`
* Keys of a map field are addressed with `["<key-string>"]`
* Elements of a list or tuple field are addressed with `[<index-numeral>]`
SarahFrench marked this conversation as resolved.
Show resolved Hide resolved

The following example waits for Kubernetes to create a ServiceAccount token in a Secret, where the `data` field of the Secret is a map.

```hcl
wait {
fields = {
"data[\"token\"]" = ".+"
}
}
```
You can use the [`type()`]() Terraform function to determine the type of a field. With the resource created and present in state, run `terraform console` and then the following command:

You can use the [`type()`](https://developer.hashicorp.com/terraform/language/functions/type) Terraform function to determine the type of a field. With the resource created and present in state, run `terraform console` and then the following command:

```hcl
> type(kubernetes_manifest.my-secret.object.data)
map(string)
Expand Down