Comments (4)
I'm going to close it and mark as a duplicate of pulumi/pulumi-terraform-bridge#1904; hopefully this is an acceptable resolution 🙏
from pulumi.
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.
Cannot close issue:
- does not have required labels:
resolution/
Please fix these problems and try again.
from pulumi.
Related Issues (20)
- Add regression test for provider `Delete`
- Workflow failure: On Push HOT 2
- Code coverage causes flakiness on Windows runners HOT 1
- Setting default values on non-primitive types does not fail schema validation. HOT 1
- Re-enabled flaky backend/httpstate TestTokenSource HOT 1
- `pulumi-terraform` tests fail on Pulumi v3.21.0 HOT 1
- Nodejs language tests are flaky HOT 1
- Pulumi Access tokens stopped working HOT 3
- pulumi.Output().apply() does not return a string, returns an Output in Python HOT 1
- [docs] Docs and help for `pulumi import --from terraform` does not indicate you need to also pass the path to the terraform state file. HOT 1
- Generated programs incorrectly handle capitalizations in module names
- Data race in go/auto TestGitClone/malformed_branch_name HOT 1
- Codegen for docstrings should filter out PulumiCodeChooser
- web.list_web_app_host_keys() used inside pulumi.Output.apply() fails on preview HOT 1
- Pulumi support for the Timescale Cloud Terraform provider
- Pulumi does not work with Workload Identity Federation service connection HOT 2
- `TestGeneratePackage/regress-8403/dotnet/compile` is flaky
- TLS handshake timeouts when creating a stack HOT 1
- Preview/Up hanging when validating with policy packs HOT 2
- `TestResourceRefsGetResourceGo` is flaky
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.