-
Notifications
You must be signed in to change notification settings - Fork 141
add resrouce vpn gateway
, customer gateway
and vpn connection
#183
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
020acef
add resrouce `vpn gateway`, `customer gateway` and `vpn connection`
43d7f92
Merge branch 'master' into vpn-dev
gailwang 8be7197
add erb file and changelog, fix spelling bugs
ea2d951
remove extra space character
db420ff
fix bugs
f32f4da
fix version issue
dbcb941
Merge branch 'master' into vpn-dev
gailwang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
|
||
resource "tencentcloud_vpn_customer_gateway" "example" { | ||
name = "example" | ||
public_ip_address = "3.3.3.3" | ||
|
||
tags = { | ||
gailwang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
test = "example" | ||
} | ||
} | ||
|
||
data "tencentcloud_vpc_instances" "example" { | ||
name = "Default-VPC" | ||
} | ||
|
||
resource "tencentcloud_vpn_gateway" "example" { | ||
name = "example" | ||
vpc_id = "${data.tencentcloud_vpc_instances.example.instance_list.0.vpc_id}" | ||
bandwidth = 5 | ||
zone = "${var.availability_zone}" | ||
|
||
tags = { | ||
test = "test" | ||
} | ||
} | ||
|
||
resource "tencentcloud_vpn_connection" "example" { | ||
name = "example" | ||
vpc_id = "${data.tencentcloud_vpc_instances.example.instance_list.0.vpc_id}" | ||
vpn_gateway_id = "${tencentcloud_vpn_gateway.example.id}" | ||
customer_gateway_id = "${tencentcloud_vpn_customer_gateway.example.id}" | ||
pre_share_key = "test" | ||
ike_proto_encry_algorithm = "3DES-CBC" | ||
ike_proto_authen_algorithm = "MD5" | ||
ike_local_identity = "ADDRESS" | ||
ike_local_address = "${tencentcloud_vpn_gateway.example.public_ip_address}" | ||
ike_remote_identity = "ADDRESS" | ||
ike_remote_address = "${tencentcloud_vpn_customer_gateway.example.public_ip_address}" | ||
ike_dh_group_name = "GROUP1" | ||
ike_sa_lifetime_seconds = 86400 | ||
ipsec_encrypt_algorithm = "3DES-CBC" | ||
ipsec_integrity_algorithm = "MD5" | ||
ipsec_sa_lifetime_seconds = 3600 | ||
ipsec_pfs_dh_group = "DH-GROUP1" | ||
ipsec_sa_lifetime_traffic = 2560 | ||
|
||
security_group_policy { | ||
local_cidr_block = "172.16.0.0/16" | ||
remote_cidr_block = ["3.3.3.0/32", ] | ||
} | ||
tags = { | ||
test = "test" | ||
} | ||
} | ||
|
||
data "tencentcloud_vpn_customer_gateways" "example" { | ||
id = "${tencentcloud_vpn_customer_gateway.example.id}" | ||
} | ||
|
||
data "tencentcloud_vpn_gateways" "example" { | ||
id = "${tencentcloud_vpn_gateway.example.id}" | ||
} | ||
|
||
data "tencentcloud_vpn_connections" "example" { | ||
id = "${tencentcloud_vpn_connection.example.id}" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
variable "availability_zone" { | ||
default = "ap-guangzhou-3" | ||
} |
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.