incalculable-portugal-13011
02/20/2020, 6:31 PMlet appVpc = aws.ec2.getVpc({id: "my-vpc-id"});
const webServerLoadBalancer = new awsx.lb.ApplicationLoadBalancer("web-server-lb-" + userEnv, {
securityGroups: [],
vpc: appVpc,
subnets: ["subnet-1", "subnet-2", "subnet-3"]
});
const webServerLoadBalancerListener = webServerLoadBalancer.createListener("ws-https-" + userEnv, {
port: 443,
protocol: "HTTPS",
certificateArn: "my-cert-arn"
});
const webServerLoadBalancerRedirectToHttpsListener = webServerLoadBalancer.createListener("ws-redirect-to-https", {
port: 80,
protocol: "HTTP",
defaultAction: {
type: "redirect",
redirect: {
protocol: "HTTPS",
port: "443",
statusCode: "HTTP_301"
}
}
});
const webServerCluster = new awsx.ecs.Cluster("web-server-" + userEnv, {
securityGroups: ["sg-1"],
vpc: appVpc
});
const webServerFargateService = new awsx.ecs.FargateService("web-server-" + userEnv, {
cluster: webServerCluster,
networkConfiguration: {
subnets: ["subnet-1", "subnet-2", "subnet-3"]
},
taskDefinitionArgs: {
containers: {
webServer: {
image: "my-org/web-server:" + userEnv,
portMappings: [
webServerLoadBalancerListener
],
healthCheck: {...healthCheckArgs}
}
}
}
});
the error I’m receiving is that error: aws:ecs/service:Service resource 'web-server-dev' has a problem: "network_configuration.0.subnets": required field is not set
, which doesn’t make sense to me. per the docs, I’m setting the networkConfiguration
property of the service, and I’m tried both wrapping that property in an array and as an object. no dice either way. any thoughts?No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by