Beispiel #1
0
 public MyStack()
 {
     var example = new Aws.Ec2TransitGateway.TransitGateway("example", new Aws.Ec2TransitGateway.TransitGatewayArgs
     {
         Description = "example",
     });
 }
Beispiel #2
0
 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,
     });
 }
Beispiel #3
0
 public MyStack()
 {
     var local = new Aws.Provider("local", new Aws.ProviderArgs
     {
         Region = "us-east-1",
     });
     var peer = new Aws.Provider("peer", new Aws.ProviderArgs
     {
         Region = "us-west-2",
     });
     var peerRegion          = Output.Create(Aws.GetRegion.InvokeAsync());
     var localTransitGateway = new Aws.Ec2TransitGateway.TransitGateway("localTransitGateway", new Aws.Ec2TransitGateway.TransitGatewayArgs
     {
         Tags =
         {
             { "Name", "Local TGW" },
         },
     }, new CustomResourceOptions
     {
         Provider = aws.Local,
     });
     var peerTransitGateway = new Aws.Ec2TransitGateway.TransitGateway("peerTransitGateway", new Aws.Ec2TransitGateway.TransitGatewayArgs
     {
         Tags =
         {
             { "Name", "Peer TGW" },
         },
     }, new CustomResourceOptions
     {
         Provider = aws.Peer,
     });
     var example = new Aws.Ec2TransitGateway.PeeringAttachment("example", new Aws.Ec2TransitGateway.PeeringAttachmentArgs
     {
         PeerAccountId        = peerTransitGateway.OwnerId,
         PeerRegion           = peerRegion.Apply(peerRegion => peerRegion.Name),
         PeerTransitGatewayId = peerTransitGateway.Id,
         TransitGatewayId     = localTransitGateway.Id,
         Tags =
         {
             { "Name", "TGW Peering Requestor" },
         },
     });
 }
Beispiel #4
0
 public MyStack()
 {
     var exampleGateway = new Aws.DirectConnect.Gateway("exampleGateway", new Aws.DirectConnect.GatewayArgs
     {
         AmazonSideAsn = "64512",
     });
     var exampleTransitGateway = new Aws.Ec2TransitGateway.TransitGateway("exampleTransitGateway", new Aws.Ec2TransitGateway.TransitGatewayArgs
     {
     });
     var exampleGatewayAssociation = new Aws.DirectConnect.GatewayAssociation("exampleGatewayAssociation", new Aws.DirectConnect.GatewayAssociationArgs
     {
         AllowedPrefixes =
         {
             "10.255.255.0/30",
             "10.255.255.8/30",
         },
         AssociatedGatewayId = exampleTransitGateway.Id,
         DxGatewayId         = exampleGateway.Id,
     });
 }