-
Notifications
You must be signed in to change notification settings - Fork 909
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
Add Automation Service Accounts Output #2640
Conversation
Thanks for this PR, can you address the linting errors? |
Hey @joshw123, thanks for this PR. I had a similar issue recently and decided to go with something like this in the FAST stage. output "projects" {
description = "Created projects."
value = {
for k, v in module.projects.projects : k => {
number = v.number
project_id = v.id
automation_buckets = {
for kk, vv in module.projects.automation_buckets :
trimprefix(kk, "${k}/") => vv.name
if startswith(kk, "${k}/")
}
automation_service_accounts = {
for kk, vv in module.projects.automation_service_accounts :
trimprefix(kk, "${k}/") => vv.email
if startswith(kk, "${k}/")
}
}
}
} This links the actual automation service account to the project that created it, and it also gives you the buckets as well. What do you think? |
Ah nice, Yeah this is a nicer way of doing it :) Thank You |
Have you got a PR open for this already @juliocc Thank You! |
@joshw123 I don't have any open PR for it. Feel free to include it directly in yours. |
Thank You for taking a look at this @juliocc I completely forgot about it tbh 😄 ❤️ |
Checklist
I applicable, I acknowledge that I have:
terraform fmt
on all modified filestools/tfdoc.py