Comments (2)
After some investigation, I think this is an issue in the provider (or rather, our bridging of the AWS provider), potentially due to the issues around handling sets and the reordering problems that ensue (see pulumi/pulumi-terraform-bridge#1904). Indeed, in that issue @t0yv0 predicts that it may have a knock-on effect on refreshes performing full diffs.
Reasons I'm inclined to say this isn't a bug that refresh
has introduced:
- We are calling the exact same
Diff
method with the exact same arguments (including the passing ofIgnoreChanges
), and the provider has no way to know whether this is being called in response to arefresh
or anupdate
, so it shouldn't be able to introduce new (broken) behaviour. - If I manually modify my state using
export
/import
to reorder the two target groups until they (presumably) match the order the provider is going to pick, I still get diffs. If I usePULUMI_DEBUG_GRPC
to dump the calls, I can see that a diff is being reported against the ARNs, even though they are byte-for-byte identical. This leads me to think it is the reordering issue -- the bridged provider spots the diff, Pulumi then reports it but it doesn't make sense/visually surface because our handling of the sets means that our consistent ordering masks the diff (see below wheredefaultActions[0].forward.targetGroups[0].arn
is identical across all resource states).
{
"method": "/pulumirpc.ResourceProvider/Diff",
"request": {
"id": "arn:aws:elasticloadbalancing:us-east-1:616138583583:listener/app/lb-c02916b/da56acbc7fbff239/0edf8d54df1a8fe7",
"urn": "urn:pulumi:dev::elb-ignore-changes-bug::aws:lb/listener:Listener::listener",
"olds": {
...
"arn": "arn:aws:elasticloadbalancing:us-east-1:616138583583:listener/app/lb-c02916b/da56acbc7fbff239/0edf8d54df1a8fe7",
"defaultActions": [
{
...
"forward": {
"stickiness": {
"duration": 3600,
"enabled": false
},
"targetGroups": [
{
"arn": "arn:aws:elasticloadbalancing:us-east-1:616138583583:targetgroup/tg2-06f4221/b767b73c9c873857",
"weight": 3
},
{
"arn": "arn:aws:elasticloadbalancing:us-east-1:616138583583:targetgroup/tg-17e0b6b/f084db5525f1dd3a",
"weight": 2
}
]
},
"order": 1,
"redirect": null,
"targetGroupArn": "",
"type": "forward"
}
],
"id": "arn:aws:elasticloadbalancing:us-east-1:616138583583:listener/app/lb-c02916b/da56acbc7fbff239/0edf8d54df1a8fe7",
"loadBalancerArn": "arn:aws:elasticloadbalancing:us-east-1:616138583583:loadbalancer/app/lb-c02916b/da56acbc7fbff239",
...
},
"news": {
"__defaults": [],
"defaultActions": [
{
"__defaults": [],
"forward": {
"__defaults": [],
"stickiness": {
"duration": 3600
},
"targetGroups": [
{
"__defaults": [],
"arn": "arn:aws:elasticloadbalancing:us-east-1:616138583583:targetgroup/tg2-06f4221/b767b73c9c873857",
"weight": 2
},
{
"__defaults": [],
"arn": "arn:aws:elasticloadbalancing:us-east-1:616138583583:targetgroup/tg-17e0b6b/f084db5525f1dd3a",
"weight": 1
}
]
},
"type": "forward"
}
],
"loadBalancerArn": "arn:aws:elasticloadbalancing:us-east-1:616138583583:loadbalancer/app/lb-c02916b/da56acbc7fbff239",
"port": 80
},
"ignoreChanges": [
"defaultActions[*].forward.targetGroups[*].weight"
],
"oldInputs": {
"__defaults": [],
"defaultActions": [
{
"__defaults": [],
"forward": {
"__defaults": [],
"stickiness": {
"duration": 3600
},
"targetGroups": [
{
"__defaults": [],
"arn": "arn:aws:elasticloadbalancing:us-east-1:616138583583:targetgroup/tg2-06f4221/b767b73c9c873857",
"weight": 3
},
{
"__defaults": [],
"arn": "arn:aws:elasticloadbalancing:us-east-1:616138583583:targetgroup/tg-17e0b6b/f084db5525f1dd3a",
"weight": 2
}
]
},
"type": "forward"
}
],
"loadBalancerArn": "arn:aws:elasticloadbalancing:us-east-1:616138583583:loadbalancer/app/lb-c02916b/da56acbc7fbff239",
"port": 80
}
},
"response": {
"stables": [
"loadBalancerArn"
],
"changes": "DIFF_SOME",
"diffs": [
"defaultActions",
"defaultActions",
"defaultActions",
"defaultActions"
],
"detailedDiff": {
"defaultActions[0].forward.targetGroups[0].arn": {
"kind": "UPDATE"
},
"defaultActions[0].forward.targetGroups[0].weight": {
"kind": "UPDATE"
},
"defaultActions[0].forward.targetGroups[1].arn": {
"kind": "UPDATE"
},
"defaultActions[0].forward.targetGroups[1].weight": {
"kind": "UPDATE"
}
},
"hasDetailedDiff": true
},
"metadata": {
"kind": "resource",
"mode": "client",
"name": "aws"
}
}
- There appears to be some funkiness with this specific example because e.g. a "clean"
refresh
seems very difficult -- the provider will setdefaultActions[0].forward.stickiness.duration = 3600
, for instance, which also shows up in the diff. If I fudge my state file usingexport
/import
to get rid of this, I can get rid of this but it could also be contributing sinceIgnoreChanges
only affects what is shown, not what is applied to state.
My proposal would therefore be to close this in favour of pulumi/pulumi-terraform-bridge#1904. Thoughts?
from pulumi.
Should this be closed or moved to the AWS provider repo?
from pulumi.
Related Issues (20)
- CLI environment variable to define the default Pulumi organization HOT 5
- Consider failing Config.require if the config value is a secret HOT 1
- Pulumi convert mishandles array conversion (Go SDK, Java SDK)
- Pulumi convert missing import statement for Deployment class (Java SDK)
- Pulumi convert mishandles eager stack outputs (Go SDK, Java SDK)
- Getting vague error on `pulumi up` HOT 4
- Pulumi does not respect `dependsOn` for `.get` operations HOT 1
- Workflow failure: Download Pulumi Cron HOT 3
- Pulumi Import throught "Import" resource option - override "match" failures HOT 1
- Stack failure during Pulumi update investigation initiated HOT 1
- Pulumi refresh triggers a diff for resources imported with .get
- CLI panic in processIgnoreChanges HOT 1
- Allow setting pulumi CLI flags via environment variables HOT 2
- Remove MyPy workaround for TypedDicts
- Potentially flaky test secrets/cloud TestAWSCloudManager_AssumedRole failing in CI
- Saved plan with automation API results in error decrypting secret value HOT 1
- Diagnostics is not fully exposing reference/stack HOT 1
- Difficult to set backend URL on Windows HOT 1
- switching mfa_delete Flag in aws.s3.Bucket completely blocked further updates to the S3 bucket HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pulumi.