정리
This commit is contained in:
17
modules/vpn_conn/main.tf
Normal file
17
modules/vpn_conn/main.tf
Normal file
@ -0,0 +1,17 @@
|
||||
resource "aws_vpn_connection" "example" {
|
||||
customer_gateway_id = var.cgw_id
|
||||
|
||||
transit_gateway_id = var.tgw_id
|
||||
|
||||
type = "ipsec.1"
|
||||
|
||||
tunnel1_preshared_key = var.preshared_key
|
||||
tunnel2_preshared_key = var.preshared_key
|
||||
|
||||
static_routes_only = true
|
||||
tags = {
|
||||
Name = "terraform_ipsec_vpn_example"
|
||||
}
|
||||
}
|
||||
# outside_ip_address_type = "PrivateIpv4"
|
||||
# transport_transit_gateway_attachment_id = data.aws_ec2_transit_gateway_dx_gateway_attachment.example.id
|
10
modules/vpn_conn/outputs.tf
Normal file
10
modules/vpn_conn/outputs.tf
Normal file
@ -0,0 +1,10 @@
|
||||
output "vpn_conn_tunnel-1_ip" {
|
||||
value = aws_vpn_connection.example.tunnel1_address
|
||||
}
|
||||
output "vpn_conn_tunnel-2_ip" {
|
||||
value = aws_vpn_connection.example.tunnel2_address
|
||||
}
|
||||
output "attach_id" {
|
||||
value = aws_vpn_connection.example.transit_gateway_attachment_id
|
||||
|
||||
}
|
13
modules/vpn_conn/variables.tf
Normal file
13
modules/vpn_conn/variables.tf
Normal file
@ -0,0 +1,13 @@
|
||||
variable "cgw_id" {
|
||||
type = string
|
||||
|
||||
}
|
||||
|
||||
variable "tgw_id" {
|
||||
type = string
|
||||
|
||||
}
|
||||
variable "preshared_key" {
|
||||
type = string
|
||||
|
||||
}
|
Reference in New Issue
Block a user