use of com.amazonaws.services.cloudformation.model.Parameter in project aws-cf-templates by widdix.
the class AVPCTest method testVPCSubnetInternetAccess.
protected final void testVPCSubnetInternetAccess(final Context context, final String parentVPCStack, final String subnetName) {
final String reach = subnetName.endsWith("Private") ? "private" : "public";
final String stackName = "al2-mutable-" + reach + "-" + this.random8String();
try {
this.createStack(context, stackName, "ec2/al2-mutable-" + reach + ".yaml", new Parameter().withParameterKey("ParentVPCStack").withParameterValue(parentVPCStack), new Parameter().withParameterKey("SubnetName").withParameterValue(subnetName));
} finally {
this.deleteStack(context, stackName);
}
}
use of com.amazonaws.services.cloudformation.model.Parameter in project aws-cf-templates by widdix.
the class TestVPC3AZs method test.
@Test
public void test() {
final Context context = new Context();
final String stackName = "vpc-3azs-" + this.random8String();
try {
this.createStack(context, stackName, "vpc/vpc-3azs.yaml", new Parameter().withParameterKey("ClassB").withParameterValue("10"));
this.testVPCSubnetInternetAccess(context, stackName, "SubnetAPublic");
this.testVPCSubnetInternetAccess(context, stackName, "SubnetBPublic");
this.testVPCSubnetInternetAccess(context, stackName, "SubnetCPublic");
} finally {
this.deleteStack(context, stackName);
}
}
use of com.amazonaws.services.cloudformation.model.Parameter in project aws-cf-templates by widdix.
the class TestVPC4AZs method test.
@Test
public void test() {
final Context context = new Context();
final String stackName = "vpc-4azs-" + this.random8String();
try {
this.createStack(context, stackName, "vpc/vpc-4azs.yaml", new Parameter().withParameterKey("ClassB").withParameterValue("10"));
this.testVPCSubnetInternetAccess(context, stackName, "SubnetAPublic");
this.testVPCSubnetInternetAccess(context, stackName, "SubnetBPublic");
this.testVPCSubnetInternetAccess(context, stackName, "SubnetCPublic");
this.testVPCSubnetInternetAccess(context, stackName, "SubnetDPublic");
} finally {
this.deleteStack(context, stackName);
}
}
use of com.amazonaws.services.cloudformation.model.Parameter in project aws-cf-templates by widdix.
the class TestVPCEndpointDynamoDB method test.
@Test
public void test() {
final Context context = new Context();
final String vpcStackName = "vpc-2azs-" + this.random8String();
final String endpointStackName = "vpc-endpoint-dynamodb-" + this.random8String();
final String classB = "10";
try {
this.createStack(context, vpcStackName, "vpc/vpc-2azs.yaml", new Parameter().withParameterKey("ClassB").withParameterValue(classB));
try {
this.createStack(context, endpointStackName, "vpc/vpc-endpoint-dynamodb.yaml", new Parameter().withParameterKey("ParentVPCStack").withParameterValue(vpcStackName));
// TODO how can we check if this stack works?
} finally {
this.deleteStack(context, endpointStackName);
}
} finally {
this.deleteStack(context, vpcStackName);
}
}
use of com.amazonaws.services.cloudformation.model.Parameter in project aws-cf-templates by widdix.
the class TestHostedZone method testDNSSEC.
@Test
public void testDNSSEC() {
final Context context = new Context();
final String keyStackName = "key-" + this.random8String();
final String zoneStackName = "hostedzone-" + this.random8String();
final String dnssecStackName = "dnssec-" + this.random8String();
try {
this.createStack(context, keyStackName, "security/kms-key.yaml", new Parameter().withParameterKey("Service").withParameterValue("dnssec-route53"), new Parameter().withParameterKey("KeySpec").withParameterValue("ECC_NIST_P256"), new Parameter().withParameterKey("KeyUsage").withParameterValue("SIGN_VERIFY"));
try {
this.createStack(context, zoneStackName, "vpc/zone-legacy.yaml", new Parameter().withParameterKey("HostedZoneName").withParameterValue(Config.get(Config.Key.DOMAIN_SUFFIX)), new Parameter().withParameterKey("HostedZoneId").withParameterValue(Config.get(Config.Key.HOSTED_ZONE_ID)));
try {
this.createStack(context, dnssecStackName, "vpc/zone-dnssec.yaml", new Parameter().withParameterKey("ParentZoneStack").withParameterValue(zoneStackName), new Parameter().withParameterKey("ParentKmsKeyStack").withParameterValue(keyStackName));
} finally {
this.deleteStack(context, dnssecStackName);
}
} finally {
this.deleteStack(context, zoneStackName);
}
} finally {
this.deleteStack(context, keyStackName);
}
}
Aggregations