Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Conversation

@jem-davies
Copy link
Contributor

@jem-davies jem-davies commented Mar 5, 2025

I was following the guide on terraform files as init hooks with the docker-compose.yaml:

version: "3.8"

services:
  localstack:
    container_name: "localstack-main"
    image: localstack/localstack-pro  # required for Pro
    ports:
      - "127.0.0.1:4566:4566"            # LocalStack Gateway
    environment:
# Activate LocalStack Pro: https://docs.localstack.cloud/getting-started/auth-token/
      - LOCALSTACK_AUTH_TOKEN=${LOCALSTACK_AUTH_TOKEN:?}
      - EXTENSION_AUTO_LOAD=localstack-extension-terraform-init
    volumes:
# you could also place your main.tf in `./ready.d` and set "./ready.d:/etc/localstack/init/ready.d"
      - "./main.tf:/etc/localstack/init/ready.d/main.tf"
      - "./volume:/var/lib/localstack"
      - "/var/run/docker.sock:/var/run/docker.sock"

But in the container logs I was seeing:

localstack-main  | 2025-03-05T15:55:22.366  INFO --- [  MainThread] l.p.c.extensions.platform  : loaded 0 extensions

Then I saw on Automating extensions installation that there was an env var EXTENSION_AUTO_INSTALL which then installed and applied my tf config.

Should this be changed?

I noticed that in the description above the config on Terraform Files as Init Hooks it mentions EXTENSION_AUTO_INSTALL but then in the example config it has EXTENSION_AUTO_LOAD which presumably will only work if the extension has been installed previously?

@github-actions
Copy link

github-actions bot commented Mar 5, 2025

⚡️ Deploying PR Preview...

@jem-davies jem-davies changed the title EXTENSION_AUTO_LOAD doesn't seem to work EXTENSION_AUTO_LOAD should be changed to EXTENSION_AUTO_INSTALL Mar 5, 2025
@dfangl
Copy link
Member

dfangl commented Mar 5, 2025

Thank you for your PR! You are right, the docker compose file is incorrect there.

@dfangl dfangl merged commit 36f255f into localstack:main Mar 5, 2025
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants