enough-mechanic-81927
05/25/2023, 11:22 AMconst vpc = aws.ec2.getVpc({
id: "your vpc"
})
const vpcId = vpc.then((vpc)=>vpc.id)
console.log(vpcId)
// An ECS cluster to deploy into
const cluster = new aws.ecs.Cluster("cluster", {});
// An ALB to serve the container endpoint to the internet
const loadbalancer = new awsx.lb.ApplicationLoadBalancer("loadbalancer", {});
billowy-army-68599
05/25/2023, 12:13 PMenough-mechanic-81927
05/25/2023, 12:24 PMbillowy-army-68599
05/25/2023, 12:25 PMhandsome-article-22867
05/25/2023, 12:39 PMenough-mechanic-81927
05/25/2023, 12:51 PMbillowy-army-68599
05/25/2023, 12:58 PMhandsome-article-22867
05/25/2023, 12:59 PMbillowy-army-68599
05/25/2023, 12:59 PMhandsome-article-22867
05/25/2023, 1:00 PMbillowy-army-68599
05/25/2023, 1:00 PMenough-mechanic-81927
05/25/2023, 1:00 PMbillowy-army-68599
05/25/2023, 1:06 PMexport AWS_PROFILE=<profile in your `Pulumi.ecs-cluster.yaml`
export AWS_REGION=<region in your yaml file>
aws ec2 describe-vpcs --vpc-id=<vpc-id-in-your-code
handsome-article-22867
05/25/2023, 1:07 PMbillowy-army-68599
05/25/2023, 1:08 PMhandsome-article-22867
05/25/2023, 1:10 PMbillowy-army-68599
05/25/2023, 1:11 PMhandsome-article-22867
05/25/2023, 1:12 PMbillowy-army-68599
05/25/2023, 1:12 PMlimited-rainbow-51650
05/25/2023, 2:58 PMPulumi.dev.yaml
looks like:
name: ecs
runtime: nodejs
description: ecs cluster and ecr repos
config:
aws:profile: <Profile>
aws:region: <Region>
A stack config file usually only has a config:
section with the keys underneath. No name
, runtime
or description
property. That is in the Pulumi project file (Pulumi.yaml
). Did you manually copy Pulumi.yaml
to Pulumi.dev.yaml
?handsome-article-22867
05/25/2023, 3:21 PMenough-mechanic-81927
05/25/2023, 3:45 PMpulumi stack init stack-name
and it has region and profile only under config as you showed up in the code
config:
aws:profile: <Profile>
aws:region: <Region>
This looks like this in our stack.yaml fileexport AWS_PROFILE=<profile in your `Pulumi.ecs-cluster.yaml`
export AWS_REGION=<region in your yaml file>
aws ec2 describe-vpcs --vpc-id=<vpc-id-in-your-code