Skip to content

Conversation

@kovagoadam
Copy link
Contributor

Modified budget_filter for billing budget

budget_filter resource does not take project_id instead it needs the project number.

Related to #3553 #3554, but that is for project factory and this is for the billing budget itself.

Checklist

I applicable, I acknowledge that I have:

  • Read the contributing guide
  • Ran terraform fmt on all modified files
  • Regenerated the relevant README.md files using tools/tfdoc.py
  • Made sure all relevant tests pass

"$notification_channels:${k}" => v.id
}
)
project_numbers = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local.ctx will not contain the internally defined project numbers, you have to merge them in first.

Check https://github.com/GoogleCloudPlatform/cloud-foundation-fabric/blob/master/modules/project-factory/projects.tf#L51 for comparison

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also don't think we should change the semantics of the project numbers context to have a projects/ prefix: the billing module should interpolate that. We can't expect the caller to know if project numbers should be plain numbers (like in all other modules), or prefixed.

I would do something like this in the billing module instead: try("projects/${local.ctx.project_numbers[v]}", v)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants