Firewall uses v1 API if the priority is unset or has the default value. - #500
Merged
Conversation
danawillow
approved these changes
Oct 3, 2017
|
|
||
| func defaultInUseFunc(d TerraformResourceData, path string, defaultValue interface{}) bool { | ||
| // At read and delete time, there is no change. | ||
| // At create time, all fields are marked has changed. We should only considered the feature active if the field has |
|
|
||
| func updateInUseFunc(d TerraformResourceData, path string, defaultValue interface{}) bool { | ||
| // During a resource update, if the beta field has changes, the feature is considered active even if the new value | ||
| // is the default value. This is because the beta API must be call to change the value of the field back to the |
| }, | ||
| }, | ||
| "beta fields no set": { | ||
| "beta field no set": { |
| Update: baseVersion, | ||
| }, | ||
| }, | ||
| "beta fields is being updated to default value": { |
| Update: baseVersion, | ||
| }, | ||
| }, | ||
| "nested beta field is being updated default value": { |
negz
pushed a commit
to negz/terraform-provider-google
that referenced
this pull request
Oct 17, 2017
…e. (hashicorp#500) * api_versions supports default value * Firewall use v1 API if the priority is set to default value (1000)
negz
pushed a commit
to negz/terraform-provider-google
that referenced
this pull request
Oct 17, 2017
…e. (hashicorp#500) * api_versions supports default value * Firewall use v1 API if the priority is set to default value (1000)
luis-silva
pushed a commit
to luis-silva/terraform-provider-google
that referenced
this pull request
May 21, 2019
<!-- This change is generated by MagicModules. --> /cc @rileykarson
|
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! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #429
Right now, the
google_compute_firewallalways uses the beta API even if no beta fields are set.The is because the beta
priorityfield has a default value set to 1000 in the schema. Even if you don't specify a value for thepriorityfield, the field still has a value (the default value) andgetComputeApiVersionorgetComputeApiVersionUpdateconsider that the field is used and returns that thev0betashould be used.