Skip to content

EnvVar storage provider

storage_providers:
  git-storage: # Initialize new storage provider - name can be anything
    type: git # In this case we use `git` storage provider
    origin_url: git@github.com:IamShobe/tf-state.git

  envvar-example: # Initialize new storage provider - name can be anything
    type: envvar # In this case we use `envvar` storage provider

transformers:
  encryption: # Initialize new transformer - Name can be anything, we use `encryption` for semantics.
    type: encryption # In this case we use `encryption` transformer
    key_type: age # We use `age` as the encryption provider
    import_from_storage:
      provider: envvar-example # Make sure name is matching your storage provider
      params:
        key: AGE_KEY # The environment variable name to use for the encryption key

stacks:
  my-stack: # Initialize new stack - Name can be anything
    transformers: # List of transformers to use in this specific stack
      - encryption # Make sure name is matching your transformer
    state_storage: # Terraform state storage configuration
      provider: git-storage # In this case we use our git storage provider
      params:
        path: terraform.tfstate # The path to the state file inside our repository