Skip to content

Latest commit

 

History

History
56 lines (41 loc) · 2.23 KB

File metadata and controls

56 lines (41 loc) · 2.23 KB

Public VPN gateway example

Configuration in this directory creates a single VPN gateway and associate two EIP to enable the public network access.

Usage

To run this example you need to execute:

$ terraform init
$ terraform plan
$ terraform apply

Run terraform destroy when you don't need these resources.

Requirements

Name Version
Terraform >= 1.3.0
Huaweicloud Provider >= 1.73.0

Modules

Name Source Version
vpn_network ../../../terraform-huaweicloud-vpc v1.2.0
vpn_gateway ../../modules/vpn-gateway N/A

Resources

No resource.

Inputs

Name Description Value
region_name The region where the resources are located "cn-north-4"
enterprise_project_id Used to specify whether the resource is created under the enterprise project (this parameter is only valid for enterprise users) "0"
vpc_name The name of the VPC resource "VPC-Test"
vpc_cidr The CIDR block of the VPC resource "172.16.0.0/24"
subnets_configuration The configuration for the subnet resources to which the VPC belongs
[
{
"name": "VPC-Subnet-Test",
"cidr": "172.16.0.0/24",
"ipv6_enabled": false,
"dhcp_enabled": false
}
]
gateway_name The name of the VPN gateway "VPN-GW-Test"
gateway_public_eip_configurations The EIP configurations of the public VPN gateway
[
{
"type": "5_bgp",
"bandwidth_name": "VPN-GW-Test-EIP-01",
"bandwidth_size": 5,
"charge_mode": "traffic"
},
{
"type": "5_bgp",
"bandwidth_name": "VPN-GW-Test-EIP-02",
"bandwidth_size": 5,
"charge_mode": "traffic"
}
]
delete_eip_on_termination Whether to delete the EIP when the VPN gateway is deleted true

Outputs

Name Description
gateway_id The ID of the VPN gateway