Gallery
  • Introduction to Gallery
  • Getting Started
    • Link Your Cloud Provider
    • Create a Template
    • Build an Environment
  • Cloud Integrations
    • AWS
    • GCP
    • Other Cloud Providers
  • Gallery CLI
    • Setup
      • Installation
      • Authentication
  • Build System
    • Overview
    • Project Builds
      • Build Jobs
      • Build Stages
      • .gallery-deploy.yml Docs
    • Terraform
      • Variables
      • Mapping URLs/Configs
      • Using Cached Services
  • Cached Services
    • Overview
    • Defining Cached Services
  • Examples
    • Flask Elastic Beanstalk Quickstart
  • Resources
    • Environments
      • Managing your Environments
      • Environment Teardown
      • Environment Settings
Powered by GitBook
On this page
  • Connecting a Cached Service
  • Using Your Cached Service in Terraform

Was this helpful?

  1. Build System
  2. Terraform

Using Cached Services

PreviousMapping URLs/ConfigsNextOverview

Last updated 3 years ago

Was this helpful?

Connecting a Cached Service

Before you adjust your terraform services to use a cached service, you'll first want to connect the cached service to your template with Gallery. To do this, go to the cached services tab, and click "Link Cached Service."

Using Your Cached Service in Terraform

When you link a cached service with Gallery, we add a terraform_remote_state data source to connect the cached service with your template. Therefore, if you have a cached service named db_service and you'd like to access the db_name output, you would need to access the data.terraform_remote_state.db_service.outputs.db_name selector from within your template terraform.