-
Notifications
You must be signed in to change notification settings - Fork 437
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
ReplaceTriggeredBy: Still not working in Golang #3546
Comments
I am interested in working on this issue. |
I am also experiencing this issue with Python, have tried providing just the resource variable and using .fqn as 3322 code changes suggest. The workaround by @eahrend seems to work lifecycle=TerraformResourceLifecycle(
replace_triggered_by=[
f"{self.__redshift_namespace.terraform_resource_type}.{self.__redshift_namespace.friendly_unique_id}",
]
) "lifecycle": {
"replace_triggered_by": [
"aws_redshiftserverless_namespace.redshift__redshift_namespace"
]
}, I believe the underlying issue is that the fqn property includes the hcl templating syntax as shown below in the cdktf.json when I use fqn: lifecycle=TerraformResourceLifecycle(
replace_triggered_by=[
f"{self.__redshift_namespace.fqn}",
]
) "lifecycle": {
"replace_triggered_by": [
"${aws_redshiftserverless_namespace.redshift__redshift_namespace}"
]
}, I am not sure if fqn including the syntax is by design, but that seems to be the underlying issue. |
Expected Behavior
I should be able to create a replaceTriggeredBy lifecycle rule by specifying the FQN of the resource that I want to cause a replacement trigger for, like:
Actual Behavior
I get an invalid expression. The cdktf.json file shows:
Steps to Reproduce
Apply the stack with the relevant code.
Versions
Couldn't get the info from cdktf debug
npm list -g
/Users/erik/.local/lib
├── [email protected]
└── [email protected]
go version
go version go1.21.6 darwin/arm64
terraform version
Terraform v1.7.0
on darwin_arm64
Node.js v20.11.0
Running this command fails with this error:
Providers
Running this command fails with this error:
Gist
No response
Possible Solutions
No response
Workarounds
Workaround is to write it like this:
Anything Else?
No response
References
#3196
#1866 (comment)
Help Wanted
Community Note
The text was updated successfully, but these errors were encountered: