-
Notifications
You must be signed in to change notification settings - Fork 155
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
aws.RouteTable routes are not notified of changes by aws.Route #2561
Comments
Hi @rdanno thanks for writing this up. If I've understood you correctly ... you're using both inline routes (within the RouteTable resource) and standalone route resources. Then when you do a refresh you see discrepencies because the standalone routes are shown as being removed on the RouteTable. Is that correct. I believe this is a similar issue to #1790 I think the initial resolution here to to avoid creating routes via the RouteTable property and only use the standalone Route resources. The root cause is likely a limitation of the underlying upstream implementation of this provider. |
As noted on the terraform resource, this is a known issue in the upstream provider:
|
Creating the RouteTable with no routes. Adding routes with Route later. |
Ok, that sounds like it's a different issue to the one noted then. We'll need to investigate the upstream implementation to identify if we can address this there. |
I have a repro here that I hope demonstrates the issue, unfortunately it is still present in recent Pulumi. import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleAwsVpc = new aws.ec2.Vpc("test", {cidrBlock: "10.1.0.0/16"});
const exampleRouteTable = new aws.ec2.RouteTable("example", {
vpcId: exampleAwsVpc.id,
// routes: [],
tags: {
Name: "example",
},
});
const egress = new aws.ec2.EgressOnlyInternetGateway("egress", {vpcId: exampleAwsVpc.id});
const exampleRoute = new aws.ec2.Route("route1", {
routeTableId: exampleRouteTable.id,
destinationIpv6CidrBlock: "::/0",
egressOnlyGatewayId: egress.id,
});
export const exampleRouteId = exampleRoute.id; After the first pulumi up, RouteTable receives inputs nil but outputs as However refreshing this stack shows a warning that RouteTable wants to register the route:
If the refresh is accepted (our pulumi up --refresh is run), then the system gets into a steady state with clean pulumi preview and refresh, because now the route is duplicated into the outputs of RouteTable as well as into its own resource.
|
This seems to be very similar to #2246 just for a different pair of coupled resources that are not recommended to be used together, there seems to be a pattern going on here. The issue likely reproduces in TF but is less of a problem there because TF does not warn on refresh of this sort and it refreshes by default when apply is called, so after two |
Similarly to #2246 ignoreChanges is not able to affect refresh, but there is a new feature being developed for an ignoreRefreshChanges flag that is the recommended workaround for 2246 that should work here as well: pulumi/pulumi#16015 |
Adding pulumi/pulumi-policy-aws#110 to make the NOTE a visible warning for users of AWSGuard. |
What happened?
Route resources are linked dependencies of RouteTables - but 'inline' Routes don't properly notify the RouteTable when they make a route entry change - and since routes=[] is a property of RouteTable - when you refresh state then the RouteTable sees drift.
I've added ignoreChanges to RouteTable::routes but the refresh still picks up the changes
Expected Behavior
Route should notify RouteTable when it makes changes to its routes so the refresh operation does not need to be run
Steps to reproduce
deploy a routetable with no routes, then use Route to add a route entry then run a refresh
Output of
pulumi about
`CLI
Version 3.70.0
Go Version go1.20.5
Go Compiler gc
Plugins
NAME VERSION
aws 5.41.0
python unknown
Host
OS darwin
Version 11.7
Arch x86_64`
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: