Conversation
|
Important Cloud Posse Engineering Team Review RequiredThis pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes. To expedite this process, reach out to us on Slack in the |
📝 WalkthroughWalkthroughThis pull request removes detailed Changes
Possibly related PRs
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (5)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
website/docs/cli/commands/terraform/usage.mdx (3)
156-156: Typographical Issue in--process-templatesFlag DescriptionThere is a small typo: "template procesing" should be spelled as "template processing" so it aligns with standard spelling.
157-157: Typographical Issue in--process-functionsFlag DescriptionThe phrase "functions procesing" is misspelled. Please update it to "functions processing" for clarity and consistency.
158-158: Formatting Issue in--skipFlag RowThe table row for the
--skipflag appears to include extra columns, which might break the markdown table rendering. Additionally, note the minor inconsistency: previous rows refer to "Atmos stack manifests" while this row uses "Atmos stacks manifests". It would be best to standardize this phrasing.Below is a suggested diff to fix these issues:
-| `--skip` | Skip processing a specific Atmos YAML function<br/>in Atmos stacks manifests when executing terraform commands.<br/>To specify more than one function,<br/>use multiple `--skip` flags, or separate the functions with a comma:<br/>`atmos terraform plan <component> -s <stack> --skip=eval --skip=include`<br/>`atmos terraform apply <component> -s <stack> --skip=terraform.output,include` | | no | | | no | +| `--skip` | Skip processing a specific Atmos YAML function<br/>in Atmos stack manifests when executing terraform commands.<br/>To specify more than one function, use multiple `--skip` flags or a comma-separated list (e.g., `--skip=eval,include`). | | no |
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (18)
atmos.yaml(0 hunks)cmd/terraform.go(1 hunks)cmd/terraform_commands.go(1 hunks)examples/quick-start-advanced/Dockerfile(1 hunks)go.mod(11 hunks)internal/exec/terraform.go(1 hunks)internal/exec/terraform_generate_backend.go(2 hunks)internal/exec/terraform_generate_varfile.go(2 hunks)internal/exec/utils.go(1 hunks)pkg/config/const.go(1 hunks)pkg/schema/schema.go(1 hunks)website/docs/cli/commands/terraform/terraform-deploy.mdx(1 hunks)website/docs/cli/commands/terraform/terraform-generate-backend.mdx(1 hunks)website/docs/cli/commands/terraform/terraform-generate-varfile.mdx(1 hunks)website/docs/cli/commands/terraform/terraform-shell.mdx(1 hunks)website/docs/cli/commands/terraform/terraform-workspace.mdx(1 hunks)website/docs/cli/commands/terraform/usage.mdx(1 hunks)website/docs/integrations/atlantis.mdx(1 hunks)
💤 Files with no reviewable changes (1)
- atmos.yaml
🧰 Additional context used
🧠 Learnings (1)
examples/quick-start-advanced/Dockerfile (2)
Learnt from: aknysh
PR: cloudposse/atmos#775
File: examples/quick-start-advanced/Dockerfile:9-9
Timestamp: 2025-03-18T00:20:29.426Z
Learning: It is acceptable to set `ARG ATMOS_VERSION` to a future version like `1.105.0` in `examples/quick-start-advanced/Dockerfile` if that will be the next release.
Learnt from: osterman
PR: cloudposse/atmos#801
File: examples/quick-start-advanced/Dockerfile:9-9
Timestamp: 2025-03-18T00:20:29.425Z
Learning: When updating the `ATMOS_VERSION` in Dockerfiles, the team prefers to pin to the next future version when the PR merges, even if the version is not yet released.
🧬 Code Definitions (5)
internal/exec/utils.go (1)
pkg/config/const.go (3) (3)
ProcessTemplatesFlag(73:73)ProcessFunctionsFlag(74:74)SkipFlag(75:75)
internal/exec/terraform_generate_varfile.go (15)
internal/exec/validate_component.go (1) (1)
err(119:119)internal/exec/validate_stacks.go (1) (1)
err(221:221)cmd/cmd_utils.go (1) (1)
err(307:307)internal/exec/atlantis_generate_repo_config.go (1) (1)
err(154:154)internal/exec/vendor_utils.go (1) (1)
err(182:182)internal/exec/aws_eks_update_kubeconfig.go (3) (3)
err(127:127)err(155:155)atmosConfig(126:126)internal/exec/describe_affected_utils.go (1) (1)
err(572:572)internal/exec/terraform_outputs.go (1) (1)
err(70:70)cmd/root.go (2) (2)
err(144:144)atmosConfig(27:27)pkg/config/config.go (2) (2)
err(126:126)atmosConfig(125:125)cmd/docs.go (1) (1)
err(119:119)internal/exec/workflow_utils.go (1) (1)
err(73:73)cmd/completion.go (1) (1)
err(20:20)pkg/spacelift/spacelift_stack_processor.go (1) (1)
err(96:96)internal/exec/utils.go (2) (2)
info(649:649)ProcessStacks(283:642)
cmd/terraform.go (1)
internal/exec/terraform.go (1) (1)
ExecuteTerraform(39:505)
internal/exec/terraform.go (15)
internal/exec/utils.go (2) (2)
info(649:649)ProcessStacks(283:642)pkg/utils/file_utils.go (1) (1)
err(296:296)internal/exec/stack_utils.go (1) (1)
err(23:23)pkg/config/config.go (2) (2)
err(126:126)atmosConfig(125:125)pkg/spacelift/spacelift_stack_processor.go (1) (1)
err(96:96)internal/exec/validate_component.go (1) (1)
err(119:119)internal/exec/validate_stacks.go (1) (1)
err(221:221)internal/exec/atlantis_generate_repo_config.go (1) (1)
err(154:154)internal/exec/terraform_outputs.go (1) (1)
err(70:70)internal/exec/vendor_utils.go (1) (1)
err(182:182)internal/exec/aws_eks_update_kubeconfig.go (3) (3)
err(127:127)err(155:155)atmosConfig(126:126)internal/exec/describe_affected_utils.go (1) (1)
err(572:572)cmd/root.go (2) (2)
err(144:144)atmosConfig(27:27)cmd/completion.go (1) (1)
err(20:20)cmd/docs.go (1) (1)
err(119:119)
internal/exec/terraform_generate_backend.go (16)
internal/exec/validate_component.go (1) (1)
err(119:119)internal/exec/validate_stacks.go (1) (1)
err(221:221)cmd/cmd_utils.go (1) (1)
err(307:307)internal/exec/atlantis_generate_repo_config.go (1) (1)
err(154:154)internal/exec/vendor_utils.go (1) (1)
err(182:182)internal/exec/aws_eks_update_kubeconfig.go (3) (3)
err(127:127)err(155:155)atmosConfig(126:126)internal/exec/describe_affected_utils.go (1) (1)
err(572:572)pkg/config/config.go (2) (2)
err(126:126)atmosConfig(125:125)cmd/docs.go (1) (1)
err(119:119)internal/exec/workflow_utils.go (1) (1)
err(73:73)internal/exec/stack_utils.go (1) (1)
err(23:23)pkg/utils/file_utils.go (1) (1)
err(296:296)internal/exec/terraform_outputs.go (1) (1)
err(70:70)cmd/root.go (2) (2)
err(144:144)atmosConfig(27:27)cmd/completion.go (1) (1)
err(20:20)internal/exec/utils.go (2) (2)
info(649:649)ProcessStacks(283:642)
⏰ Context from checks skipped due to timeout of 90000ms (7)
- GitHub Check: [mock-windows] tests/fixtures/scenarios/complete
- GitHub Check: [mock-windows] examples/demo-component-versions
- GitHub Check: [localstack] demo-localstack
- GitHub Check: Acceptance Tests (macos-latest, macos)
- GitHub Check: Acceptance Tests (windows-latest, windows)
- GitHub Check: Acceptance Tests (ubuntu-latest, linux)
- GitHub Check: Summary
🔇 Additional comments (18)
go.mod (1)
6-6: Clean dependency version updates.The dependency version updates are well-structured and help keep the project secure with latest features.
Also applies to: 23-23, 32-32, 41-41, 44-44, 59-59, 74-82, 159-159, 185-186, 269-269, 275-276, 309-309, 312-312, 315-315, 318-321
website/docs/integrations/atlantis.mdx (1)
676-676: Version bump to match future release.Updating the Atmos version to 1.167.0 aligns with the version changes in other files.
examples/quick-start-advanced/Dockerfile (1)
9-9: Version bump consistent with project practices.The ATMOS_VERSION update to 1.167.0 aligns with team preferences to pin to the next future version when the PR merges.
internal/exec/utils.go (1)
53-55: Adding new flags to support template and function processing control.The addition of these three flags directly supports the PR objectives of allowing users to control the processing of templates and YAML functions in Atmos stack manifests.
pkg/schema/schema.go (1)
420-422: New fields added to ConfigAndStacksInfo are well structured.These three new fields align properly with the PR objectives to control template and function processing. The boolean types for toggle flags and string slice for the skip list are appropriate data types.
pkg/config/const.go (1)
73-75: Command flag constants follow naming conventions.The new flag constants are well-defined and follow the existing pattern of naming and formatting. They're positioned logically in the constants block.
cmd/terraform.go (1)
65-86: Flag handling implementation is robust.Good implementation of flag retrieval and error handling. The code:
- Retrieves flag values with appropriate type conversion
- Properly handles errors for each flag
- Correctly assigns values to the corresponding info struct fields
- Maintains the existing error handling pattern
This implementation provides a clean way to pass the flag values to the terraform execution.
internal/exec/terraform_generate_backend.go (2)
27-40: Flag extraction follows consistent pattern.The flag extraction code follows the same pattern as other flag retrievals in this file. Each flag has proper error handling in place.
58-58: ProcessStacks call updated to use the new parameters.The call to ProcessStacks is correctly updated to pass the newly extracted flag values. This ensures the flags control template processing, function processing, and which functions to skip.
internal/exec/terraform_generate_varfile.go (2)
26-39: Well-implemented flag handling for template and function processing controls.The code correctly retrieves and handles the new flags for controlling Go template processing, YAML function processing, and function skipping. Error handling follows the established pattern.
57-57: Good update to ProcessStacks function call.The modification to the ProcessStacks function call properly passes the new flag values, replacing the previous hardcoded values with user-configurable options.
internal/exec/terraform.go (1)
63-63: Clean implementation of ProcessStacks parameter update.The change simplifies the function call by directly using the properties from the info object instead of calculating an intermediate variable. This is more maintainable and directly reflects the user's intent from command line arguments.
website/docs/cli/commands/terraform/terraform-deploy.mdx (1)
87-96: Thorough documentation of new command flags.The documentation clearly explains the purpose of each new flag and provides good examples for the
--skipflag, showing both multiple flag usage and comma-separated values. Table formatting is clean and consistent.website/docs/cli/commands/terraform/terraform-workspace.mdx (1)
52-58: Clear and consistent documentation for the workspace command flags.Flag documentation matches the pattern established in other command files, providing consistent help information across the CLI. Examples for the
--skipflag are particularly helpful.website/docs/cli/commands/terraform/terraform-shell.mdx (1)
66-72: Well-documented CLI flags with clear descriptions.The additions of
--process-templates,--process-functions, and--skipflags are properly documented with detailed descriptions that clearly explain their purpose and usage. The examples for the--skipflag particularly help users understand how to specify multiple functions to skip.website/docs/cli/commands/terraform/terraform-generate-backend.mdx (1)
48-54: Documentation is consistent and informative.The flag table has been expanded with the same three new flags that were added to other commands, maintaining consistency across the CLI documentation. The descriptions are thorough and include helpful examples for the
--skipflag.website/docs/cli/commands/terraform/terraform-generate-varfile.mdx (1)
47-53: Clear and consistent documentation for CLI flags.The three new flags have been documented with the same level of detail as in other command files, which helps maintain a consistent user experience across the CLI. The examples for the
--skipflag are particularly helpful.cmd/terraform_commands.go (1)
257-260: Flag implementations match documentation.The implementation of the CLI flags aligns perfectly with the documentation:
- Updated description for
--skip-initprovides clarity- New flags
--process-templatesand--process-functionsdefault to true- The
--skipflag is implemented as a string slice, allowing for multiple valuesThis provides users with fine-grained control over template and function processing during command execution.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
website/docs/cli/commands/terraform/terraform-deploy.mdx (1)
94-96: Deployment flags section looks good.
The additions for--process-templates,--process-functions, and--skipare well integrated into the table. Just double-check the table formatting—there seems to be extra spacing in the--skiprow that might benefit from a quick review for consistency.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (18)
atmos.yaml(0 hunks)cmd/terraform.go(1 hunks)cmd/terraform_commands.go(1 hunks)examples/quick-start-advanced/Dockerfile(1 hunks)go.mod(11 hunks)internal/exec/terraform.go(1 hunks)internal/exec/terraform_generate_backend.go(2 hunks)internal/exec/terraform_generate_varfile.go(2 hunks)internal/exec/utils.go(1 hunks)pkg/config/const.go(1 hunks)pkg/schema/schema.go(1 hunks)website/docs/cli/commands/terraform/terraform-deploy.mdx(1 hunks)website/docs/cli/commands/terraform/terraform-generate-backend.mdx(1 hunks)website/docs/cli/commands/terraform/terraform-generate-varfile.mdx(1 hunks)website/docs/cli/commands/terraform/terraform-shell.mdx(1 hunks)website/docs/cli/commands/terraform/terraform-workspace.mdx(1 hunks)website/docs/cli/commands/terraform/usage.mdx(1 hunks)website/docs/integrations/atlantis.mdx(1 hunks)
💤 Files with no reviewable changes (1)
- atmos.yaml
🧰 Additional context used
🧠 Learnings (1)
examples/quick-start-advanced/Dockerfile (2)
Learnt from: aknysh
PR: cloudposse/atmos#775
File: examples/quick-start-advanced/Dockerfile:9-9
Timestamp: 2025-03-18T00:20:29.426Z
Learning: It is acceptable to set `ARG ATMOS_VERSION` to a future version like `1.105.0` in `examples/quick-start-advanced/Dockerfile` if that will be the next release.
Learnt from: osterman
PR: cloudposse/atmos#801
File: examples/quick-start-advanced/Dockerfile:9-9
Timestamp: 2025-03-18T00:20:29.425Z
Learning: When updating the `ATMOS_VERSION` in Dockerfiles, the team prefers to pin to the next future version when the PR merges, even if the version is not yet released.
🧬 Code Definitions (2)
cmd/terraform.go (1)
internal/exec/terraform.go (1) (1)
ExecuteTerraform(39:505)
internal/exec/utils.go (1)
pkg/config/const.go (3) (3)
ProcessTemplatesFlag(73:73)ProcessFunctionsFlag(74:74)SkipFlag(75:75)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: [localstack] demo-localstack
- GitHub Check: Acceptance Tests (macos-latest, macos)
- GitHub Check: Acceptance Tests (windows-latest, windows)
- GitHub Check: Acceptance Tests (ubuntu-latest, linux)
- GitHub Check: Summary
🔇 Additional comments (19)
website/docs/integrations/atlantis.mdx (1)
675-677: Bump ATMOS_VERSION for ConsistencyThe update to
ATMOS_VERSION: 1.167.0is correctly applied and helps ensure that the GitHub Actions workflow uses the intended Atmos release. Please make sure that any other documentation references to the previous version are updated consistently if needed.examples/quick-start-advanced/Dockerfile (1)
9-9: Update Atmos Version in DockerfileThe
ARG ATMOS_VERSIONhas been updated to1.167.0, which aligns with the changes in the documentation and the version used in the GitHub Actions workflow. This is consistent with our team’s best practices regarding version pinning for upcoming releases.go.mod (2)
6-6: Dependency update looks goodThis PR includes numerous dependency updates to keep the codebase current with the latest package versions. These updates improve security, fix bugs, and potentially add new features that will be beneficial to the project.
Also applies to: 23-23, 32-32, 40-40, 44-44, 59-59, 65-66
74-77: New dependencies added appropriatelyThe addition of new dependencies like cel.dev/expr, cloud.google.com/go/auth, and others appear to be related to the updated Google Cloud APIs and supporting functionality needed for the new features.
Also applies to: 80-81, 84-86, 259-260
pkg/config/const.go (1)
73-75: New CLI flags added correctlyThese three new constants define the flags that will be used to control the processing of templates and YAML functions in Atmos stack manifests. The naming is clear and consistent with the existing flag naming pattern in the codebase.
pkg/schema/schema.go (1)
420-422: Appropriate struct fields added for new flagsThe new fields added to the
ConfigAndStacksInfostruct correctly correspond to the CLI flags defined in const.go. This will allow the application to store and pass these flag values through the execution flow.internal/exec/terraform_generate_backend.go (2)
27-40: Proper flag parsing implementationThe code correctly retrieves the flag values with appropriate error handling. The variable names clearly indicate their purpose, making the code easy to understand.
58-58: Updated function call with new parametersThe
ProcessStacksfunction call has been correctly updated to use the parsed flag values instead of hardcoded values. This implements the core functionality of allowing users to control template and function processing through the CLI.cmd/terraform.go (1)
64-86: Well-implemented command flag handling for the Terraform commands.This change adds three new flags:
--process-templates: Controls Go template processing--process-functions: Controls YAML function processing--skip: Allows specifying YAML functions to skipThe implementation correctly retrieves these flags and assigns them to the
infostructure before executing the command. Error handling is consistent with the codebase's patterns.internal/exec/terraform.go (1)
63-63: Correctly updated ProcessStacks parameters to use the new command-line flags.The change properly passes the user-provided values for process-templates, process-functions, and skip through to the ProcessStacks function, which aligns with the flags added in cmd/terraform.go.
internal/exec/utils.go (1)
53-55: Appropriate addition of new flags to the commonFlags list.Adding these flags to commonFlags ensures they'll be processed by Atmos and removed before passing arguments to Terraform. This is critical since Terraform wouldn't recognize these Atmos-specific flags.
internal/exec/terraform_generate_varfile.go (2)
26-40: Proper implementation of flag retrieval in the varfile command.The implementation correctly retrieves the three new flags with appropriate error handling, maintaining consistency with the changes in cmd/terraform.go.
57-57: Correctly updated ProcessStacks call to use the retrieved flag values.The function now passes the user-provided values to ProcessStacks rather than using fixed values, providing consistent behavior with other terraform commands.
website/docs/cli/commands/terraform/terraform-shell.mdx (1)
66-72: Great documentation update for CLI flags.
The newly added rows for--process-templates,--process-functions, and--skipare clearly described and consistent with the style of the existing table. This should help users understand their usage easily.website/docs/cli/commands/terraform/terraform-generate-backend.mdx (1)
48-55: Backend generation command flags are well integrated.
The new entries for--process-templates,--process-functions, and--skipare clearly documented and mirror the style used in other command pages. This consistency will help users apply similar options across commands.website/docs/cli/commands/terraform/terraform-workspace.mdx (1)
52-59: Workspace command flag additions are consistent.
The inclusion of--process-templates,--process-functions, and--skipin the flags table is clear and follows the same formatting as in other documentation files, ensuring consistency across the CLI docs.website/docs/cli/commands/terraform/terraform-generate-varfile.mdx (1)
47-54: Varfile command flags addition looks solid.
The new flags--process-templates,--process-functions, and--skiphave been added with detailed descriptions. Their formatting and explanatory notes are consistent with the rest of the documentation, which helps maintain clarity.website/docs/cli/commands/terraform/usage.mdx (1)
149-158: Documentation updated with new flags.The table now includes the three new flags with clear descriptions and usage examples. The formatting is consistent, and the examples show both single and multiple flag usage patterns, which is helpful.
cmd/terraform_commands.go (1)
257-260: Implementation of new CLI flags looks good.The implementation adds the three new flags as described in the PR objectives:
--process-templates(boolean, defaults to true)--process-functions(boolean, defaults to true)--skip(string slice, defaults to nil)The defaults maintain backward compatibility by enabling processing by default, which is appropriate.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
go.mod (1)
74-77: Update multiple Cloud Go libraries.
This block updates several dependencies—cel.dev/exprto v0.19.1,cloud.google.com/goto v0.118.3, along withcloud.google.com/go/auth(v0.15.0) andcloud.google.com/go/auth/oauth2adapt(v0.2.7). These collective updates should offer improved stability with Google Cloud integrations. Please verify any potential API changes.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (18)
atmos.yaml(0 hunks)cmd/terraform.go(1 hunks)cmd/terraform_commands.go(1 hunks)examples/quick-start-advanced/Dockerfile(1 hunks)go.mod(11 hunks)internal/exec/terraform.go(1 hunks)internal/exec/terraform_generate_backend.go(2 hunks)internal/exec/terraform_generate_varfile.go(2 hunks)internal/exec/utils.go(1 hunks)pkg/config/const.go(1 hunks)pkg/schema/schema.go(1 hunks)website/docs/cli/commands/terraform/terraform-deploy.mdx(1 hunks)website/docs/cli/commands/terraform/terraform-generate-backend.mdx(1 hunks)website/docs/cli/commands/terraform/terraform-generate-varfile.mdx(1 hunks)website/docs/cli/commands/terraform/terraform-shell.mdx(1 hunks)website/docs/cli/commands/terraform/terraform-workspace.mdx(1 hunks)website/docs/cli/commands/terraform/usage.mdx(1 hunks)website/docs/integrations/atlantis.mdx(1 hunks)
💤 Files with no reviewable changes (1)
- atmos.yaml
🧰 Additional context used
🧠 Learnings (1)
examples/quick-start-advanced/Dockerfile (2)
Learnt from: aknysh
PR: cloudposse/atmos#775
File: examples/quick-start-advanced/Dockerfile:9-9
Timestamp: 2025-03-18T00:20:29.426Z
Learning: It is acceptable to set `ARG ATMOS_VERSION` to a future version like `1.105.0` in `examples/quick-start-advanced/Dockerfile` if that will be the next release.
Learnt from: osterman
PR: cloudposse/atmos#801
File: examples/quick-start-advanced/Dockerfile:9-9
Timestamp: 2025-03-18T00:20:29.425Z
Learning: When updating the `ATMOS_VERSION` in Dockerfiles, the team prefers to pin to the next future version when the PR merges, even if the version is not yet released.
🧬 Code Definitions (2)
internal/exec/utils.go (1)
pkg/config/const.go (3) (3)
ProcessTemplatesFlag(73:73)ProcessFunctionsFlag(74:74)SkipFlag(75:75)
cmd/terraform.go (1)
internal/exec/terraform.go (1) (1)
ExecuteTerraform(39:505)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Acceptance Tests (macos-latest, macos)
- GitHub Check: Acceptance Tests (windows-latest, windows)
- GitHub Check: Acceptance Tests (ubuntu-latest, linux)
- GitHub Check: Summary
🔇 Additional comments (42)
examples/quick-start-advanced/Dockerfile (1)
9-9: Version bumped appropriately.Updating the ATMOS_VERSION from 1.165.3 to 1.167.0 for the next release aligns with team practices. Perfect.
internal/exec/utils.go (1)
53-55: New CLI flags added correctly to commonFlags.The three new flags for controlling template and function processing have been added to the commonFlags slice, which will ensure they're properly handled by Atmos and not passed to the underlying tools.
pkg/config/const.go (1)
73-75: Three new flag constants defined clearly.The new constant declarations for the process-templates, process-functions, and skip flags are well named and follow the project's conventions for flag definitions.
website/docs/integrations/atlantis.mdx (1)
676-676: Version updated in documentation example.The ATMOS_VERSION has been updated to 1.167.0 in the GitHub Action example, maintaining consistency with the Dockerfile update.
pkg/schema/schema.go (1)
420-422: Solid addition of configuration fields for controlling template and function processing.These new fields align well with the PR objectives to add CLI flags for controlling template and function processing. The field types are appropriate for their purposes:
ProcessTemplatesas a boolean for enabling/disabling template processingProcessFunctionsas a boolean for enabling/disabling function processingSkipas a string slice for specifying functions to skipinternal/exec/terraform.go (1)
63-63: Good implementation of passing configuration fields to ProcessStacks.The function now properly utilizes the new configuration fields directly from the
infostructure instead of using a calculated or default value. This allows the CLI flags to directly control template and function processing behavior.website/docs/cli/commands/terraform/terraform-shell.mdx (1)
66-72: Well-documented new flags with clear descriptions and examples.The documentation provides clear explanations of the new flags:
--process-templatesfor controlling Go template processing--process-functionsfor controlling YAML functions processing--skipfor specifying functions to skipThe examples showing multiple ways to use the
--skipflag are particularly helpful for users.Consider adding the default values for these flags in the documentation to make it even clearer for users.
website/docs/cli/commands/terraform/terraform-workspace.mdx (1)
52-58: Consistent documentation of the new flags across commands.The documentation maintains consistency with other commands, providing the same clear descriptions and examples for the new flags. This consistency improves the user experience.
internal/exec/terraform_generate_backend.go (2)
27-40: Implementation of CLI flags looks goodThe additions properly retrieve the new
--process-templates,--process-functions, and--skipflags from the command line with appropriate error handling.The implementation aligns with the PR objectives to provide users with more control over template and function processing in Atmos stack manifests.
58-58: ProcessStacks call correctly updatedThe function call has been properly modified to utilize the newly added flags instead of hardcoded values, maintaining the same function signature while providing more flexibility.
website/docs/cli/commands/terraform/terraform-generate-varfile.mdx (1)
47-53: Documentation updated with new flagsThe flags table has been properly expanded to include the three new command-line options:
--process-templatesfor controlling Go template processing--process-functionsfor controlling YAML functions processing--skipfor specifying YAML functions to skipThe descriptions are clear and examples are provided for handling multiple values with the
--skipflag.website/docs/cli/commands/terraform/terraform-generate-backend.mdx (1)
48-54: Documentation updated with new flagsThe added flags are consistent with the implementation in the code and match the documentation in other command files:
--process-templates--process-functions--skipThe examples for the
--skipflag clearly demonstrate both methods for specifying multiple functions.website/docs/cli/commands/terraform/terraform-deploy.mdx (1)
87-96: Documentation updated with new flagsThe flags table has been correctly expanded to include the three new command-line options while maintaining consistency with other command documentation:
--process-templates--process-functions--skipThe formatting is consistent and the descriptions provide clear guidance on flag usage.
internal/exec/terraform_generate_varfile.go (2)
26-39: Good implementation of new flag parsingThe implementation correctly retrieves and validates the new command-line flags for controlling template and function processing, following consistent error handling patterns.
57-57: Correctly updated ProcessStacks call with new parametersThe call has been properly modified to use the newly added flag values instead of hardcoded values, providing users with runtime control over processing behavior.
cmd/terraform.go (1)
65-85: Well-structured implementation of flag processingThe code effectively retrieves and handles the new command-line flags, with appropriate error handling and assignment to the info structure that will be used downstream by ExecuteTerraform.
website/docs/cli/commands/terraform/usage.mdx (1)
149-158: Clear and comprehensive documentation of the new flagsThe documentation clearly explains each new flag's purpose, usage syntax, and default behavior. The table formatting is consistent and provides users with all necessary information to understand how to use these options.
cmd/terraform_commands.go (1)
257-260: Appropriate flag definitions with sensible defaultsThe implementation adds three new flags with proper descriptions and default values, while also improving the existing skip-init flag description. This provides users with more granular control over Terraform command execution.
go.mod (24)
6-6: Update dependency for Secret Manager.
The version forcloud.google.com/go/secretmanagerhas been updated to v1.14.6. This update should improve compatibility and features. Please verify that our usage remains fully compatible with the new version.
23-23: Upgrade EditorConfig Checker.
The dependencygithub.com/editorconfig-checker/editorconfig-checker/v3is now at v3.2.1. This minor upgrade should be safe, but a quick check for any API adjustments might be worthwhile.
32-32: Bump Google GAX dependency.
The version forgithub.com/googleapis/gax-go/v2has been bumped to v2.14.1. Ensure that any breaking changes or new features are handled in our integrations.
40-40: Update JFrog Client dependency.
The dependencygithub.com/jfrog/jfrog-client-gois now at v1.51.1. Please confirm that this update does not introduce any regressions in our usage of the library.
44-44: Refresh Bubblezone version.
github.com/lrstanley/bubblezonehas been updated to a new developmental version (v0.0.0-20250315020633-c249a3fe1231). Since this appears to be a pre-release, please verify its stability within our codebase.
59-59: Bump Viper to a newer version.
The update forgithub.com/spf13/viperto v1.20.0 should enhance configuration management. Double-check that there are no breaking changes in configuration handling.
65-66: Upgrade Google API and gRPC dependencies.
Bothgoogle.golang.org/apiandgoogle.golang.org/grpchave been updated (to v0.226.0 and v1.71.0 respectively). It’s important to test RPC-related features to ensure smooth integration.
79-81: Refresh Cloud IAM/Monitoring dependencies.
The updates forcloud.google.com/go/iam(v1.4.1),cloud.google.com/go/monitoring(v1.24.0), andcloud.google.com/go/storage(v1.50.0) are in line with our cloud integration needs. Running integration tests is recommended to catch any subtle issues.
84-86: Enhance observability with opentelemetry updates.
The dependencies under thegithub.com/GoogleCloudPlatform/opentelemetry-operations-gonamespace—detectors (v1.25.0), exporter (v0.49.0), and internal/resourcemapping (v0.49.0)—have been updated. These changes support our observability improvements; please verify they function well with our telemetry setup.
140-140: Incorporate latest CNCF XDS changes.
The dependencygithub.com/cncf/xds/gohas been updated tov0.0.0-20241223141626-cff3c89139a3, which appears to be a pre-release. Please check the overall stability and ensure it meets our production needs before wide-scale use.
159-159: Update EditorConfig Core library.
github.com/editorconfig/editorconfig-core-go/v2has been bumped to v2.6.3. This should refine our EditorConfig handling—confirm that everything parses correctly post-update.
162-163: Refresh Envoy-related dependencies.
The upgrades forgithub.com/envoyproxy/go-control-plane/envoy(v1.32.4) andgithub.com/envoyproxy/protoc-gen-validate(v1.2.1) are included. Ensure that any API modifications align with our current implementation.
175-175: Bump Mapstructure version.
The dependencygithub.com/go-viper/mapstructure/v2is now v2.2.1. This update should improve data mapping functionality—please run tests to be certain of a smooth transition.
185-185: Update Google S2A library.
github.com/google/s2a-gohas been updated to v0.1.9. Validate that any security or performance improvements are effective as intended within our context.
187-187: Refresh Enterprise Certificate Proxy.
The dependencygithub.com/googleapis/enterprise-certificate-proxyhas been updated to v0.3.5. Please ensure that our certificate-based workflows continue to operate correctly.
269-269: Update Locafero dependency.
github.com/sagikazarmark/locaferonow stands at v0.7.0. Double-check that any filesystem abstractions or related functionalities remain unaffected by this update.
275-276: Bump Afero and Cast libraries.
The updates forgithub.com/spf13/afero(v1.12.0) andgithub.com/spf13/cast(v1.7.1) should enhance file operations and type conversion utilities. Ensure our tests pass with these revisions.
296-297: Upgrade opentelemetry instrumentation.
The updates togo.opentelemetry.io/contrib/detectors/gcp(v1.34.0) andgo.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc(v0.59.0) are key for observability. Please run thorough tests to check for any instrumentation-related issues.
302-302: Refresh opentelemetry SDK Metric component.
go.opentelemetry.io/otel/sdk/metricis now v1.34.0. This update could impact metric export behavior; checking the performance and correctness of our metric routines is advisable.
309-309: Update x/crypto dependency.
golang.org/x/cryptohas been updated to v0.36.0. This is important for security, so please verify our cryptographic routines against any API changes.
312-312: Bump x/net library.
The update togolang.org/x/netnow at v0.37.0 might introduce subtle changes in networking utilities. A review of network-related tests is suggested.
315-315: Refresh x/time library.
golang.org/x/timehas been updated to v0.11.0. This change should be safe, but please check any time-sensitive logic for correctness.
317-317: Upgrade x/xerrors.
The dependencygolang.org/x/xerrorsis now at v0.0.0-20231012003039-104605ab7028, which can affect error wrapping and formatting. Ensure that error handling remains robust.
318-321: Update Genproto and Protobuf packages.
The changes togoogle.golang.org/genproto,googleapis/api,googleapis/rpc, andgoogle.golang.org/protobuf(with the latter updated to v1.36.5) are aimed at improving RPC and serialization support. Please run end-to-end tests for any potential impact on our gRPC communications.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
tests/README.md (1)
55-55: Improve Documentation Clarity: Add Missing CommaIt’s a minor nitpick but consider adding a comma after "snapshots" in the sentence. This will improve readability and align with conventional punctuation. For example:
-To regenerate ALL snapshots pass the `-regenerate-snapshots` flag. +To regenerate ALL snapshots, pass the `-regenerate-snapshots` flag.🧰 Tools
🪛 LanguageTool
[uncategorized] ~55-~55: Possible missing comma found.
Context: ...directory ### Flags To regenerate ALL snapshots pass the-regenerate-snapshotsflag. ...(AI_HYDRA_LEO_MISSING_COMMA)
tests/snapshots/TestCLICommands_atmos_terraform_--help.stdout.golden (1)
109-109: Consider using HTML entities for angle brackets in examples.Based on previous feedback, angle brackets in command examples should use HTML entities (e.g.,
<component-name>instead of<component-name>). This isn't related to your current changes but would improve consistency.- $ atmos terraform [subcommand] <component-name> -s <stack-name> + $ atmos terraform [subcommand] <component-name> -s <stack-name>
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
tests/README.md(1 hunks)tests/snapshots/TestCLICommands_Valid_Log_Level_in_Command_Line_Flag.stdout.golden(1 hunks)tests/snapshots/TestCLICommands_Valid_Log_Level_in_Config_File.stdout.golden(1 hunks)tests/snapshots/TestCLICommands_Valid_Log_Level_in_Environment_Variable.stdout.golden(1 hunks)tests/snapshots/TestCLICommands_Valid_log_level_in_flag_should_be_priortized_over_env_and_config.stdout.golden(1 hunks)tests/snapshots/TestCLICommands_atmos_terraform_--help.stdout.golden(1 hunks)tests/snapshots/TestCLICommands_atmos_terraform_--help_alias_subcommand_check.stdout.golden(1 hunks)tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden(1 hunks)tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden(1 hunks)tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden(1 hunks)
✅ Files skipped from review due to trivial changes (4)
- tests/snapshots/TestCLICommands_Valid_Log_Level_in_Command_Line_Flag.stdout.golden
- tests/snapshots/TestCLICommands_Valid_log_level_in_flag_should_be_priortized_over_env_and_config.stdout.golden
- tests/snapshots/TestCLICommands_Valid_Log_Level_in_Config_File.stdout.golden
- tests/snapshots/TestCLICommands_Valid_Log_Level_in_Environment_Variable.stdout.golden
🧰 Additional context used
🧠 Learnings (5)
tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden (1)
Learnt from: samtholiya
PR: cloudposse/atmos#1068
File: tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden:0-0
Timestamp: 2025-03-18T00:20:29.425Z
Learning: Backtick formatting should only be applied to flag descriptions in Go source files, not in golden test files (test snapshots) as they are meant to capture the raw command output.
tests/snapshots/TestCLICommands_atmos_terraform_--help.stdout.golden (2)
Learnt from: samtholiya
PR: cloudposse/atmos#1068
File: tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden:0-0
Timestamp: 2025-03-18T00:20:29.425Z
Learning: Backtick formatting should only be applied to flag descriptions in Go source files, not in golden test files (test snapshots) as they are meant to capture the raw command output.
Learnt from: samtholiya
PR: cloudposse/atmos#1068
File: tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden:59-64
Timestamp: 2025-03-18T00:20:29.426Z
Learning: For Atmos CLI help text, angle brackets in command examples and flag descriptions should be escaped using HTML entities (e.g., `<component>`) rather than converted to backticks or other markdown formatting.
tests/snapshots/TestCLICommands_atmos_terraform_--help_alias_subcommand_check.stdout.golden (2)
Learnt from: samtholiya
PR: cloudposse/atmos#1068
File: tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden:0-0
Timestamp: 2025-03-18T00:20:29.425Z
Learning: Backtick formatting should only be applied to flag descriptions in Go source files, not in golden test files (test snapshots) as they are meant to capture the raw command output.
Learnt from: samtholiya
PR: cloudposse/atmos#1068
File: tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden:59-64
Timestamp: 2025-03-18T00:20:29.426Z
Learning: For Atmos CLI help text, angle brackets in command examples and flag descriptions should be escaped using HTML entities (e.g., `<component>`) rather than converted to backticks or other markdown formatting.
tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden (1)
Learnt from: samtholiya
PR: cloudposse/atmos#1068
File: tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden:0-0
Timestamp: 2025-03-18T00:20:29.425Z
Learning: Backtick formatting should only be applied to flag descriptions in Go source files, not in golden test files (test snapshots) as they are meant to capture the raw command output.
tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden (1)
Learnt from: samtholiya
PR: cloudposse/atmos#1068
File: tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden:0-0
Timestamp: 2025-03-18T00:20:29.425Z
Learning: Backtick formatting should only be applied to flag descriptions in Go source files, not in golden test files (test snapshots) as they are meant to capture the raw command output.
🪛 LanguageTool
tests/README.md
[uncategorized] ~55-~55: Possible missing comma found.
Context: ...directory ### Flags To regenerate ALL snapshots pass the -regenerate-snapshots flag. ...
(AI_HYDRA_LEO_MISSING_COMMA)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Summary
- GitHub Check: Build (windows-latest, windows)
🔇 Additional comments (10)
tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden (3)
39-46: Well-structured flag documentation for template processing controls.These new flags allow users to control Go template and YAML function processing in Atmos stack manifests, which aligns perfectly with the PR objectives. The descriptions clearly communicate their purpose and default values.
52-55: Good addition of the function-skipping capability.The
--skipflag provides granular control over which YAML functions to skip during execution, enhancing flexibility for users. The default empty array is sensible as it preserves current behavior by default.
56-58: Improved clarity in skip-init description.The description now specifically mentions "executing terraform commands" instead of the more generic "executing the command", providing better context for users.
tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden (2)
62-73: Consistent flag documentation across command help outputs.The flags added here match those in the apply help output, maintaining consistency across the CLI documentation. Clear descriptions with default values help users understand the available options.
74-76: Consistent improvement to skip-init description.The description update matches the change made in the apply help output, maintaining consistency across the documentation.
tests/snapshots/TestCLICommands_atmos_terraform_--help_alias_subcommand_check.stdout.golden (2)
67-78: Maintained consistency in flag documentation.The flag documentation is consistent with other help outputs, providing users with the same clear information regardless of how they access the help.
79-81: Consistent skip-init description update.The description improvement for the skip-init flag matches the changes made in other help outputs.
tests/snapshots/TestCLICommands_atmos_terraform_apply_help.stdout.golden (2)
39-46: Consistent flag documentation across help variants.The documentation for the new processing control flags is consistent with other help outputs, maintaining uniformity across the CLI interface.
52-58: Consistent documentation for skip flags.Both the new
--skipfunctionality and the improved--skip-initdescription match the documentation in other help outputs, ensuring users receive consistent information.tests/snapshots/TestCLICommands_atmos_terraform_--help.stdout.golden (1)
62-73: The added CLI flags enhance user control over manifest processing.The new flags provide useful control for processing YAML functions, templates, and skipping specific functions. Each flag has a clear description and default value.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1157 +/- ##
==========================================
+ Coverage 21.64% 24.35% +2.70%
==========================================
Files 172 176 +4
Lines 19292 20181 +889
==========================================
+ Hits 4176 4915 +739
- Misses 14336 14462 +126
- Partials 780 804 +24
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
💥 This pull request now has conflicts. Could you fix it @aknysh? 🙏 |
# Conflicts: # cmd/terraform.go
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
cmd/terraform.go(1 hunks)cmd/terraform_commands.go(1 hunks)internal/exec/terraform.go(1 hunks)tests/snapshots/TestCLICommands_atmos_terraform_--help.stdout.golden(1 hunks)tests/snapshots/TestCLICommands_atmos_terraform_--help_alias_subcommand_check.stdout.golden(1 hunks)tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden(1 hunks)website/docs/cli/commands/terraform/usage.mdx(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
- internal/exec/terraform.go
- tests/snapshots/TestCLICommands_atmos_terraform_--help.stdout.golden
- cmd/terraform_commands.go
🧰 Additional context used
🧠 Learnings (2)
tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden (1)
Learnt from: samtholiya
PR: cloudposse/atmos#1068
File: tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden:0-0
Timestamp: 2025-03-19T20:50:42.838Z
Learning: Backtick formatting should only be applied to flag descriptions in Go source files, not in golden test files (test snapshots) as they are meant to capture the raw command output.
tests/snapshots/TestCLICommands_atmos_terraform_--help_alias_subcommand_check.stdout.golden (2)
Learnt from: samtholiya
PR: cloudposse/atmos#1068
File: tests/snapshots/TestCLICommands_atmos_terraform_apply_--help.stdout.golden:0-0
Timestamp: 2025-03-19T20:50:42.838Z
Learning: Backtick formatting should only be applied to flag descriptions in Go source files, not in golden test files (test snapshots) as they are meant to capture the raw command output.
Learnt from: samtholiya
PR: cloudposse/atmos#1068
File: tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden:59-64
Timestamp: 2025-03-19T20:50:42.839Z
Learning: For Atmos CLI help text, angle brackets in command examples and flag descriptions should be escaped using HTML entities (e.g., `<component>`) rather than converted to backticks or other markdown formatting.
🪛 golangci-lint (1.64.8)
cmd/terraform.go
[error] 88-88: ineffectual assignment to err
(ineffassign)
🪛 GitHub Check: golangci-lint
cmd/terraform.go
[failure] 88-88:
ineffectual assignment to err
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: Acceptance Tests (macos-latest, macos)
- GitHub Check: Acceptance Tests (windows-latest, windows)
- GitHub Check: Acceptance Tests (ubuntu-latest, linux)
- GitHub Check: [localstack] demo-localstack
- GitHub Check: Summary
🔇 Additional comments (8)
tests/snapshots/TestCLICommands_atmos_terraform_--help_alias_subcommand_check.stdout.golden (2)
68-79: New flags added, good implementation.The addition of these three new flags (
--process-functions,--process-templates, and--skip) aligns perfectly with the PR objectives. The descriptions are clear and inform users about their default values.
80-82: Improved description for--skip-initflag.The updated description makes it clearer that this flag skips running
terraform initspecifically before executing terraform commands, rather than just skipping initialization in general.cmd/terraform.go (1)
67-87: Implementation of new flags looks good.The approach for retrieving and processing the new flags is clean and consistent with error handling patterns used elsewhere in the codebase.
tests/snapshots/TestCLICommands_atmos_terraform_help.stdout.golden (2)
63-74: New CLI flags added correctly.The implementation of the three new flags (
--process-functions,--process-templates, and--skip) is consistent with the format of other flags in the help text. The descriptions clearly explain the purpose and default values of each flag.
75-77: Updated description for--skip-initflag.The clarified description for the
--skip-initflag improves user understanding of its purpose.website/docs/cli/commands/terraform/usage.mdx (3)
143-148: Changed arguments section to definition list format.Good conversion to definition list format as requested in previous review.
152-180: Improved flags section with definition list format.The conversion to definition list format improves readability and consistency. The use of proper shell code blocks and organization of flag descriptions makes this documentation clearer for users.
181-223: New flags well-documented with examples.The documentation for the new flags (
--skip-init,--process-templates,--process-functions, and--skip) is comprehensive and includes helpful examples showing how to use each flag. The explanation of default behaviors is particularly useful.
what
atmos terraformcommands to control processing (enable/disable) the templates and YAML functions in Atmos stack manifestswhy
--process-templateswhen executing terraform commands.
atmos terraform plan <component> -s <stack> --process-templates=false.If the flag is not passed,
template procesing is enabled by default.
--process-functionswhen executing terraform commands.
atmos terraform apply <component> -s <stack> --process-functions=falseIf the flag is not passed,
functions procesing is enabled by default.
--skipin Atmos stacks manifests when executing terraform commands.
To specify more than one function,
use multiple
--skipflags, or separate the functions with a comma:atmos terraform plan <component> -s <stack> --skip=eval --skip=includeatmos terraform apply <component> -s <stack> --skip=terraform.output,includeSummary by CodeRabbit
Summary by CodeRabbit
New Features
Documentation
Chores