Closed skorfmann closed 8 months ago
On thing I thought about, perhaps it would be worthwhile thinking about other ways of value lifting. Something based on SSM parameters for example. Values could be written to an SSM key path based on some convention. When these values are only read at the inflight stage, this would effectively decouple the resources in the preflight stage.
As a first step, doing this manually would be good enough already. Perhaps this could helpful here as well https://github.com/winglang/wing/issues/2726
Was this fixed by https://github.com/winglang/wing/pull/4879? The example seems to compile in the playground now
No, not really. It's essentially this case described over here https://github.com/hashicorp/terraform-provider-aws/issues/11344#issuecomment-1521831630
Just built a simple Parameter (along the lines of https://github.com/winglang/wing/issues/2726) resource internally to decouple the API url from other consumers, which then really fixes it
On thing I thought about, perhaps it would be worthwhile thinking about other ways of value lifting. Something based on SSM parameters for example. Values could be written to an SSM key path based on some convention. When these values are only read at the inflight stage, this would effectively decouple the resources in the preflight stage.
As a first step, doing this manually would be good enough already. Perhaps this could helpful here as well https://github.com/winglang/wing/issues/2726
@skorfmann this is only relevant for tokens, right?
This particular issue is only relevant for terraform dependencies, no direct relation to tokens, cdktf or wing.
Hi,
This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!
Closing as I believe this was fixed by https://github.com/winglang/wing/pull/5637. Please feel free to re-open if I'm mistaken.
I tried this:
For a scenario like the following
see in playground
the preflight value of the api gets referenced in the inflight consumer of the queue. This is slimmed down example extracted from a real application.
This happened:
Trying to remove one the handlers causes issues for the
tf-aws
target, for an iterative deployment with existing state. Terraform generates a cyclic dependency as described here https://github.com/hashicorp/terraform-provider-aws/issues/11344#issuecomment-1521831630I expected this:
Being able to deploy the api without manual interaction
Is there a workaround?
see https://github.com/hashicorp/terraform-provider-aws/issues/11344#issuecomment-1521831630
Component
SDK
Wing Version
0.45
Node.js Version
18.17
Platform(s)
MacOS
Anything else?
The value lifting for inflight handlers is done via env, e.g. for the queue consumer above that's like
And this beautifully named env
WING_TOKEN_HTTPS_TFTOKEN_TOKEN_8_EXECUTE_API_TFTOKEN_TOKEN_1_AMAZONAWS_COM_TFTOKEN_TOKEN_9
is the offender in this case.Community Notes