Channels
welcome
pulumi-cdk
cloudengineering
yaml
blog-posts
localstack
pulumi-ai
package-authoring
general
pulumiup-booth-support
oracle-cloud-infrastructure
learn-pulumi-events
linen
registry
built-with-pulumi
pulumi-cloud
contribex
testingtesting321
hacktoberfest
pulumi-crosscode
content-share
finops
multi-language-hackathon
office-hours
workshops
gitlab
pulumi-kubernetes-operator
jobs
pulumi-deployments
dotnet
aws
golang
announcements
java
pulumiverse
python
install
getting-started
cloudengineering-support
testingtesting123
hackathon-03-19-2020
typescript
google-cloud
contribute
azure
kubernetes
docs
automation-api
status
Powered by
#general
Title
h
high-morning-17948
12/03/2021, 5:00 PM
Is there a way to get an existing VPC by its name instead of the ID?
d
delightful-gigabyte-39334
12/03/2021, 5:42 PM
you can filter by tags instead of id, name is exposed as a tag
h
high-morning-17948
12/14/2021, 8:45 PM
What function and arguments you use to filter by tags?
@delightful-gigabyte-39334
d
delightful-gigabyte-39334
12/14/2021, 9:42 PM
dont have any example off hand, but you could use getVPC:
https://www.pulumi.com/registry/packages/aws/api-docs/ec2/getvpc/
the filters argument supports any aws api filter:
https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpcs.html
3 Views
Post