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

Warn about specifying ip_version and ip_address together #616

Merged
merged 1 commit into from
Jun 5, 2018

Conversation

danielcompton
Copy link
Contributor

No description provided.

If you try and specify them together you will get this error:

 google_compute_global_forwarding_rule.your-rule: Error creating Global Forwarding Rule: googleapi: Error 400: Invalid value for field 'resource.ipVersion': 'IPV4'. Both IP Version and IP Address cannot be specified., invalid
Copy link
Contributor

@paddycarver paddycarver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't ip_address and ip_version be specified on the same resource? I can't seem to find this documented anywhere. Do you get an error if you do?

@danielcompton
Copy link
Contributor Author

danielcompton commented Oct 26, 2017

I can't see any docs for it either, but I got an error when I tried to add ip_version: Both IP Version and IP Address cannot be specified.

$ tfapply
google_compute_global_forwarding_rule.new-ipv4: Creating...
  ip_address:        "" => "<snip>"
  ip_protocol:       "" => "<computed>"
  ip_version:        "" => "IPV4"
  label_fingerprint: "" => "<computed>"
  name:              "" => "new-forwarding-rule"
  port_range:        "" => "80"
  self_link:         "" => "<computed>"
  target:            "" => "https://www.googleapis.com/compute/v1/projects/<snip>/global/targetHttpProxies/<snip>"
Error applying plan:

1 error(s) occurred:

* google_compute_global_forwarding_rule.new-ipv4: 1 error(s) occurred:

* google_compute_global_forwarding_rule.new-ipv4: Error creating Global Forwarding Rule: googleapi: Error 400: Invalid value for field 'resource.ipVersion': 'IPV4'. Both IP Version and IP Address cannot be specified., invalid

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

@paddycarver
Copy link
Contributor

How very bizarre. Let me try a few different types of forwarding rules out (I know there are a few configurations supported that have different requirements) and make sure it's not valid for any of them, then we can go ahead and merge it. In lieu of documentation anywhere else, though, I just want to be sure that this actually holds in all cases.

@danielcompton
Copy link
Contributor Author

danielcompton commented Oct 27, 2017

My assumption was that ip_version was only to be used to create an ephemeral IP address, but would be good to see what the intended behaviour is.

@rosbo
Copy link
Contributor

rosbo commented Jun 5, 2018

I agree with your assumption @danielcompton and like the clarification in the docs.

@rosbo rosbo merged commit 0b647a3 into hashicorp:master Jun 5, 2018
@danielcompton danielcompton deleted the ip-version branch June 5, 2018 20:53
olvesh pushed a commit to olvesh/terraform-provider-google that referenced this pull request Jun 8, 2018
…-google

* 'master' of https://github.com/olvesh/terraform-provider-google: (24 commits)
  Cleanup after v1.14.0 release
  v1.14.0
  Update CHANGELOG.md
  Add new google_compute_regions (hashicorp#1603)
  Update CHANGELOG.md
  Fix forwarding rule data source test (hashicorp#1606)
  Update CHANGELOG.md
  Fix redis authorized network and tests. The Redis API currently only accepts partial links. The tests weren't failing because they weren't actually using the network (oops). There were a few other test issues that I fixed while I was there. Fixes hashicorp#1571. (hashicorp#1599)
  update auth docs (hashicorp#1587)
  Fix network_tier tests.
  Add documentation for network tier (hashicorp#1593)
  Warn about ip_version with ip_address in global forwarding rule (hashicorp#616)
  Update CHANGELOG.md
  add support for network tiers (hashicorp#1530)
  Update CHANGELOG.md
  Allow using in repo configuration for cloudbuild trigger (hashicorp#1557)
  Update CHANGELOG.md
  add update support for redis (hashicorp#1590)
  Update CHANGELOG.md
  Added GCP Netblock Data Source (hashicorp#1416) (hashicorp#1580)
  ...
chrisst pushed a commit to chrisst/terraform-provider-google that referenced this pull request Nov 9, 2018
…icorp#616)

If you try and specify them together you will get this error:

 google_compute_global_forwarding_rule.your-rule: Error creating Global Forwarding Rule: googleapi: Error 400: Invalid value for field 'resource.ipVersion': 'IPV4'. Both IP Version and IP Address cannot be specified., invalid
@ghost
Copy link

ghost commented Nov 18, 2018

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Nov 18, 2018
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.

3 participants