public MyStack() { var foo = Output.Create(Aws.Ec2.GetCustomerGateway.InvokeAsync(new Aws.Ec2.GetCustomerGatewayArgs { Filters = { new Aws.Ec2.Inputs.GetCustomerGatewayFilterArgs { Name = "tag:Name", Values = { "foo-prod", }, }, }, })); var main = new Aws.Ec2.VpnGateway("main", new Aws.Ec2.VpnGatewayArgs { AmazonSideAsn = "7224", VpcId = aws_vpc.Main.Id, }); var transit = new Aws.Ec2.VpnConnection("transit", new Aws.Ec2.VpnConnectionArgs { CustomerGatewayId = foo.Apply(foo => foo.Id), StaticRoutesOnly = false, Type = foo.Apply(foo => foo.Type), VpnGatewayId = main.Id, }); }
public MyStack() { var vpc = new Aws.Ec2.Vpc("vpc", new Aws.Ec2.VpcArgs { CidrBlock = "10.0.0.0/16", }); var vpnGateway = new Aws.Ec2.VpnGateway("vpnGateway", new Aws.Ec2.VpnGatewayArgs { VpcId = vpc.Id, }); var customerGateway = new Aws.Ec2.CustomerGateway("customerGateway", new Aws.Ec2.CustomerGatewayArgs { BgpAsn = 65000, IpAddress = "172.0.0.1", Type = "ipsec.1", }); var main = new Aws.Ec2.VpnConnection("main", new Aws.Ec2.VpnConnectionArgs { CustomerGatewayId = customerGateway.Id, StaticRoutesOnly = true, Type = "ipsec.1", VpnGatewayId = vpnGateway.Id, }); var office = new Aws.Ec2.VpnConnectionRoute("office", new Aws.Ec2.VpnConnectionRouteArgs { DestinationCidrBlock = "192.168.10.0/24", VpnConnectionId = main.Id, }); }
public MyStack() { var exampleTransitGateway = new Aws.Ec2TransitGateway.TransitGateway("exampleTransitGateway", new Aws.Ec2TransitGateway.TransitGatewayArgs { }); var exampleCustomerGateway = new Aws.Ec2.CustomerGateway("exampleCustomerGateway", new Aws.Ec2.CustomerGatewayArgs { BgpAsn = 65000, IpAddress = "172.0.0.1", Type = "ipsec.1", }); var exampleVpnConnection = new Aws.Ec2.VpnConnection("exampleVpnConnection", new Aws.Ec2.VpnConnectionArgs { CustomerGatewayId = exampleCustomerGateway.Id, TransitGatewayId = exampleTransitGateway.Id, Type = exampleCustomerGateway.Type, }); }