Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 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: 0 additions & 8 deletions atmos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@
# It supports POSIX-style Globs for file names/paths (double-star '**' is supported)
# https://en.wikipedia.org/wiki/Glob_(programming)

# Base path for components, stacks and workflows configurations.
# Can also be set using 'ATMOS_BASE_PATH' ENV var, or '--base-path' command-line argument.
# Supports both absolute and relative paths.
# If not provided or is an empty string, 'components.terraform.base_path', 'components.helmfile.base_path', 'stacks.base_path' and 'workflows.base_path'
# are independent settings (supporting both absolute and relative paths).
# If 'base_path' is provided, 'components.terraform.base_path', 'components.helmfile.base_path', 'stacks.base_path' and 'workflows.base_path'
# are considered paths relative to 'base_path'.

vendor:
# Path to vendor configuration file or directory containing vendor files
# Supports both absolute and relative paths
Expand Down
24 changes: 23 additions & 1 deletion cmd/terraform.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,29 @@
}
return
}
err := e.ExecuteTerraform(info)

flags := cmd.Flags()

processTemplates, err := flags.GetBool("process-templates")
if err != nil {
u.PrintErrorMarkdownAndExit("", err, "")
}

Check warning on line 70 in cmd/terraform.go

View check run for this annotation

Codecov / codecov/patch

cmd/terraform.go#L65-L70

Added lines #L65 - L70 were not covered by tests

processYamlFunctions, err := flags.GetBool("process-functions")
if err != nil {
u.PrintErrorMarkdownAndExit("", err, "")
}

Check warning on line 75 in cmd/terraform.go

View check run for this annotation

Codecov / codecov/patch

cmd/terraform.go#L72-L75

Added lines #L72 - L75 were not covered by tests

skip, err := flags.GetStringSlice("skip")
if err != nil {
u.PrintErrorMarkdownAndExit("", err, "")
}

Check warning on line 80 in cmd/terraform.go

View check run for this annotation

Codecov / codecov/patch

cmd/terraform.go#L77-L80

Added lines #L77 - L80 were not covered by tests

info.ProcessTemplates = processTemplates
info.ProcessFunctions = processYamlFunctions
info.Skip = skip

err = e.ExecuteTerraform(info)

Check warning on line 86 in cmd/terraform.go

View check run for this annotation

Codecov / codecov/patch

cmd/terraform.go#L82-L86

Added lines #L82 - L86 were not covered by tests
if err != nil {
u.PrintErrorMarkdownAndExit("", err, "")
}
Expand Down
5 changes: 4 additions & 1 deletion cmd/terraform_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,10 @@ Arguments:
// attachTerraformCommands attaches static Terraform commands to a provided parent command
func attachTerraformCommands(parentCmd *cobra.Command) {
parentCmd.PersistentFlags().String("append-user-agent", "", fmt.Sprintf("Sets the TF_APPEND_USER_AGENT environment variable to customize the User-Agent string in Terraform provider requests. Example: `Atmos/%s (Cloud Posse; +https://atmos.tools)`. This flag works with almost all commands.", version.Version))
parentCmd.PersistentFlags().Bool("skip-init", false, "Skip running `terraform init` before executing the command")
parentCmd.PersistentFlags().Bool("skip-init", false, "Skip running `terraform init` before executing terraform commands")
parentCmd.PersistentFlags().Bool("process-templates", true, "Enable/disable Go template processing in Atmos stack manifests when executing terraform commands")
parentCmd.PersistentFlags().Bool("process-functions", true, "Enable/disable YAML functions processing in Atmos stack manifests when executing terraform commands")
parentCmd.PersistentFlags().StringSlice("skip", nil, "Skip executing specific YAML functions in the Atmos stack manifests when executing terraform commands")

commands := getTerraformCommands()

Expand Down
2 changes: 1 addition & 1 deletion examples/quick-start-advanced/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG GEODESIC_OS=debian
# https://atmos.tools/
# https://github.com/cloudposse/atmos
# https://github.com/cloudposse/atmos/releases
ARG ATMOS_VERSION=1.165.3
ARG ATMOS_VERSION=1.167.0

# Terraform: https://github.com/hashicorp/terraform/releases
ARG TF_VERSION=1.5.7
Expand Down
65 changes: 39 additions & 26 deletions go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading