Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VPC look up shows always the same VPC even after change of tags #6025

Closed
githubnoobieme opened this issue Jan 30, 2020 · 1 comment
Closed
Assignees
Labels
@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@githubnoobieme
Copy link

githubnoobieme commented Jan 30, 2020

When I filter a VPC by tag it still shows the same VPC even if this VPC has new tag.

My code look like this

vpc=ec2.Vpc.from_lookup(self,"VPC",is_default=False,tags={"endpoint":"yes"})

When I change the tag on the VPC to "no" and to "yes" on another VPC, I would expect another VPC to show up. But the output of synth still show the first VPC with its ID.

@githubnoobieme githubnoobieme added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 30, 2020
@rix0rrr
Copy link
Contributor

rix0rrr commented Feb 3, 2020

This is on purpose. Either change the query or clear the context cache:

https://docs.aws.amazon.com/cdk/latest/guide/context.html

@rix0rrr rix0rrr closed this as completed Feb 3, 2020
rix0rrr added a commit that referenced this issue Feb 3, 2020
Some MachineImages get updated automatically (causing unexpected
instance replacement), and some don't. Update the documentation to very
clearly note which image is which, and that using a particular type of
image may cause your instance to be replaced.

Also add a class with static factory functions to make an enum-like
pattern, to be in line with other places where the user has a choice
of implementations.

Fixes #5675.

Also note that VPC lookups are cached, which hopefully addresses #6025.
mergify bot added a commit that referenced this issue Feb 5, 2020
…6065)

Some MachineImages get updated automatically (causing unexpected
instance replacement), and some don't. Update the documentation to very
clearly note which image is which, and that using a particular type of
image may cause your instance to be replaced.

Also add a class with static factory functions to make an enum-like
pattern, to be in line with other places where the user has a choice
of implementations.

Fixes #5675.

Also note that VPC lookups are cached, which hopefully addresses #6025.

Co-authored-by: netanir <neta1nir@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
@SomayaB SomayaB added @aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud and removed package/vpc labels May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

3 participants