Skip to content

Commit

Permalink
update ignore_annotations/labels doc to include context for regexp …
Browse files Browse the repository at this point in the history
…in nested metadata objects (hashicorp#2454)

* add note about regexp and nested metadata objects

* Update website/docs/index.html.markdown

Co-authored-by: Alex Somesan <[email protected]>

---------

Co-authored-by: Alex Somesan <[email protected]>
  • Loading branch information
BBBmau and alexsomesan authored Apr 4, 2024
1 parent bff3ae2 commit 7b31568
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions website/docs/index.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ In certain cases, external systems can add and modify resources annotations and

Both attributes support RegExp to match metadata objects more effectively.

~> **Note:** RegExp will only work on root metadata objects. It's currently not possible to use RegExp for ignoring annotations/labels in metadata objects that are nested such as `spec.template.metadata[0].annotations["..."]`.

Please keep in mind that all data sources remain unaffected, and the provider always returns all labels and annotations, despite the `ignore_annotations` and `ignore_labels` settings. The same applies to the pod and job definitions that fall under templates. To ignore certain annotations and/or labels on the template level, please use the `ignore_changes` feature of the [lifecycle](https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle) meta-argument.

### Examples
Expand Down

0 comments on commit 7b31568

Please sign in to comment.