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

fix: explicit depends on for budget project data source #556

Merged
merged 2 commits into from
Mar 11, 2021

Conversation

bharathkkb
Copy link
Member

@bharathkkb bharathkkb commented Mar 11, 2021

fixes #555

@bharathkkb bharathkkb requested a review from a team as a code owner March 11, 2021 03:01
@comment-bot-dev
Copy link

comment-bot-dev commented Mar 11, 2021

Thanks for the PR! 🚀
✅ Lint checks have passed.

@bharathkkb bharathkkb changed the title explicit depends on for budget project data source fix: explicit depends on for budget project data source Mar 11, 2021
@morgante
Copy link
Contributor

@bharathkkb Were you able to reproduce and confirm this fixes it?

@bharathkkb
Copy link
Member Author

@morgante I tested dynamic_shared_vpc locally.
On main when I plan, it errors with

Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
------------------------------------------------------------------------
Error: the user does not have permission to access Project "b-pf-ci-shared2-svc-ab19df" or it may not exist



Error: the user does not have permission to access Project "pf-ci-shared2-svc-ab19df" or it may not exist

With this fix looks like it is deferring the read correctly

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create
 <= read (data resources)

Terraform will perform the following actions:

...

  # module.example.module.host-project.module.budget.data.google_project.project[0] will be read during apply
  # (config refers to values not yet known)
 <= data "google_project" "project"  {
      + auto_create_network = (known after apply)
      + billing_account     = (known after apply)
      + folder_id           = (known after apply)
      + id                  = (known after apply)
      + labels              = (known after apply)
      + name                = (known after apply)
      + number              = (known after apply)
      + org_id              = (known after apply)
      + project_id          = (known after apply)
      + skip_delete         = (known after apply)
    }

and looks like the integrations tests passed too.

@morgante
Copy link
Contributor

Great, thanks for the fix.

@morgante morgante merged commit 454076a into master Mar 11, 2021
@morgante morgante deleted the bharathkkb-patch-1 branch March 11, 2021 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trying to create service project returns error
3 participants