-
Notifications
You must be signed in to change notification settings - Fork 59
/
compose.yaml
51 lines (48 loc) · 1.61 KB
/
compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
services:
tfmigrate:
build:
context: .
args:
TERRAFORM_VERSION: ${TERRAFORM_VERSION:-latest}
OPENTOFU_VERSION: ${OPENTOFU_VERSION:-latest}
volumes:
- ".:/work"
environment:
CGO_ENABLED: 0 # disable cgo for go test
LOCALSTACK_ENDPOINT: "http://localstack:4566"
STORAGE_EMULATOR_HOST: "fake-gcs-server:4443"
# Use the same filesystem to avoid a checksum mismatch error
# or a file busy error caused by asynchronous IO.
TF_PLUGIN_CACHE_DIR: "/tmp/plugin-cache"
TF_PLUGIN_CACHE_MAY_BREAK_DEPENDENCY_LOCK_FILE: "true"
# From observation, although we don’t have complete confidence in the root cause,
# it appears that localstack sometimes misses API requests when run in parallel.
TF_CLI_ARGS_apply: "--parallelism=1"
TERRAFORM_VERSION: ${TERRAFORM_VERSION:-latest}
OPENTOFU_VERSION: ${OPENTOFU_VERSION:-latest}
TFMIGRATE_EXEC_PATH:
depends_on:
- localstack
- fake-gcs-server
localstack:
image: localstack/localstack:2.0.2
ports:
- "4566:4566"
environment:
DEBUG: "true"
DEFAULT_REGION: "ap-northeast-1"
S3_BUCKET: "tfstate-test"
volumes:
- "./scripts/localstack/init:/etc/localstack/init" # initialize scripts on startup
fake-gcs-server:
image: fsouza/fake-gcs-server:1.38
ports:
- "4443:4443"
volumes:
- "./test-fixtures/fake-gcs-server:/data"
command: ["-scheme", "http", "-public-host", "fake-gcs-server:4443"]
dockerize:
image: powerman/dockerize:0.16.3
depends_on:
- localstack
- fake-gcs-server