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

Gateway Security Policy Rule failing when creating multiple #20892

Open
Samir-Cit opened this issue Jan 13, 2025 · 1 comment
Open

Gateway Security Policy Rule failing when creating multiple #20892

Samir-Cit opened this issue Jan 13, 2025 · 1 comment

Comments

@Samir-Cit
Copy link

Samir-Cit commented Jan 13, 2025

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to a user, that user is claiming responsibility for the issue.
  • Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.

Terraform Version & Provider Version(s)

Terraform v1.9.5
on darwin_amd64

  • provider registry.terraform.io/hashicorp/google v6.15.0
  • provider registry.terraform.io/hashicorp/google-beta v6.15.0

Affected Resource(s)

google_network_security_gateway_security_policy_rule

Terraform Configuration

resource "google_network_security_gateway_security_policy_rule" "rules" {
  count = 6 //Need to be more than 2 to throw the error

  name                    = "tf-test-gateway-sp-rule${count.index}-%{random_suffix}"
  location                = "us-central1"
  gateway_security_policy = google_network_security_gateway_security_policy.default.name
  enabled                 = true  
  description             = "${count.index} rule"
  priority                = count.index+1 // Avoid 0 priority
  session_matcher         = "host() == 'update.com'"
  application_matcher     = "request.method == 'GET'"
  tls_inspection_enabled  = false
  basic_profile           = "DENY"
}

Debug Output

No response

Expected Behavior

The Gateway Security Policy Rules API should be able to create all resources in parallel at once.

Actual Behavior

The API is throwing an error:

"error": {
    "code": 13,
    "message": "an internal error has occurred"
  }

Note: We have the same behavior on the GCP Console interface when trying to create more than 2 rules.

Steps to reproduce

  1. terraform apply

Important Factoids

No response

References

The module terraform-google-secure-web-proxy creates multiple rules and because of this error the module is failing.

The pull request GoogleCloudPlatform/magic-modules#12704 is a workaround for this error.
But we should try to fix and then remove this workaround from the Terraform code.

b/389698237

@zli82016
Copy link
Collaborator

Forwarding the issue to the service team to check the reason for the internal error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants