Open Hi-Fi opened 3 months ago
Another alternative is to use the cloud
block. (Docs), which is recommended by terraform anyway over the remote backend. From my understanding, that doesn't have this problem.
The remote backend is a bug nonetheless. We will be fixing it in a future release.
We use Artifactory as state backend, I understood that Cloud
backend is reserved for HCP Terraform (ex-Terraform Cloud) (and it's Enterprise version) and remote
is for that
Expected Behavior
Terraform can be initialized with CDKTF synthesized stack in HCL format. Remote configuration would look like:
Actual Behavior
CDKTF synthesized incorrect remove configuration
When manually removing that
=
afterworkspaces
, init works fine.Steps to Reproduce
cdktf synth --hcl
)terraform init
Versions
language: typescript cdktf-cli: 0.20.8 node: v20.13.1 cdktf: 0.20.8 constructs: 10.3.0 jsii: null terraform: 1.9.4 arch: arm64 os: darwin 23.6.0
Providers
No response
Gist
No response
Possible Solutions
Probably some specific handling needed for that part. Didn't had any other places with similar issues. Datasource to remote works different way and it requires that
=
sign.Workarounds
Don't use HCL (not working for me as HCL is needed for Sonarqube analysis)
Anything Else?
No response
References
No response
Help Wanted
Community Note