public Subnet(Vpc vpc, string cidr, AvailabilityZone availabilityZone, bool addInternetGatewayRoute) : base(ResourceType.AwsEc2Subnet)
 {
     _addInternetGatewayRoute = addInternetGatewayRoute;
     Vpc              = vpc;
     CidrBlock        = cidr;
     AvailabilityZone = availabilityZone;
 }
 public SecurityGroup(string description, Vpc vpc) : base(ResourceType.AwsEc2SecurityGroup)
 {
     Vpc = vpc;
     GroupDescription          = description;
     this.SecurityGroupIngress = new List <SecurityGroupIngress>();
     this.SecurityGroupEgress  = new List <SecurityGroupEgress>();
 }
Ejemplo n.º 3
0
 public VpcPeeringConnection(Vpc vpc, object peerVpcId) : base(ResourceType.AwsEc2VpcPeeringConnection)
 {
     this.LogicalId = $"{vpc.LogicalId}To{PeerVpcId}".Replace("-", string.Empty);
     this.VpcId     = new ReferenceProperty(vpc.LogicalId);
     this.PeerVpcId = peerVpcId;
     this.DependsOn.Add(vpc.LogicalId);
 }
Ejemplo n.º 4
0
 public RouteTable(Vpc vpc) : base(ResourceType.AwsEc2RouteTable)
 {
     this.Vpc = vpc;
     if (vpc.InternetGateway != null)
     {
         this.DependsOn.Add(vpc.InternetGateway.LogicalId);
     }
     this.LogicalId = $"RouteTableFor{vpc.LogicalId}";
 }
 public VpcEndpoint(string serviceName, Vpc vpc, RouteTable routeTableForSubnetsToNat1) : base(ResourceType.AwsEc2VpcEndpoint)
 {
     this.ServiceName = new FnJoin(FnJoinDelimiter.None,
                                   "com.amazonaws.",
                                   new ReferenceProperty("AWS::Region"),
                                   ".",
                                   serviceName);
     this.Vpc = vpc;
     this.RouteTableIds.Add(new ReferenceProperty(routeTableForSubnetsToNat1.LogicalId));
 }
 public Subnet(Vpc vpc, string cidr, AvailabilityZone availabilityZone, RouteTable routeTableForGateway, SecurityGroup natSecurityGroup) : this(vpc, cidr, availabilityZone, false)
 {
     this.RouteTableForGateway = routeTableForGateway;
     this.NatSecurityGroup     = natSecurityGroup;
 }
Ejemplo n.º 7
0
 public VpcGatewayAttachment(InternetGateway internetGateway, Vpc vpc) : this()
 {
     InternetGateway = internetGateway;
     Vpc             = vpc;
 }