Skip to content
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

Multiple Terraform platforms in pants.toml results in invalid config #21566

Open
d-m opened this issue Oct 22, 2024 · 3 comments
Open

Multiple Terraform platforms in pants.toml results in invalid config #21566

d-m opened this issue Oct 22, 2024 · 3 comments
Labels
backend: Terraform Terraform backend-related issues bug

Comments

@d-m
Copy link

d-m commented Oct 22, 2024

Describe the bug
Adding

[download-terraform]
platforms = ["darwin_amd64", "linux_amd64"]

to the pants.toml results in:

$ pants --print-stacktrace experimental-deploy ::
17:12:08.03 [INFO] Initializing scheduler...
17:12:10.93 [INFO] Scheduler initialized.
17:12:10.98 [ERROR] Invalid option 'platforms' under [download-terraform] in /Documents/git/pants.toml
17:12:10.98 [ERROR] Invalid config entries detected. See log for details on which entries to update or remove.

(Specify --no-verify-config to disable this check.)
Traceback (most recent call last):
  File "/Library/Caches/nce/6faa4322d1df41d032e4938795c6f2c262ab92bb642a9bac1101cb7d1631f9c1/bindings/venvs/2.21.0/lib/python3.9/site-packages/pants/bin/daemon_pants_runner.py", line 134, in single_daemonized_run
    runner = LocalPantsRunner.create(
  File "/Library/Caches/nce/6faa4322d1df41d032e4938795c6f2c262ab92bb642a9bac1101cb7d1631f9c1/bindings/venvs/2.21.0/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 113, in create
    options.verify_configs(options_bootstrapper.config)
  File "/Library/Caches/nce/6faa4322d1df41d032e4938795c6f2c262ab92bb642a9bac1101cb7d1631f9c1/bindings/venvs/2.21.0/lib/python3.9/site-packages/pants/option/options.py", line 246, in verify_configs
    global_config.verify(section_to_valid_options)
  File "/Library/Caches/nce/6faa4322d1df41d032e4938795c6f2c262ab92bb642a9bac1101cb7d1631f9c1/bindings/venvs/2.21.0/lib/python3.9/site-packages/pants/option/config.py", line 104, in verify
    raise ConfigValidationError(
pants.option.errors.ConfigValidationError: Invalid config entries detected. See log for details on which entries to update or remove.

(Specify --no-verify-config to disable this check.)

Use -ldebug for more logs. 
See https://www.pantsbuild.org/2.21/docs/using-pants/troubleshooting-common-issues for common issues.
Consider reaching out for help: https://www.pantsbuild.org/community/getting-help

Pants version
Which version of Pants are you using?
2.21.0

OS
MacOS

@d-m d-m added the bug label Oct 22, 2024
@benjyw
Copy link
Contributor

benjyw commented Oct 23, 2024

AFAICT the download-terraform subsystem has no option by that name: https://www.pantsbuild.org/stable/reference/subsystems/download-terraform
So the error is unsurprising.

What is the underlying thing you're trying to achieve?

@d-m
Copy link
Author

d-m commented Oct 23, 2024

My mistake, I was looking at the prerelease documentation at http://www.pantsbuild.org/prerelease/reference/subsystems/download-terraform#platforms.

This should allow us to create terraform lockfiles that include hashes for multiple architectures.

@lilatomic
Copy link
Contributor

[download-terraform].platforms made it into 2.23 . That release is currently at rc0, so it should be stable enough to try out.

@lilatomic lilatomic added the backend: Terraform Terraform backend-related issues label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: Terraform Terraform backend-related issues bug
Projects
None yet
Development

No branches or pull requests

3 participants