Skip to content
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

Change budget module: Accept list of project numbers instead of project ID #544

Closed
imrannayer opened this issue Feb 11, 2021 · 7 comments · Fixed by #550
Closed

Change budget module: Accept list of project numbers instead of project ID #544

imrannayer opened this issue Feb 11, 2021 · 7 comments · Fixed by #550
Labels
bug Something isn't working good first issue Good for newcomers P2 high priority issues triaged Scoped and ready for work

Comments

@imrannayer
Copy link
Contributor

google_billing_budget now accepts projects as projects/{project_number}.

projects - (Optional) A set of projects of the form projects/{project_number}, specifying....

Can we change budget module to accept list of project numbers instead of project IDs.

Also make following change in main module:

module "budget" {
  source        = "./modules/budget"
  create_budget = var.budget_amount != null

  projects                         = [module.project-factory.project_number]

@bharathkkb bharathkkb added P2 high priority issues triaged Scoped and ready for work good first issue Good for newcomers labels Feb 11, 2021
@bharathkkb
Copy link
Member

We could keep the interface as is and use a data source to look up the project number

@morgante
Copy link
Contributor

@imrannayer Are project IDs no longer accepted? I'm surprised they would do a breaking change in a minor release.

@bharathkkb Yes we should keep the interface the same.

@imrannayer
Copy link
Contributor Author

@MajorBreakfast Code is not broken but it is picking up the difference (project ID instead of project number) and ask you to apply the update.

      ~ budget_filter {
            credit_types           = []
            credit_types_treatment = "INCLUDE_ALL_CREDITS"
            labels                 = {}
          ~ projects               = [
              - "projects/1234567809",
              + "projects/prj-test-ffc8123454",
            ]
            services               = []
            subaccounts            = []
        }

@morgante
Copy link
Contributor

Thanks, sounds like we should switch to a data source (thought this also sounds like a bug/permadiff in the provider). /cc @rileykarson

@morgante morgante added the bug Something isn't working label Feb 12, 2021
@rileykarson
Copy link
Contributor

Looks like we've got hashicorp/terraform-provider-google#8444 filed already on our side

@p3nnst8r
Copy link

Is there a way to get this in a new 9x branch (for v0.12)? This is also occurring in 9.2.0.

@morgante
Copy link
Contributor

@p3nnst8r We generally don't backport fixes, though hashicorp/terraform-provider-google#8444 should also be able to resolve this once it lands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers P2 high priority issues triaged Scoped and ready for work
Projects
None yet
5 participants