GoogleCloudPlatform / terraform-google-cloud-armor

Deploy Cloud Armor security policy
https://registry.terraform.io/modules/GoogleCloudPlatform/cloud-armor/google
Apache License 2.0
34 stars 24 forks source link

Add labels on resource level "google_compute_security_policy" #118

Open Dipanshi293 opened 2 months ago

Dipanshi293 commented 2 months ago

Hi Team,

We are calling terraform-google-cloud-armor module and resource "google_compute_security_policy", but there are no resource labels available in this resource. We also enforced hard-mandatory sentinel policies which check resource labels are attached to each and every resource.

main.tf

module "security_policy_default" {
  source                               = "git::https://github.com/GoogleCloudPlatform/terraform-google-cloud-armor.git?ref=v2.0.1"
  project_id                           = "project-1"
  name                                 = "sample-default-policy"
  description                          = "Test Cloud Armor security policy with preconfigured rules, security rules and custom rules"
  default_rule_action                  = "deny(403)"
  type                                 = "CLOUD_ARMOR"
  layer_7_ddos_defense_rule_visibility = "STANDARD"
  json_parsing                         = "STANDARD"
}
imrannayer commented 2 months ago

@Dipanshi293 feature is not available in provider. I have created feature request for the provider.

Blocked on https://github.com/hashicorp/terraform-provider-google/issues/17993

imrannayer commented 2 months ago

@Dipanshi293 is there any reason why you are using github url in source instead of terraform registry?

module "cloud-armor" {
  source  = "GoogleCloudPlatform/cloud-armor/google"
  version = "2.2.0"
Dipanshi293 commented 2 months ago

This is our module which calls Google Cloud Platform, and which is also available in the Terraform Registry.

github-actions[bot] commented 1 day ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days