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.34k stars 1.74k forks source link

Expose IP addresses through google_sql_database_instance data source #9495

Open socketbox opened 3 years ago

socketbox commented 3 years ago

Community Note

Description

The google_sql_database_instance data source does not export (ie. have as attributes) the IP addresses of the instance. Though, oddly, if the instance has a replica, the network addresses of the replica can be obtained via the data source.

Please make the private and public addresses of the instance itself available via this data source.

New or Affected Resource(s)

google_sql_database_instance currently has a settings.ip_configuration attribute sub-block. These new attributes could be accessible via that sub-block.

References

Initial work for data source: #2841

Documentation for data source: https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/sql_database_instance

Documentation for resource: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/sql_database_instance

b/359704929

ggtisc commented 3 months ago

Currently there isn't any argument to expose IP addresses through google_sql_database_instance data source