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

IP address reference attribute for psc_auto_connections not documented #20613

Open
Rei-Suzuki1729 opened this issue Dec 6, 2024 · 0 comments

Comments

@Rei-Suzuki1729
Copy link

Rei-Suzuki1729 commented Dec 6, 2024

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.

Description

In Terraform Provider for Google v6.12.0, the psc_auto_connections field was added to the google_sql_database_instance resource (#20307).However, there is no attribute listed in the official documentation that references the IP address associated with Private Service Connect (PSC) endpoints created using this field.

Currently, you need to use the Google Cloud Console or CLI to reference the IP address, which cannot be referenced directly within Terraform.

As an expected behaviour, we would like to see an attribute added that can refer to the IP address of PSC endpoints created by psc_auto_connections and clearly stated in the documentation.

New or Affected Resource(s)

  • google_sql_database_instance

Potential Terraform Configuration

resource "google_sql_database_instance" "main" {
  name             = "psc-enabled-main-instance"
  database_version = "MYSQL_8_0"
  settings {
    tier = "db-f1-micro"
    ip_configuration {
      psc_config {
        psc_enabled                = true
        allowed_consumer_projects  = ["allowed-consumer-project-name"]
        psc_auto_connections {
          consumer_network           = "network-name"
          consumer_service_project_id = "project-id"
        }
      }
      ipv4_enabled = false
    }
    backup_configuration {
      enabled             = true
      binary_log_enabled  = true
    }
    availability_type = "REGIONAL"
  }
}

output "psc_endpoint_ip" {
  value = google_sql_database_instance.main.pscAuto_endpoint_ip
}


References

#20307
Terraform Provider for Google v6.12.0 Release Notes
Google Cloud SQL documentation: getting a Private Service Connect endpoint
Terraform Registry: google_sql_database_instance resource attribute reference

b/383122736

@github-actions github-actions bot added forward/review In review; remove label to forward service/sqladmin-cp labels Dec 6, 2024
@BBBmau BBBmau removed the forward/review In review; remove label to forward label Dec 9, 2024
@BBBmau BBBmau added this to the Goals milestone Dec 9, 2024
@BBBmau BBBmau added the size/s label Dec 9, 2024
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