Skip to content

Commit 8feface

Browse files
authored
Merge branch 'main' into feature/dev-3131-add-pager-to-atmos-describe-config-command
2 parents f4ec621 + f26dfe1 commit 8feface

File tree

65 files changed

+3283
-327
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+3283
-327
lines changed

.github/workflows/test.yml

+31-3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ on:
1919

2020
env:
2121
TERRAFORM_VERSION: "1.9.7"
22+
OPEN_TOFU_VERSION: "1.9.1"
2223

2324
jobs:
2425
# ensure the code builds...
@@ -115,11 +116,18 @@ jobs:
115116
}
116117
echo "${{ github.workspace }}" >> $Env:GITHUB_PATH
117118
118-
- uses: hashicorp/setup-terraform@v3
119+
- name: Install Terraform
120+
uses: hashicorp/setup-terraform@v3
119121
with:
120122
terraform_version: ${{ env.TERRAFORM_VERSION }}
121123
terraform_wrapper: false
122124

125+
- name: Install OpenTofu
126+
uses: opentofu/setup-opentofu@v1
127+
with:
128+
tofu_version: ${{ env.OPEN_TOFU_VERSION }}
129+
tofu_wrapper: false
130+
123131
- name: Check atmos.exe integrity
124132
if: matrix.flavor.target == 'windows'
125133
shell: pwsh
@@ -242,11 +250,18 @@ jobs:
242250
- name: Check out code into the Go module directory
243251
uses: actions/checkout@v4
244252

245-
- uses: hashicorp/setup-terraform@v3
253+
- name: Install Terraform
254+
uses: hashicorp/setup-terraform@v3
246255
with:
247256
terraform_version: ${{ env.TERRAFORM_VERSION }}
248257
terraform_wrapper: false
249258

259+
- name: Install OpenTofu
260+
uses: opentofu/setup-opentofu@v1
261+
with:
262+
tofu_version: ${{ env.OPEN_TOFU_VERSION }}
263+
tofu_wrapper: false
264+
250265
- name: Run tests for ${{ matrix.demo-folder }}
251266
run: |
252267
cd examples/${{ matrix.demo-folder }}
@@ -370,11 +385,18 @@ jobs:
370385
run: |
371386
echo "${{ github.workspace }}" >> $Env:GITHUB_PATH
372387
373-
- uses: hashicorp/setup-terraform@v3
388+
- name: Install Terraform
389+
uses: hashicorp/setup-terraform@v3
374390
with:
375391
terraform_version: ${{ env.TERRAFORM_VERSION }}
376392
terraform_wrapper: false
377393

394+
- name: Install OpenTofu
395+
uses: opentofu/setup-opentofu@v1
396+
with:
397+
tofu_version: ${{ env.OPEN_TOFU_VERSION }}
398+
tofu_wrapper: false
399+
378400
- name: Run tests in ${{ matrix.demo-folder }} for ${{ matrix.flavor.target }}
379401
working-directory: ${{ matrix.demo-folder }}
380402
if: matrix.flavor.target == 'linux' || matrix.flavor.target == 'macos'
@@ -442,6 +464,12 @@ jobs:
442464
terraform_version: ${{ env.TERRAFORM_VERSION }}
443465
terraform_wrapper: false
444466

467+
- name: Install OpenTofu
468+
uses: opentofu/setup-opentofu@v1
469+
with:
470+
tofu_version: ${{ env.OPEN_TOFU_VERSION }}
471+
tofu_wrapper: false
472+
445473
- name: Lint examples/${{ matrix.demo-folder }}/components/terraform
446474
uses: reviewdog/action-tflint@v1
447475
with:

atmos.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,28 @@ settings:
383383
color: "${colors.muted}"
384384
italic: true
385385

386+
docs:
387+
generate:
388+
# Generate README in current working directory
389+
readme:
390+
base-dir: .
391+
input:
392+
- "./README.yaml"
393+
# To Do: template can be a remote URL/github, using this local for testing
394+
template: "https://raw.githubusercontent.com/cloudposse/.github/5a599e3b929f871f333cb9681a721d26b237d8de/README.md.gotmpl"
395+
# The final README
396+
output: "./README.md"
397+
terraform:
398+
source: src/
399+
enabled: false
400+
format: "markdown"
401+
show_providers: false
402+
show_inputs: true
403+
show_outputs: true
404+
sort_by: "name"
405+
hide_empty: false
406+
indent_level: 2
407+
386408
version:
387409
check:
388410
enabled: true

cmd/docs_generate.go

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package cmd
2+
3+
import (
4+
"github.com/spf13/cobra"
5+
6+
e "github.com/cloudposse/atmos/internal/exec"
7+
)
8+
9+
// docsGenerateCmd is the subcommand under docs that groups generation operations.
10+
var docsGenerateCmd = &cobra.Command{
11+
Use: "generate",
12+
Short: "Generate documentation artifacts",
13+
Long: `Generate documentation by merging YAML data sources and applying templates.
14+
Supports native terraform-docs injection.`,
15+
Example: `Generate the README.md in the current directory:
16+
atmos docs generate readme`,
17+
Args: cobra.ExactArgs(1),
18+
ValidArgs: []string{"readme"},
19+
RunE: func(cmd *cobra.Command, args []string) error {
20+
if len(args) != 1 {
21+
return ErrInvalidArguments
22+
}
23+
err := e.ExecuteDocsGenerateCmd(cmd, args)
24+
if err != nil {
25+
return err
26+
}
27+
return nil
28+
},
29+
}
30+
31+
func init() {
32+
docsCmd.AddCommand(docsGenerateCmd)
33+
}

examples/quick-start-advanced/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ARG GEODESIC_OS=debian
66
# https://atmos.tools/
77
# https://github.com/cloudposse/atmos
88
# https://github.com/cloudposse/atmos/releases
9-
ARG ATMOS_VERSION=1.173.0
9+
ARG ATMOS_VERSION=1.175.0
1010

1111
# Terraform: https://github.com/hashicorp/terraform/releases
1212
ARG TF_VERSION=1.5.7

go.mod

+34-29
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)