From b060c125b97145454347ad3611c30780cb9029c1 Mon Sep 17 00:00:00 2001 From: Vitalii Savitskii Date: Mon, 12 Aug 2024 18:06:49 +0200 Subject: [PATCH] fix: use the id property instead of name for read ilm tier (#579) Also, replace `docker-compose` with `docker compose` (This is needed due to a change in Docker Compose CLI). Co-authored-by: Victor Nogueira --- .github/workflows/go.yml | 4 ++-- README.md | 2 +- minio/resource_minio_ilm_tier.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 63d75888..d071c428 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -34,8 +34,8 @@ jobs: with: version: "2023.1.6" install-go: false - - name: Build the docker-compose stack - run: docker-compose up -d minio secondminio thirdminio fourthminio + - name: Build the Docker Compose stack + run: docker compose up -d minio secondminio thirdminio fourthminio - uses: hashicorp/setup-terraform@v2 with: terraform_version: 1.5.7 diff --git a/README.md b/README.md index 94f693a5..01530a19 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ variable "minio_password" { For testing locally, run the docker compose to spin up a minio server: ```sh -docker-compose up +docker compose up ``` Access `http://localhost:8000` on your browser, apply your terraform templates and watch them going live. diff --git a/minio/resource_minio_ilm_tier.go b/minio/resource_minio_ilm_tier.go index 173f1820..9aa81aac 100644 --- a/minio/resource_minio_ilm_tier.go +++ b/minio/resource_minio_ilm_tier.go @@ -270,7 +270,7 @@ func minioCreateILMTier(ctx context.Context, d *schema.ResourceData, meta interf func minioReadILMTier(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { c := meta.(*S3MinioClient).S3Admin - name := d.Get("name").(string) + name := d.Id() tier, err := getTier(c, ctx, name) if err != nil { return NewResourceError("reading remote tier failed", name, err)