Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions leverage/modules/tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
@click.group()
@pass_state
def tofu(state):
"""Run OpenTofu commands in a custom containerized environment that provides extra functionality when interacting
with your cloud provider such as handling multi factor authentication for you.
"""Run OpenTofu commands in the context of the current project.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The docstring has been updated to reflect that OpenTofu commands are run in the context of the current project rather than a containerized environment. However, the subsequent line still mentions passing arguments to "counterparts in the container". Please update this to remove the reference to the container to keep the documentation consistent and accurate.

All tofu subcommands that receive extra args will pass the given strings as is to their corresponding OpenTofu
counterparts in the container. For example as in `leverage tofu apply -auto-approve` or
`leverage tofu init -reconfigure`
Expand All @@ -34,8 +33,7 @@ def tofu(state):
@click.group()
@pass_state
def terraform(state):
"""Run Terraform commands in a custom containerized environment that provides extra functionality when interacting
with your cloud provider such as handling multi factor authentication for you.
"""Run Terraform commands in the context of the current project.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The docstring has been updated to reflect that Terraform commands are run in the context of the current project rather than a containerized environment. However, the subsequent line still mentions passing arguments to "counterparts in the container". Please update this to remove the reference to the container to keep the documentation consistent and accurate.

All terraform subcommands that receive extra args will pass the given strings as is to their corresponding Terraform
counterparts in the container. For example as in `leverage terraform apply -auto-approve` or
`leverage terraform init -reconfigure`
Expand Down Expand Up @@ -272,7 +270,7 @@ def invoke_for_all_commands(paths, layers, command, *args: Sequence[str], skip_v
validate_for_all_commands(layer, skip_validation=skip_validation)

# set the s3 key
if not get_backend_key(layer / "config.tf"):
if not skip_validation and not get_backend_key(layer / "config.tf"):
backend_key_base = f"{paths.cwd.relative_to(paths.root_dir).as_posix()}/terraform.tfstate"
backend_key = backend_key_base.replace("/base-", "/").replace("/tools-", "/")
set_backend_key(layer / "config.tf", backend_key)
Expand Down
Loading