Skip to content

Creation of PSC Service Attachment Failing for Secure Web Proxy #22169

Open
@smartyr73

Description

@smartyr73

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.11.3
on darwin_arm64

  • provider registry.terraform.io/hashicorp/google v6.27.0
  • provider registry.terraform.io/hashicorp/google-beta v6.27.0
  • provider registry.terraform.io/hashicorp/random v3.7.1

Affected Resource(s)

google_compute_service_attachment

Terraform Configuration

Terraform Configuration

data "google_compute_subnetwork" "psc_subnet" {
  name    = "xxxxxxxxx
  region  = "europe-west2"
  project = "xxxxxxxxxxxxx"
}

resource "google_compute_service_attachment" "this" {

  provider    = google
  name        = "swp-service-attachment"
  region      = "europe-west2"
  description = "PSC Service Attachment for SWP"
  enable_proxy_protocol = true
  connection_preference = "ACCEPT_AUTOMATIC"
  nat_subnets           = [data.google_compute_subnetwork.psc_subnet.id]
  target_service        = "xxxxxxxxx"
}

Debug Output

https://gist.github.com/smartyr73/4325d9a33871f5aa6a9b70c99d785e8c

Expected Behavior

Resource should be successfully created on running terraform apply based on the following plan:

Terraform will perform the following actions:

  # google_compute_service_attachment.psc_swp_service_attachment will be created
  + resource "google_compute_service_attachment" "psc_swp_service_attachment" {
      + connected_endpoints         = (known after apply)
      + connection_preference       = "ACCEPT_AUTOMATIC"
      + description                 = "PSC Service Attachment for SWP"
      + enable_proxy_protocol       = true
      + fingerprint                 = (known after apply)
      + id                          = (known after apply)
      + name                        = "swp-service-attachment"
      + nat_subnets                 = [
          + "projects/<PROJECT_NAME>regions/europe-west2/subnetworks/<SUBNET_NAME>",
        ]
      + project                     = "<PROJECT_NAME>"
      + propagated_connection_limit = (known after apply)
      + reconcile_connections       = (known after apply)
      + region                      = "europe-west2"
      + self_link                   = (known after apply)
      + target_service              = "<TARGET_SERVICE>"
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Actual Behavior

Terraform crashes on attempting to run terraform apply

Steps to reproduce

  1. Generate a successful terraform plan to create a PSC service attachment point to a secure web proxy as per the above terraform configuration and listed in the expected behaviour
  2. Run a terraform apply based on the above plan

Important Factoids

  1. Identical behaviour is observed with both the main and the beta provider.
  2. This is to create a PSC service attachment for an existing secure web proxy

References

No response

b/408197802

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions