【发布时间】:2021-06-17 01:58:33
【问题描述】:
我正在尝试构建 AWS terraform IPSec VPN 配置。但是,我不记得在哪里可以找到 AWS IPSec IP 地址; terraform cgw documentation 表示ip_address 字段是必需的。
答案应该假设 VPN 将连接到我的AWS Transit Gateway。
我的地形:
resource "aws_customer_gateway" "cgw-abbv-for-local-and-remote" {
bgp_asn = 65001
ip_address = "A.B.C.D" #<-- I need this IP before terraform apply
type = "ipsec.1"
tags = {
Name = "insert-cgw-name-here"
}
}
resource "aws_vpn_connection" "vpn-abbv-for-local-and-remote" {
customer_gateway_id = aws_customer_gateway.cgw-abbv-for-local-and-remote.id
transit_gateway_id = aws_ec2_transit_gateway.my-tgw-name.id
type = aws_customer_gateway.cgw-abbv-for-local-and-remote.type
tags = {
Name = "insert-vpn-name-here"
}
}
【问题讨论】:
标签: amazon-web-services networking terraform vpn hcl