Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 7 additions & 7 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -359,15 +359,15 @@ APACHE 2.0 LICENSED DEPENDENCIES

- github.com/open-policy-agent/opa
License: Apache-2.0
URL: https://github.com/open-policy-agent/opa/blob/v1.11.1/LICENSE
URL: https://github.com/open-policy-agent/opa/blob/v1.12.1/LICENSE

- github.com/open-policy-agent/opa/internal/gojsonschema
License: Apache-2.0
URL: https://github.com/open-policy-agent/opa/blob/v1.11.1/internal/gojsonschema/LICENSE-APACHE-2.0.txt
URL: https://github.com/open-policy-agent/opa/blob/v1.12.1/internal/gojsonschema/LICENSE-APACHE-2.0.txt

- github.com/open-policy-agent/opa/internal/semver
License: Apache-2.0
URL: https://github.com/open-policy-agent/opa/blob/v1.11.1/internal/semver/LICENSE
URL: https://github.com/open-policy-agent/opa/blob/v1.12.1/internal/semver/LICENSE

- github.com/opencontainers/go-digest
License: Apache-2.0
Expand Down Expand Up @@ -503,7 +503,7 @@ APACHE 2.0 LICENSED DEPENDENCIES

- google.golang.org/genproto/googleapis/rpc
License: Apache-2.0
URL: https://github.com/googleapis/go-genproto/blob/ff82c1b0f217/googleapis/rpc/LICENSE
URL: https://github.com/googleapis/go-genproto/blob/97cd9d5aeac2/googleapis/rpc/LICENSE

- google.golang.org/grpc
License: Apache-2.0
Expand Down Expand Up @@ -684,7 +684,7 @@ BSD LICENSED DEPENDENCIES

- github.com/open-policy-agent/opa/internal/edittree/bitvector
License: BSD-3-Clause
URL: https://github.com/open-policy-agent/opa/blob/v1.11.1/internal/edittree/bitvector/license.txt
URL: https://github.com/open-policy-agent/opa/blob/v1.12.1/internal/edittree/bitvector/license.txt

- github.com/pierrec/lz4/v4
License: BSD-3-Clause
Expand Down Expand Up @@ -784,11 +784,11 @@ BSD LICENSED DEPENDENCIES

- google.golang.org/api
License: BSD-3-Clause
URL: https://github.com/googleapis/google-api-go-client/blob/v0.257.0/LICENSE
URL: https://github.com/googleapis/google-api-go-client/blob/v0.258.0/LICENSE

- google.golang.org/api/internal/third_party/uritemplates
License: BSD-3-Clause
URL: https://github.com/googleapis/google-api-go-client/blob/v0.257.0/internal/third_party/uritemplates/LICENSE
URL: https://github.com/googleapis/google-api-go-client/blob/v0.258.0/internal/third_party/uritemplates/LICENSE

- google.golang.org/protobuf
License: BSD-3-Clause
Expand Down
1 change: 1 addition & 0 deletions cmd/terraform/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ For complete Terraform/OpenTofu documentation, see:
func init() {
// Create parser with apply-specific flags using functional options.
applyParser = flags.NewStandardParser(
WithBackendExecutionFlags(),
flags.WithStringFlag("from-plan", "", "", "Apply from plan file (uses deterministic location if path not specified)"),
flags.WithNoOptDefVal("from-plan", "true"),
flags.WithStringFlag("planfile", "", "", "Set the plan file to use"),
Expand Down
1 change: 1 addition & 0 deletions cmd/terraform/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ This ensures that the changes defined in your Terraform configuration are applie
func init() {
// Create parser with deploy-specific flags using functional options.
deployParser = flags.NewStandardParser(
WithBackendExecutionFlags(),
flags.WithBoolFlag("deploy-run-init", "", false, "If set atmos will run `terraform init` before executing the command"),
flags.WithStringFlag("from-plan", "", "", "Apply from plan file (uses deterministic location if path not specified)"),
flags.WithNoOptDefVal("from-plan", "true"),
Expand Down
26 changes: 26 additions & 0 deletions cmd/terraform/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,32 @@ func registerExecutionFlags(registry *flags.FlagRegistry) {
})
}

// BackendExecutionFlags returns flags for commands that generate backend files or run init.
// These flags are used by: init, workspace, plan, apply, deploy.
func BackendExecutionFlags() *flags.FlagRegistry {
registry := flags.NewFlagRegistry()
registry.Register(&flags.StringFlag{
Name: "auto-generate-backend-file",
Shorthand: "",
Default: "",
Description: "Override auto_generate_backend_file setting from atmos.yaml (true/false)",
EnvVars: []string{"ATMOS_AUTO_GENERATE_BACKEND_FILE"},
})
registry.Register(&flags.StringFlag{
Name: "init-run-reconfigure",
Shorthand: "",
Default: "",
Description: "Override init_run_reconfigure setting from atmos.yaml (true/false)",
EnvVars: []string{"ATMOS_INIT_RUN_RECONFIGURE"},
})
return registry
}

// WithBackendExecutionFlags returns a flags.Option that adds backend execution flags.
func WithBackendExecutionFlags() flags.Option {
return flags.WithFlagRegistry(BackendExecutionFlags())
}

// registerProcessingFlags adds flags for template and function processing.
func registerProcessingFlags(registry *flags.FlagRegistry) {
registry.Register(&flags.BoolFlag{
Expand Down
Loading
Loading