mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
fix(cloudformation): preserve subnet public IP setting (#2031)
This commit is contained in:
1 parent
c0522593e5
commit
b62d1e762e
2 files changed
+9
-1
No files matched your search
+4
@@ -587,7 +587,11 @@ public class CloudFormationResourceProvisioner {
|
||||
String vpcId = resolveOptional(props, "VpcId", engine);
|
||||
String cidr = resolveOptional(props, "CidrBlock", engine);
|
||||
String az = resolveOptional(props, "AvailabilityZone", engine);
|
||||
String mapPublicIpOnLaunch = resolveOptional(props, "MapPublicIpOnLaunch", engine);
|
||||
var subnet = ec2Service.createSubnet(region, vpcId, cidr, az);
|
||||
if (mapPublicIpOnLaunch != null) {
|
||||
ec2Service.modifySubnetAttribute(region, subnet.getSubnetId(), "mapPublicIpOnLaunch", mapPublicIpOnLaunch);
|
||||
}
|
||||
r.setPhysicalId(subnet.getSubnetId());
|
||||
r.getAttributes().put("SubnetId", subnet.getSubnetId());
|
||||
r.getAttributes().put("VpcId", subnet.getVpcId());
|
||||
|
||||
Reference in new issue
Block a user