#atmos - June 2025

14 messages

👽️

Tobias Habermann
Tobias Habermannover 1 year ago
I changed my atmos config from name_pattern to name_template, but it doesn't seem to work with the Atlantis Integration yet?
 Error

stack name pattern must be provided in 'stacks.name_pattern' config or 'ATMOS_STACKS_NAME_PATTERN' ENV variable
Dan Hansen
Dan Hansenover 1 year ago
I used to be able to write !terraform.output component stack yq_expression["index"] but now get FATA parse error on line 1, column 68: bare " in non-quoted-field after upgrading to v1.179.0. I've tried a variety of ways of escaping but none seem to work.
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 1 year ago
@Igor Rodionov can you please delete these release announcements when you are testing?
Aaron
Aaronover 1 year ago(edited)
I am brand new to Atmos and I'm trying to customize my backend state storage key. I thought to use templates to do this, but it doesn't seem to be working. Am I doing something wrong? Or misunderstanding how templates work?

staging.yml
terraform:
  backend_type: azurerm
  backend:
    azurerm:
      storage_account_name: foo
      subscription_id: foo
      tenant_id: foo
      container_name: tfstate
      use_azuread_auth: true
      resource_group_name: foo
      key: "{{ .vars.client_code }}/{{ .vars.client_code }}-{{ .vars.product_code }}-{{ .vars.environment }}-{{ .vars.location_code }}"

