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

Fix for protocol upper/lower case handling #293

Merged
merged 59 commits into from
Jul 29, 2019
Merged

Fix for protocol upper/lower case handling #293

merged 59 commits into from
Jul 29, 2019

Conversation

vbauzys
Copy link
Contributor

@vbauzys vbauzys commented Jul 26, 2019

Now lower case configured required and vCD returns lower case and they match

vbauzys added 30 commits June 20, 2019 12:37
Signed-off-by: Vaidotas Bauzys <[email protected]>

# Conflicts:
#	vcd/resource_vcd_org_vdc.go
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
…roviders/terraform-provider-vcd into vdc-metadata
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>

# Conflicts:
#	CHANGELOG.md
#	go.mod
#	go.sum
#	vendor/github.com/vmware/go-vcloud-director/v2/govcd/edgegateway.go
#	vendor/modules.txt
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
vbauzys added 2 commits July 26, 2019 12:35
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
@lvirbalas
Copy link
Collaborator

BTW, in the warning of SNAT and DNAT pages:

Warning: When advanced edge gateway is used and the rule is updated using UI, then Id mapping will be lost and terraform won't find the rule anymore and remove it from state.

Please change:

  1. "Id" -> "ID"
  2. "terraform" -> "Terraform"

vbauzys added 3 commits July 26, 2019 13:00
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
@vbauzys
Copy link
Contributor Author

vbauzys commented Jul 26, 2019

BTW, in the warning of SNAT and DNAT pages:

Warning: When advanced edge gateway is used and the rule is updated using UI, then Id mapping will be lost and terraform won't find the rule anymore and remove it from state.

Please change:

1. "Id" -> "ID"

2. "terraform" -> "Terraform"

done

Signed-off-by: Vaidotas Bauzys <[email protected]>
@lvirbalas
Copy link
Collaborator

For reference: for those who have protocol not set from previous versions in the state file, this change will lead to a single occurrence of protocol field's value update from upper to lower case during the next plan?

@vbauzys
Copy link
Contributor Author

vbauzys commented Jul 26, 2019

For reference: for those who have protocol not set from previous versions in the state file, this change will lead to a single occurrence of protocol field's value update from upper to lower case during the next plan?

this happens today, cause vCD api returns lowercase and everytime update happens

vbauzys added 3 commits July 26, 2019 13:52
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
CHANGELOG.md Outdated
@@ -18,7 +18,7 @@ FEATURES:
* `resource/vcd_org_vdc` added Org VDC update and full state read - [GH-275]
* `resource/vcd_org_vdc` added Org VDC metadata support - [GH-276]
* `resource/vcd_snat` added ability to choose network name and type. [GH-282]
* `resource/vcd_dnat` added ability to choose network name and type. [GH-282]
* `resource/vcd_dnat` added ability to choose network name and type. [GH-282] [GH-292] [GH-293]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Never tested before, but should be like that as per https://www.terraform.io/docs/extend/best-practices/versioning.html

IMPROVEMENTS:

Suggested change
* `resource/vcd_dnat` added ability to choose network name and type. [GH-282] [GH-292] [GH-293]
* `resource/vcd_dnat` added ability to choose network name and type. [GH-282, GH-292, GH-293]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

vbauzys added 3 commits July 26, 2019 14:07
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
vbauzys added 2 commits July 26, 2019 15:09
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
* `icmp_sub_type` - (Optional; *v2.0+*) The name of ICMP type. Possible values are address-mask-request, destination-unreachable, echo-request, echo-reply, parameter-problem, redirect, router-advertisement, router-solicitation, source-quench, time-exceeded, timestamp-request, timestamp-reply, any
* `network_type` - (Optional; *v2.4+*) Type of the network on which to apply the NAT rule. Possible values org or ext. *`network_type` will be a required field in the next major version.*
* `network_type` - (Optional; *v2.4+*) Type of the network on which to apply the NAT rule. Possible values `org` or `ext`. *`network_type` will be a required field in the next major version.*
Copy link
Collaborator

Choose a reason for hiding this comment

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

I used org user and hit this with ext:

vcd_dnat.dnat_ext_net: Creating...

Error: unable to find orgVdcNetwork: my-org-network, err: can't find VDC Network: my-org-network

Let's add a sentence:

* `network_type` - (Optional; *v2.4+*) Type of the network on which to apply the NAT rule. Possible values `org` or `ext`. `ext` requires system administrator privileges. *`network_type` will be a required field in the next major version.*

vbauzys added 3 commits July 26, 2019 15:51
Signed-off-by: Vaidotas Bauzys <[email protected]>
Signed-off-by: Vaidotas Bauzys <[email protected]>
Copy link
Collaborator

@lvirbalas lvirbalas left a comment

Choose a reason for hiding this comment

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

Much more stable now with using both kinds of networks and changing between them!

Signed-off-by: Vaidotas Bauzys <[email protected]>
@ghost ghost added the dependencies label Jul 26, 2019
Copy link
Contributor

@dataclouder dataclouder left a comment

Choose a reason for hiding this comment

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

LGTM

@vbauzys vbauzys merged commit e3e476f into vmware:master Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants