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

_huaweicloud_vpnaas_service_v2_ created without bandwidth information #281

Closed
thiagoeh opened this issue Mar 25, 2020 · 3 comments · Fixed by #293
Closed

_huaweicloud_vpnaas_service_v2_ created without bandwidth information #281

thiagoeh opened this issue Mar 25, 2020 · 3 comments · Fixed by #293

Comments

@thiagoeh
Copy link

thiagoeh commented Mar 25, 2020

It appears that huaweicloud_vpnaas_service_v2 should be extended to set bandwidth information when creating or modifying the resource.

As the provisioned huaweicloud_vpnaas_service_v2 doesn't have bandwidth information, Huawei Cloud is denying its usage by any huaweicloud_vpnaas_site_connection_v2 associated with it.

I'm using the region ap-southeast-1.

Terraform Version

$ terraform -v
Terraform v0.12.24
+ provider.huaweicloud v1.13.0
+ provider.random v2.2.1

Affected Resource(s)

  • huaweicloud_vpnaas_service_v2
  • huaweicloud_vpnaas_site_connection_v2

Terraform Configuration Files

I'm posting a simplified version of the template I'm working on.
The complete template is available here: https://github.com/HuaweiCloudBrazilTeam/terraforms/tree/9f35fefbf865dc26a6bded1256e1e1d6ef15e267/demos/vpn_vpc_to_vpc

resource "huaweicloud_vpnaas_service_v2" "vpn_service_a" {
  name      = "vpn_service_a"
  router_id = huaweicloud_vpc_v1.vpc_a.id
}

resource "huaweicloud_vpnaas_site_connection_v2" "vpn_connection_a_to_b" {
  name              = "vpn_connection_a_to_b"
  ikepolicy_id      = huaweicloud_vpnaas_ike_policy_v2.policy_ike_a.id
  ipsecpolicy_id    = huaweicloud_vpnaas_ipsec_policy_v2.policy_ipsec_a.id
  vpnservice_id     = huaweicloud_vpnaas_service_v2.vpn_service_a.id
  psk               = var.vpn_psk
  peer_address      = huaweicloud_vpnaas_service_v2.vpn_service_b.external_v4_ip
  peer_id           = huaweicloud_vpnaas_service_v2.vpn_service_b.external_v4_ip
  local_ep_group_id = huaweicloud_vpnaas_endpoint_group_v2.local_ep_group_a.id
  peer_ep_group_id  = huaweicloud_vpnaas_endpoint_group_v2.peer_ep_group_a.id
}

Expected Behavior

VPN Service and functional VPN connection should be provisioned.

Actual Behavior

The VPN service (huaweicloud_vpnaas_service_v2) is created and appears in the console, but the bandwidth details are "null", and can't be edited in the console.
It's vpn_service_a listed at the bottom.
image

The connection (huaweicloud_vpnaas_site_connection_v2) assumes the status "FROZEN" in the console. Please ignore the two additional connections, as they were created directly in the console.

image

Steps to Reproduce

  1. Set provider credential detais in OS_* variables
  2. export TF_VAR_vpn_psk=<vpn password>
  3. terraform apply
@ShiChangkuo
Copy link
Collaborator

@thiagoeh thanks for raising.
you can add the extra param admin_state_up and set to true, then the status of VPN connection will be normal.

resource "huaweicloud_vpnaas_site_connection_v2" "vpn_connection_a_to_b" {
  name           = "vpn_connection_a_to_b"
  admin_state_up = true
  ...
}

With the PR #293, we set the default value to true to make the resource easy to use. you can also experience it.

@thiagoeh
Copy link
Author

thiagoeh commented Apr 3, 2020

I modified my terraform file, explicitly including the admin_state_up = true statement in the huaweicloud_vpnaas_site_connection_v2 resources, and it didn't change the behavior. The problem persists.

The same statement admin_state_up = true was already in the huaweicloud_vpnaas_service_v2 resources.

The VPN Gateway (huaweicloud_vpnaas_service_v2) (not the VPN connection) doesn't get "up". I believe that this is caused by the missing bandwidth information when provisioning it.
The screenshot below is from the console, when creating a VPN Gateway. Please notice as the bandwidth information, that is set in the console, is not provided when creation a huaweicloud_vpnaas_service_v2 resource.
image

@thiagoeh
Copy link
Author

thiagoeh commented Apr 3, 2020

It won't be solved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants