Channels
announcements
automation-api
aws
azure
blog-posts
built-with-pulumi
cloudengineering
cloudengineering-support
content-share
contribex
contribute
docs
dotnet
finops
general
getting-started
gitlab
golang
google-cloud
hackathon-03-19-2020
hacktoberfest
install
java
jobs
kubernetes
learn-pulumi-events
linen
localstack
multi-language-hackathon
office-hours
oracle-cloud-infrastructure
package-authoring
pulumi-ai
pulumi-cdk
pulumi-cloud
pulumi-crosscode
pulumi-deployments
pulumi-kubernetes-operator
pulumiverse
python
registry
status
testingtesting123
testingtesting321
typescript
welcome
workshops
yaml
Powered by
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
#general
Join Slack