cloudposse / cloudposse/github-action-atmos-get-setting

terraform.output functions can not be skipped

Open
#64 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
5
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Found a bug? Maybe our [Slack Community](https://cloudposse.com/slack) can help.

[![Slack Community](https://slack.cloudposse.com/for-the-badge.svg)](https://cloudposse.com/slack)

## Describe the Bug
Currently, the action has an option to to `process-templates: 'false'` which disable yaml functions in atmos, but it does not allow a user to disable `terraform.output` functions; this is particularly important because this action is used in basically all the atmos actions to get the terraform version and other setting.

as can be seen here:
https://github.com/cloudposse/github-action-atmos-terraform-plan/blob/v4.3.0/action.yml#L94

That step needs to run before Terraform is installed because it is required to find the version value.

Currently, the action runs:

```
atmos describe component keyvault -s dev-wus3 --format=json --process-templates=false
```

and should allow for :

```
atmos describe component keyvault -s dev-wus3 --format=json --process-templates=false --skip=terraform.output
```

## Expected Behavior

## Steps to Reproduce
Add a workflow step as follow :
```
- name: Get atmos settings
id: atmos-settings
uses: cloudposse/github-action-atmos-get-setting@v2
env:
ARM_CLIENT_ID: "xxxxxxxxxx0"
ARM_SUBSCRIPTION_ID: "xxxxxxxx"
ARM_TENANT_ID: "xxxxxxx"
AZURE_USE_OIDC: true
ATMOS_LOGS_FILE: "/dev/null"
ATMOS_LOGS_LEVEL: "Trace"
with:
# Here, we do not process templates because that requires terraform. Which we install after fetching the version
# Processing templates here can cause an issue where cached terraform versions conflict with the version we want to install
process-templates: "false"
settings: |
- component: keyvault
stack: dev-wus3
settingsPath: settings.integrations.github.gitops.terraform-version
outputPath: terraform-version
```
## Screenshots
If applicable, add screenshots or logs to help explain your problem.

## Environment (please complete the following information):

Anything that will help us triage the bug will help. Here are some ideas:
- Github actions

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.