-
Notifications
You must be signed in to change notification settings - Fork 44
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
Unable to tag google-beta
resources
#17
Comments
shlomimatichin
added a commit
to shlomimatichin/terratag
that referenced
this issue
Oct 18, 2020
shlomimatichin
added a commit
to env0/tfschema
that referenced
this issue
Oct 18, 2020
referencing env0/terratag#17 look at the example below: `google_billing_budget` resource comes from `google-beta` provider. previously, code assumed the provider name is the first part by underscore, e.g., `google`. ``` data "google_billing_account" "account" { provider = google-beta billing_account = "000000-0000000-0000000-000000" } resource "google_billing_budget" "budget" { provider = google-beta billing_account = data.google_billing_account.account.id display_name = "Example Billing Budget" budget_filter { projects = ["projects/my-project-name"] credit_types_treatment = "EXCLUDE_ALL_CREDITS" services = ["services/24E6-581D-38E5"] # Bigquery } amount { specified_amount { currency_code = "USD" units = "100000" } } threshold_rules { threshold_percent = 0.5 } threshold_rules { threshold_percent = 0.9 spend_basis = "FORECASTED_SPEND" } } ```
roni-frantchi
added a commit
that referenced
this issue
Oct 19, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Samle Terraform file:
Trying to tag it will fail:
That's
tfschema
failing to resolve that resource type.That is because
tfschema
resolves the provider based on the resource first underscore prefix.But in this case, the resource is named
google_billing_budget
despite only existing forgoogle-beta
provider.Running
tfschema resource list google-beta
shows:But trying to run
tfschema resource google_billing_account
won't find that resource.Trying to runt
tfschema resource google-beta_billing_account
won't work either, as while here the provider is found, the resource name is wrong.Workaround
Opened #18 to short-circuit and skip these resources for now - keeping this issue open till we figure out how to tag these resources as well.
Note If you see this error:
That is because
tfschema
couldn't findgoogle
provider at all - you should add that provider (in conjunction to thegoogle-beta
provider) - even if not used andterraform init
The text was updated successfully, but these errors were encountered: