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

azurerm_virtual_network_gateway: Add OpenVPN as a client protocol option #2126

Merged
merged 7 commits into from
Oct 23, 2018
Merged

azurerm_virtual_network_gateway: Add OpenVPN as a client protocol option #2126

merged 7 commits into from
Oct 23, 2018

Conversation

maetthu
Copy link
Contributor

@maetthu maetthu commented Oct 21, 2018

This patch allows setting OpenVPN as a VPN Gateway client protocol (currently in Public Preview).

Annoucement: https://azure.microsoft.com/en-us/updates/openvpn-support-for-azure-vpn-gateways/
Docs: https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-openvpn

@ghost ghost added the size/XS label Oct 21, 2018
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Hi @maetthu,

Thank you for the PR. It LGTM aside from there being no test. Could we add this to an existing test? Once thats done I look forward to getting this merged for you 🙂

@maetthu
Copy link
Contributor Author

maetthu commented Oct 21, 2018

@katbyte I didn't add it to the test because it will fail unless you'll opt in your Azure subscription for the preview. But if this isn't an issue, then sure, I'll add it of course 🙂

@katbyte
Copy link
Collaborator

katbyte commented Oct 21, 2018

Thanks, I've enabled it in our test subscription so it'll pass for us.

@maetthu
Copy link
Contributor Author

maetthu commented Oct 21, 2018

@katbyte done 🙂

@katbyte
Copy link
Collaborator

katbyte commented Oct 21, 2018

@maetthu,

It looks like you'll need to add a new test:

* azurerm_virtual_network_gateway.test: Error Creating/Updating AzureRM Virtual Network Gateway "acctestvng-2114873327258535664" (Resource Group "acctestRG-2114873327258535664"): network.VirtualNetworkGatewaysClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="VpnClientOpenVpnProtocolCannotCoexist" Message="Vpn client protocol OpenVPN cannot coexist with other vpn client protocols." Details=[]

@ghost ghost added size/M and removed size/XS labels Oct 22, 2018
@maetthu
Copy link
Contributor Author

maetthu commented Oct 22, 2018

@katbyte Oh, sorry, I wasn't aware the OpenVPN option is exclusive.

I've now added a separate test case for setting OpenVPN:

$ TESTARGS="-run TestAccAzureRMVirtualNetworkGateway_vpnClientConfigOpenVPN" make testacc                                                 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run TestAccAzureRMVirtualNetworkGateway_vpnClientConfigOpenVPN -timeout 180m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/version.ProviderVersion=acc"
?       github.com/terraform-providers/terraform-provider-azurerm       [no test files]
=== RUN   TestAccAzureRMVirtualNetworkGateway_vpnClientConfigOpenVPN
--- PASS: TestAccAzureRMVirtualNetworkGateway_vpnClientConfigOpenVPN (1930.51s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm       1930.522s

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @maetthu

Thanks for pushing those changes - there's one minor fix needed here to make this consistent - but this otherwise LGTM 👍

Thanks!

website/docs/r/virtual_network_gateway.html.markdown Outdated Show resolved Hide resolved
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

LGTM now too 👍

@katbyte
Copy link
Collaborator

katbyte commented Oct 23, 2018

confirm test passes:

==> Fixing source code with gofmt...
gofmt -s -w ./azurerm
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./azurerm -v -test.run=TestAccAzureRMVirtualNetworkGateway_vpnClientConfigOpenVPN -timeout 180m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccAzureRMVirtualNetworkGateway_vpnClientConfigOpenVPN
--- PASS: TestAccAzureRMVirtualNetworkGateway_vpnClientConfigOpenVPN (1481.05s)
PASS
ok  	github.com/terraform-providers/terraform-provider-azurerm/azurerm	1481.082s

@katbyte katbyte modified the milestones: 1.19.0, 1.18.0 Oct 23, 2018
@katbyte katbyte merged commit aff8710 into hashicorp:master Oct 23, 2018
katbyte added a commit that referenced this pull request Oct 23, 2018
@maetthu
Copy link
Contributor Author

maetthu commented Oct 23, 2018

cool, thx!

@maetthu maetthu deleted the vnetgw-openvpn branch October 23, 2018 15:50
@tombuildsstuff
Copy link
Contributor

hi @maetthu

Just to let you know that this has been released as a part of v1.18 of the AzureRM Provider (the full changelog is available here). You can upgrade to this by specifying the version in the provider block (as shown below) and then running terraform init -upgrade

provider "azurerm" {
  version = "=1.18.0"
}

Thanks!

@maetthu
Copy link
Contributor Author

maetthu commented Nov 2, 2018

@tombuildsstuff very nice, thank you 🙂

@ghost
Copy link

ghost commented Mar 6, 2019

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 Mar 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants