hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.32k stars 1.72k forks source link

Add connection_state read-only attribute to the google_apigee_endpoint_attachment resource #12323

Closed pehowell closed 2 years ago

pehowell commented 2 years ago

Community Note

Description

Google is adding a new read-only attribute on the Apigee EndpointAttachment resource, called connection_state. This attribute exposes the state of the underlying Private Service Connect connection to the service attachment in the customer's project for southbound network connectivity. The attribute allows for verifying the Apigee project was accepted by the service attachment, or if it is in some other state that requires further work or troubleshooting.

A list of all of the current states and their meaning may be found in the REST API reference.

New or Affected Resource(s)

Potential Terraform Configuration

There would be no changes to existing Terraform configurations for EndpointAttachments, as this new attribute is read-only. The configuration would continue to look like the example below:

resource "google_apigee_endpoint_attachment" "apigee_endpoint_attachment" {
  org_id                 = google_apigee_organization.apigee_org.id
  endpoint_attachment_id = "test1"
  location               = "us-west2"
  service_attachment     = google_compute_service_attachment.psc_ilb_service_attachment.id
}

By adding connection_state, Terraform users would be able to access the read-only attribute via the Terraform state:

 $ terraform show
# google_apigee_endpoint_attachment.apigee_endpoint_attachment:
resource "google_apigee_endpoint_attachment" "apigee_endpoint_attachment" {
    connection_state       = "PENDING" # new read-only attribute
    endpoint_attachment_id = "test1"
    host                   = "7.0.5.2"
    id                     = "organizations/example-test-org/endpointAttachments/test1"
    location               = "us-west2"
    name                   = "organizations/example-test-org/endpointAttachments/test1"
    org_id                 = "organizations/example-test-org"
    service_attachment     = "projects/example-test-org/regions/us-west2/serviceAttachments/test1"

    timeouts {}
}

References

Internal issue: b/242769191

pehowell commented 2 years ago

Hi, @ScottSuarez, would you be able to review the associated PR? Thanks!

github-actions[bot] commented 2 years ago

I'm going to lock this issue because it has been closed for 30 days ā³. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.