During terragrunt run -- plan.
inputs = { command = get_terraform_command() # "plan"}get_terraform_command() --> stringget_terraform_command returns the OpenTofu/Terraform command Terragrunt is running. For apply -destroy, it returns destroy. Under a Terragrunt command that doesn’t run OpenTofu/Terraform, it returns that command’s name, e.g. render.
locals { destroying = get_terraform_command() == "destroy"}
inputs = { deletion_protection = !local.destroying}For the arguments too, use get_terraform_cli_args.
During terragrunt run -- plan.
inputs = { command = get_terraform_command() # "plan"}