This file is imported from the specific client folder in _defaults.yaml (I'm following roughly the "component inheritance" design pattern):

import:
  - mixins/tenant/staging

However, end result via atmos describe component is that the values don't get replaced.
        key:
            final_value: '{{ .vars.client_code }}/{{ .vars.client_code }}-{{ .vars.product_code }}-{{ .vars.environment }}-{{ .vars.location_code }}/customer-init.terraform.tfstate'
            name: key
            stack_dependencies:
                - dependency_type: import
                  stack_file: mixins/tenant/staging
                  stack_file_section: terraform.backend.azurerm
                  variable_value: '{{ .vars.client_code }}/{{ .vars.client_code }}-{{ .vars.product_code }}-{{ .vars.environment }}-{{ .vars.location_code }}'

I know that the .vars.* I'm referencing exists in atmos because in my atmos.yaml I have the following that does get replaced correctly:

  name_template: "{{.vars.client_code}}-{{.vars.product_code}}-{{.vars.environment}}-{{.vars.location_code}}"

Edit: to clarify, I'm trying to accomplish something similar to what we previously did with key = "${path_relative_to_include()}/terraform.tfstate" in Terragrunt.
Joe Bell
Joe Bellover 1 year ago
Hey all, getting used to atmos but trying to get over a major hurdle, I want to be able to define one file that is reused by multiple stacks, and I was assuming I could use the !env yaml function to do this, I have a pretty simple configuration:

import:
  - deploy/aws/customer/test/_defaults
  - mixins/customer/_us-customer

vars:
  environment: us
  customer_id: !env CUSTOMER_ID

But I get this error (slightly redacted):
Could not find the component 'customer_test' in the stack 'aws_us_ABC123'.

when running
CUSTOMER_ID=ABC123 atmos tf plan customer_test -s aws_us_$CUSTOMER_ID

If I run
CUSTOMER_ID=ABC123 atmos describe stacks -s aws_us_$CUSTOMER_ID

I just get a blank object {}

I have narrowed this down to the use of the !env function, since if I replace the !env function with hard coded values, it works fine.

I have been trying to debug it but not getting a ton of helpful information. Any help is appreciated! thanks
Cristian
Cristianover 1 year ago(edited)
Hi all,

I am trying to run some workflows with atmos. However, I am getting this error:
Error: Failed to load plugin schemas
│ 
│ Error while loading schemas for plugin components: 7 problems:
│ 
│ - Failed to obtain provider schema: Could not load the schema for provider registry.opentofu.org/cloudposse/awsutils: failed to instantiate provider "registry.opentofu.org/cloudposse/awsutils" to obtain schema: unavailable provider "registry.opentofu.org/cloudposse/awsutils".
│ - Failed to obtain provider schema: Could not load the schema for provider registry.opentofu.org/cloudposse/utils: failed to instantiate provider "registry.opentofu.org/cloudposse/utils" to obtain schema: unavailable provider "registry.opentofu.org/cloudposse/utils".
│ - Failed to obtain provider schema: Could not load the schema for provider registry.opentofu.org/hashicorp/aws: failed to instantiate provider "registry.opentofu.org/hashicorp/aws" to obtain schema: unavailable provider "registry.opentofu.org/hashicorp/aws".
│ - Failed to obtain provider schema: Could not load the schema for provider registry.opentofu.org/hashicorp/helm: failed to instantiate provider "registry.opentofu.org/hashicorp/helm" to obtain schema: unavailable provider "registry.opentofu.org/hashicorp/helm".
│ - Failed to obtain provider schema: Could not load the schema for provider registry.opentofu.org/hashicorp/kubernetes: failed to instantiate provider "registry.opentofu.org/hashicorp/kubernetes" to obtain schema: unavailable provider "registry.opentofu.org/hashicorp/kubernetes".
│ - Failed to obtain provider schema: Could not load the schema for provider registry.opentofu.org/hashicorp/random: failed to instantiate provider "registry.opentofu.org/hashicorp/random" to obtain schema: unavailable provider "registry.opentofu.org/hashicorp/random".
│ - Failed to obtain provider schema: Could not load the schema for provider registry.opentofu.org/integrations/github: failed to instantiate provider "registry.opentofu.org/integrations/github" to obtain schema: unavailable provider "registry.opentofu.org/integrations/github"..

the commands that I am running are:

atmos terraform destroy eks/argocd -s plat-usw2-prod

atmos workflow delete/argocd --file argocd.yaml 

argocd.yaml

[...]
  delete/argocd:
    description: |
      This workflow deletes ArgoCD components in the correct order
    steps:
      - command: terraform destroy eks/argocd -s plat-usw2-prod
      - command: terraform destroy eks/argocd -s plat-usw2-staging
      - command: terraform destroy eks/argocd -s plat-usw2-dev

  delete/argocd-repos:
    description: |
      This workflow deletes ArgoCD repos
    steps:
      - command: terraform destroy argocd-deploy-prod -s core-gbl-auto
      - command: terraform destroy argocd-deploy-non-prod -s core-gbl-auto
Zack
Zackover 1 year ago
Sorry if this has been asked before - is there a recommended way to pass inputs and outputs between different stacks?
Aaron Salm
Aaron Salmover 1 year ago
I'm attempting to demo Atmos for my new company (I'm a terragrunt convert). I got a quick and dirty demo with local state working, and am now trying to move over to a remote s3 backend following this documentation. (My demo requires remote-state for passing outputs between stacks).

https://atmos.tools/quick-start/advanced/configure-terraform-backend/#terraform-s3-backend

I'm able to apply the module, following the instructions in the git repo to -force-copy etc after the s3 and dynamo are up. After I create the default s3 backend, whenever I try to apply another stack I get this error:

missing state name

Any ideas to get unblocked? This is probably just a silly omission on my end but I can't pin it down even though I've followed the docs closely.
toka
tokaover 1 year ago
I've run into
runtime: goroutine stack exceeds 1000000000-byte limit
fatal error: stack overflow
issue during atmos apply for the first time. Any advice how to go around that?
Igor M
Igor Mover 1 year ago
There seems to be an issue with OpenTofu 1.10.0 and Atmos, related to the UserAgent postfix that Atmos adds.
Is there a workaround for this?
Erik Osterman (Cloud Posse)
Erik Osterman (Cloud Posse)over 1 year ago
/github unsubscribe cloudposse/atmos releases
U
Unknown Userover 1 year ago
This channel will receive notifications from cloudposse/atmos for:
Zack
Zackover 1 year ago
😢 having a real hard time of a time using atmos to store SSM output using the hook if the output has templating characters in it {{ }}
Jonathan Rose
Jonathan Roseover 1 year ago
Trying to understand how to implement components hosted Cloud Posse Terraform Components. Do I add to the vendor manifest and download contents in src directory?