https://infracost.io logo
#help
Title
# help
r

red-toothbrush-65619

09/26/2023, 6:25 AM
When selecting a resource or project in the wildcard section of tagging policy's can you do a negative. We have on project with one resource that we wish to exclude labels from. (We still investigation why this resource comaplians about the labels set).
l

little-author-61621

09/26/2023, 9:08 AM
Hi @red-toothbrush-65619, we don’t support this yet. I’ll tag @white-airport-8778 here so he sees this feedback. Let me know if I can help to work out why that resource is complaining.
w

white-airport-8778

09/26/2023, 9:49 AM
@red-toothbrush-65619 for the FinOps policies we’re developing a method to exclude certain resources from the checks - it sounds like a similar thing is needed for tagging policies. Can you paste a screenshot of the failing resource? It might be that we have a bug or need to add an edge case for that resource type’s tags (e.g. for
google_monitoring_alert_policy
we have to check
user_labels
and not
labels
)
r

red-toothbrush-65619

09/26/2023, 9:53 AM
Copy code
resource "google_cloud_identity_group" "level0_folder_groups" {
  provider = google-beta
  parent   = "customers/${local.customer_id}"

  for_each = google_folder.level0

  display_name = "<redactied>-${each.key}"
  description  = "Access Control group for the GCP folder - ${each.value.display_name}"

  group_key {
    id = lower("<redacted>-${each.key}@${local.domain}")
  }

  labels = {
    "<http://cloudidentity.googleapis.com/groups.discussion_forum|cloudidentity.googleapis.com/groups.discussion_forum>" = ""
    service_name      = local.labels.service_name
    tech_contact      = local.labels.tech_contact
    business_contact  = local.labels.business_contact
    service_owner     = local.labels.service_owner
   # release_id        = "automated"
    budget_code       = local.labels.budget_code
    nro               = local.labels.nro
  }
}
FYI still waiting to see if the is some other reason
image.png
look like this is going to be are side, i just checked the code and i think i see a mistake i have the Engineer re-code it and try .
w

white-airport-8778

09/26/2023, 11:08 AM
Very cool - I see that you’re using the regex feature of the tagging policies to check these
Let us know if it was indeed an issue on the code side, otherwise we can jump on it
r

red-toothbrush-65619

09/27/2023, 9:23 AM
Engineer made some change and the issue is now gone.
w

white-airport-8778

09/27/2023, 9:27 AM
Thanks for confirming @red-toothbrush-65619!
3 Views