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

Unable to determine Google CloudSQL IP address #4220

Closed
coreone opened this issue Dec 8, 2015 · 3 comments
Closed

Unable to determine Google CloudSQL IP address #4220

coreone opened this issue Dec 8, 2015 · 3 comments

Comments

@coreone
Copy link
Contributor

coreone commented Dec 8, 2015

I am trying to use the new Google CloudSQL resource in Terraform, and one of the things I would like to be able to do is use its IP to generate a DNS record (using Terraform). I attempted to do this using something like:

resource "google_dns_record_set" "mysql" {
    managed_zone = "${google_dns_managed_zone.zone.name}"
    name = "consent.${google_dns_managed_zone.zone.dns_name}"
    type = "A"
    ttl = "${var.dns_ttl}"
    rrdatas = ["${google_sql_database_instance.mysql.0.address}"]
}

However, I could not find an address field, or any other field that could potentially be its IPv4 address. I even looked through the terraform.tfstate file to see if I could find anything, but nothing seemed to be in there either. Is there a field in there that google_sql_database_instance resource record that has the IP address, or is this information not retrieved from the Google API? If it's not included in the record, is there a way that it could be included, since it would be very helpful for use in other parts of the project (firewall rules, DNS, etc.)

Thank you!

@lwander
Copy link
Contributor

lwander commented Dec 9, 2015

@coreone, looks like the v1beta4 API changed since I added this resource. It now supports an ipAddress field which I'll add once I get the chance.

@lwander
Copy link
Contributor

lwander commented Feb 22, 2016

See #5245

@lwander lwander closed this as completed Feb 22, 2016
@ghost
Copy link

ghost commented Apr 28, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants