public IVpc Create(string identification, string cidr, double?maxAzs, DefaultInstanceTenancy defaultInstanceTenancy = DefaultInstanceTenancy.DEFAULT, bool enableDnsSupport = true, bool enableDnsHostnames = true, List <ISubnetConfiguration> subnetConfigurations = null, Dictionary <string, string> tags = null) { var vpc = new Vpc(Scope, identification, new VpcProps { Cidr = cidr, MaxAzs = maxAzs, DefaultInstanceTenancy = defaultInstanceTenancy, EnableDnsSupport = enableDnsSupport, EnableDnsHostnames = enableDnsHostnames, SubnetConfiguration = subnetConfigurations?.ToArray() }); if (tags == null) { return(vpc); } foreach (var(key, value) in tags) { Tags.Of(vpc).Add(key, value); } return(vpc); }
public IVpc AddVpc(string cidr, double?maxAzs, DefaultInstanceTenancy defaultInstanceTenancy, string vpcIdentification = null, bool enableDnsSupport = true, bool enableDnsHostnames = true, List <ISubnetConfiguration> subnetConfigurations = null, Dictionary <string, string> tags = null) { return(AwsCdkVpcHandler.Create(string.IsNullOrEmpty(vpcIdentification) ? $"{ApplicationName}{EnvironmentName}vpc" : vpcIdentification, cidr, maxAzs, defaultInstanceTenancy, enableDnsSupport, enableDnsHostnames, subnetConfigurations, tags)); }