You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
on cdktf deploy ... it should create the lock file during terraform init and proceed with deployment of resources.
Actual Behavior
It errors with:
Initializing the backend...
Initializing provider plugins...
Finding atlassian/tome versions matching "1.4.7"...
Using atlassian/tome v1.4.7 from the shared cache directory
Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.
╷
│ Warning: Incomplete lock file information for providers
│
│ Due to your customized provider installation methods, Terraform was forced to
│ calculate lock file checksums locally for the following providers:
│ - atlassian/tome
│
│ The current .terraform.lock.hcl file only includes checksums for
│ darwin_arm64, so Terraform running on another platform will fail to install
│ these providers.
│
│ To calculate additional checksums for another platform, run:
│ terraform providers lock -platform=linux_amd64
│ (where linux_amd64 is the platform to generate)
╵
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
0 Stacks deploying 0 Stacks done 1 Stack waiting
[2024-03-26T10:12:32.808] [ERROR] default - ╷
│ Error: Could not retrieve providers for locking
│
│ Terraform failed to fetch the requested providers for linux_amd64 in order
│ to calculate their checksums: some providers could not be installed:
│ - registry.terraform.io/atlassian/tome: provider registry
│ registry.terraform.io does not have a provider named
│ registry.terraform.io/atlassian/tome.
micros-server-capabilities ╷
│ Error: Could not retrieve providers for locking
│
│ Terraform failed to fetch the requested providers for linux_amd64 in order
│ to calculate their checksums: some providers could not be installed:
│ - registry.terraform.io/atlassian/tome: provider registry
│ registry.terraform.io does not have a provider named
│ registry.terraform.io/atlassian/tome.
╵
0 Stacks deploying 0 Stacks done 1 Stack waiting
Error: non-zero exit code 1
Re-running cdktf deploy then works, as the lock file now exists.
Steps to Reproduce
use a custom/local provider with the above setup terraform.rc
create a stack which uses the provider
run cdktf deploy which will fail due to incomplete lock warning
┌───────────────────────────┬──────────────────┬───────┬────────────┬──────────────┬─────────────────┐
│ Provider Name │ Provider Version │ CDKTF │ Constraint │ Package Name │ Package Version │
├───────────────────────────┼──────────────────┼───────┼────────────┼──────────────┼─────────────────┤
│ splunk-terraform/signalfx │ 9.1.1 │ │ │ │ │
├───────────────────────────┼──────────────────┼───────┼────────────┼──────────────┼─────────────────┤
│ atlassian/tome │ 1.4.7 │ │ │ │ │
└───────────────────────────┴──────────────────┴───────┴────────────┴──────────────┴─────────────────┘
Gist
No response
Possible Solutions
It seems it might be taking the lock file warning from terraform init as non-empty stderr output and exiting early. Perhaps the error handling can be improve as to allow cdktf deploy to continue even after getting the warning about the lock file
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
The text was updated successfully, but these errors were encountered:
Expected Behavior
with a
terraform.rc
as follows:on
cdktf deploy ...
it should create the lock file duringterraform init
and proceed with deployment of resources.Actual Behavior
It errors with:
Re-running
cdktf deploy
then works, as the lock file now exists.Steps to Reproduce
terraform.rc
cdktf deploy
which will fail due to incomplete lock warningcdktf deploy
and it will work as expectedVersions
language: java
cdktf-cli: 0.20.1
node: v21.6.0
cdktf: 0.20.4
constructs: 10.3.0
jsii: 1.96.0
terraform: 1.5.7
arch: arm64
os: darwin 23.4.0
java:
maven: [MVNVM] Using maven: 3.9.6Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)Maven home: /Users/bebsworth/.mvnvm/apache-maven-3.9.6Java version: 21.0.1, vendor: Homebrew, runtime: /opt/homebrew/Cellar/openjdk/21.0.1/libexec/openjdk.jdk/Contents/HomeDefault locale: en_AU, platform encoding: UTF-8OS name: "mac os x", version: "14.4", arch: "aarch64", family: "mac"
gradle: ------------------------------------------------------------Gradle 8.5------------------------------------------------------------Build time: 2023-11-29 14:08:57 UTCRevision: 28aca86a7180baa17117e0e5ba01d8ea9feca598Kotlin: 1.9.20Groovy: 3.0.17Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023JVM: 21.0.1 (Homebrew 21.0.1)OS: Mac OS X 14.4 aarch64
providers
splunk-terraform/signalfx@undefined (LOCAL)
terraform provider version: 9.1.1
atlassian/tome@undefined (LOCAL)
terraform provider version: 1.4.7
Providers
┌───────────────────────────┬──────────────────┬───────┬────────────┬──────────────┬─────────────────┐
│ Provider Name │ Provider Version │ CDKTF │ Constraint │ Package Name │ Package Version │
├───────────────────────────┼──────────────────┼───────┼────────────┼──────────────┼─────────────────┤
│ splunk-terraform/signalfx │ 9.1.1 │ │ │ │ │
├───────────────────────────┼──────────────────┼───────┼────────────┼──────────────┼─────────────────┤
│ atlassian/tome │ 1.4.7 │ │ │ │ │
└───────────────────────────┴──────────────────┴───────┴────────────┴──────────────┴─────────────────┘
Gist
No response
Possible Solutions
It seems it might be taking the lock file warning from terraform init as non-empty stderr output and exiting early. Perhaps the error handling can be improve as to allow
cdktf deploy
to continue even after getting the warning about the lock fileWorkarounds
running
cdktf deploy twice
Anything Else?
No response
References
similar issue in hashicorp/terraform#32906
Help Wanted
Community Note
The text was updated successfully, but these errors were encountered: