Skip to content

Commit

Permalink
Merge pull request #180 from minamijoyo/use-native-compose
Browse files Browse the repository at this point in the history
Use docker compose command instead of docker-compose
  • Loading branch information
minamijoyo authored Aug 5, 2024
2 parents ca06fcf + 99c1fd3 commit c7f8be0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: docker build
run: docker-compose build
run: docker compose build
- name: start localstack
run: |
docker-compose up -d localstack
docker-compose run --rm dockerize -wait tcp://localstack:4566 -timeout 60s
docker-compose exec -T localstack /etc/localstack/init/wait_s3_bucket_exists.sh
docker compose up -d localstack
docker compose run --rm dockerize -wait tcp://localstack:4566 -timeout 60s
docker compose exec -T localstack /etc/localstack/init/wait_s3_bucket_exists.sh
- name: terraform --version
run: docker-compose run --rm tfmigrate terraform --version
run: docker compose run --rm tfmigrate terraform --version
- name: testacc
run: docker-compose run --rm tfmigrate make testacc
run: docker compose run --rm tfmigrate make testacc
testacc_opentofu:
runs-on: ubuntu-latest
timeout-minutes: 20
Expand All @@ -73,13 +73,13 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: docker build
run: docker-compose build
run: docker compose build
- name: start localstack
run: |
docker-compose up -d localstack
docker-compose run --rm dockerize -wait tcp://localstack:4566 -timeout 60s
docker-compose exec -T localstack /etc/localstack/init/wait_s3_bucket_exists.sh
docker compose up -d localstack
docker compose run --rm dockerize -wait tcp://localstack:4566 -timeout 60s
docker compose exec -T localstack /etc/localstack/init/wait_s3_bucket_exists.sh
- name: tofu --version
run: docker-compose run --rm tfmigrate tofu --version
run: docker compose run --rm tfmigrate tofu --version
- name: testacc
run: docker-compose run --rm tfmigrate make testacc
run: docker compose run --rm tfmigrate make testacc
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ The minimum required version is OpenTofu v1.6 or higher.

As you know, terraform state operations are dangerous if you don't understand what you are actually doing. If I were you, I wouldn't use a new tool in production from the start. So, we recommend you to play an example sandbox environment first, which is safe to run terraform state command without any credentials. The sandbox environment mocks the AWS API with `localstack` and doesn't actually create any resources. So you can safely run the `tfmigrate` and `terraform` commands, and easily understand how the tfmigrate works.

Build a sandbox environment with docker-compose and run bash:
Build a sandbox environment with docker compose and run bash:

```
$ git clone https://github.com/minamijoyo/tfmigrate
$ cd tfmigrate/
$ docker-compose build
$ docker-compose run --rm tfmigrate /bin/bash
$ docker compose build
$ docker compose run --rm tfmigrate /bin/bash
```

In the sandbox environment, create and initialize a working directory from test fixtures:
Expand Down

0 comments on commit c7f8be0

Please sign in to comment.