Files
hunfabric/tests/modules
lopezvit 97297d6065 fix(project-factory): Correctly interpolate IAM principals in tags (#3704)
* fix(project-factory): Correctly interpolate IAM principals in tags

Moves the processing of `tags` and `tag_bindings` from the `projects` module instance to the `projects-iam` instance.

This fixes a bug where IAM principals for automation service accounts, referenced via `$iam_principals:service_accounts/...`, were not being interpolated within `tags` IAM definitions. The `projects` module was called before the automation service account context was available, leading to the literal string being used instead of the service account email. Processing tags in the `projects-iam` module ensures the full context is available for interpolation.

Adds new tests for both the `project` and `project-factory` modules to validate the fix.

* fix(project-factory): Tag creation is now done in 2 steps.

1st step(projects): Creation of the tags without IAM bindings
2nd step(projects-iam): IAM bindings without creating the tags again
That way we are more backwards compatible as tags and tags values are back to be under  module.project-factory.module.projects["*"].google_tags_tag_*

* fix(modules/project-factory): introduce fix suggested by @ludoo, fix logs

* fix(modules/project-factory): fix linting

---------

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
2026-02-05 15:50:43 +00:00
..
2025-10-24 13:11:17 +02:00
2025-10-24 13:11:17 +02:00
2025-10-24 13:11:17 +02:00
2025-10-24 13:11:17 +02:00
2025-10-24 13:11:17 +02:00
2025-10-24 13:11:17 +02:00
2025-10-24 13:11:17 +02:00
2025-10-24 13:11:17 +02:00
2025-10-24 13:11:17 +02:00
2025-10-24 13:11:17 +02:00
2025-10-24 13:11:17 +02:00