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

Docs update for google_compute_global_address #9649

Closed

Conversation

keisku
Copy link

@keisku keisku commented Jul 28, 2021

Hi,

I got this error when terraform apply.

│ Error: Error creating GlobalAddress: googleapi: Error 400: Invalid value for field 'resource.purpose': 'VPC_PEERING'. The field cannot be specified with external address., invalid
│ 
│   with google_compute_global_address.static_ip["foo"],
│   on main.tf line 37, in resource "google_compute_global_address" "static_ip":
│   37: resource "google_compute_global_address" "static_ip" {
│ 

I think The field cannot be specified with external address. should be on the document to prevent this error before terraform apply.

@keisku keisku force-pushed the docs-google_compute_global_address branch from ae0eab7 to f9f7f62 Compare July 28, 2021 02:19
@keisku keisku force-pushed the docs-google_compute_global_address branch from f9f7f62 to b86f9ce Compare July 28, 2021 02:21
@megan07 megan07 requested a review from ScottSuarez July 28, 2021 14:09
@keisku keisku changed the title Docs update for google_compute_global_address Docs update for google_compute_global_address Jul 30, 2021
@keisku
Copy link
Author

keisku commented Aug 10, 2021

@ScottSuarez Could you review it,please?

@ScottSuarez
Copy link
Collaborator

Looks like this documentation is outdated in general since we fork these values at release.

This allows you to match any allowed enumeration in the official api.. NAT_AUTO should allow external addresses. Sorry for the confusion here.

The purpose of this resource, which can be one of the following values:

GCE_ENDPOINT for addresses that are used by VM instances, alias IP ranges, load balancers, and similar resources.
DNS_RESOLVER for a DNS resolver address in a subnetwork for a Cloud DNS inbound forwarder IP addresses (regional internal IP address in a subnet of a VPC network)
VPC_PEERING for global internal IP addresses used for private services access allocated ranges.
NAT_AUTO for the regional external IP addresses used by Cloud NAT when allocating addresses using <a href="https://cloud.google.com/nat/docs/ports-and-addresses#addresses" automatic NAT IP address allocation.
IPSEC_INTERCONNECT for addresses created from a private IP range that are reserved for a VLAN attachment in an IPsec-encrypted Cloud Interconnect configuration. These addresses are regional resources. Not currently available publicly.
SHARED_LOADBALANCER_VIP for an internal IP address that is assigned to multiple internal forwarding rules.
PRIVATE_SERVICE_CONNECT for a private network address that is used to configure Private Service Connect. Only global internal addresses can use this purpose.

https://cloud.google.com/compute/docs/reference/rest/v1/globalAddresses

@keisku
Copy link
Author

keisku commented Aug 11, 2021

@ScottSuarez

Thanks for the review.
I edited it following the official document. e00d1be

@ScottSuarez
Copy link
Collaborator

ScottSuarez commented Aug 12, 2021

I've upstreamed this to our code generator, so that pr will supersede this one. Thanks for the contribution! :)

GoogleCloudPlatform/magic-modules#5079

@keisku keisku deleted the docs-google_compute_global_address branch August 12, 2021 00:06
@github-actions
Copy link

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants