Bringing Calm to Cloud Chaos: An Introduction to Spacelift Spaces

Поділитися
Вставка
  • Опубліковано 23 січ 2025

КОМЕНТАРІ • 2

  • @zachr93
    @zachr93 15 днів тому

    Can I reference the output of a stack that's in a different space using terraform remote state or is that only possible with dependencies? Like if I have a global space that needs to reference a vpc output from my prod space.

    • @spaceliftio
      @spaceliftio  14 днів тому

      You can access the output of a stack that's in a different space using stack dependencies (as you mentioned) - this is the recommended approach as it ensures proper execution order and state consistency.
      On the other hand, if you want to use the terraform remote state datasource, you can easily do that, too. What you'll need to do on the stack that shares the output is to enable the external state access option (this can be done in settings -> vendor), or if you are using our terraform provider to create Spacelift resources, you will need to enable it with "terraform_external_state_access = true" inside the stack resource.