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

ComputeSecurityPolicy: Missing Regional scope option #3783

Open
3 tasks done
ap0phi5 opened this issue Feb 25, 2025 · 0 comments
Open
3 tasks done

ComputeSecurityPolicy: Missing Regional scope option #3783

ap0phi5 opened this issue Feb 25, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@ap0phi5
Copy link

ap0phi5 commented Feb 25, 2025

Checklist

  • I did not find a related open enhancement request.
  • I understand that enhancement requests filed in the GitHub repository are by default low priority.
  • If this request is time-sensitive, I have submitted a corresponding issue with GCP support.

Describe the feature or resource

There seems currently no way to scope a Cloud Armor policy to regional (from global) using KCC.

I believe Terraform have gone down the route of having a separate resource-type for Regional Security Policy, however there is no equivalent here.
https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_region_security_policy

This creates the security-policy in global scope:

apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeSecurityPolicy
metadata:
  name: allow-all
spec:
  description: A permissive policy to allow all traffic
  rule:
  - description: Rule matching all IPs with priority 2147483647, set to allow.
    action: allow
    priority: 2147483647
    match:
      versionedExpr: SRC_IPS_V1
      config:
        srcIpRanges:
        - "*"

The following app will not bind to the allow-all policy if my-app is a regional service:

apiVersion: networking.gke.io/v1
kind: GCPBackendPolicy
metadata:
  name: my-app-backend-policy
spec:
  default:
    securityPolicy: allow-all
  targetRef:
    group: ""
    kind: Service
    name: my-app
@ap0phi5 ap0phi5 added the enhancement New feature or request label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant