Open Manbeardo opened 6 months ago
Hi @Manbeardo, thanks for opening this issue.
A much simpler alternative to this would be setting the namespace without the coalesce
function, and instead just referencing the name attribute in the metadata
(metadata[0].name). Since name is the first and thus only attribute in the metadata this should always work.
Hope this helped!
What about code that uses generate_name
instead of name
?
Description
It would be dramatically easier to DRY up k8s templates while implicitly ordering the resource DAG if every k8s resource had a "name" attribute. As-is, we can extract the name attribute by using
coalesce(kubernetes_manifest.my_manifest.metadata[*].name...)
, but that's an awfully complicated way to access such a commonly-used attribute.Potential Terraform Configuration
Community Note