terraform-provider-iterative icon indicating copy to clipboard operation
terraform-provider-iterative copied to clipboard

Unexpected folder naming when providing s3 bucket as storage container

Open LahiLuk opened this issue 2 years ago • 2 comments

I'm not entirely sure if this is a bug or a feature, but it would be good to know in order to be able to automate actions based on the expected output.

I'm using TPI and passing an AWS s3 bucket as the storage container, i.e.

storage {
    workdir = "src"
    container = "my-s3-bucket"
  }

Since I haven't specified any folder inside the bucket, I would expect that a folder with the task ID will be created, e.g., tpi-basically-fit-oryx-xjezxu77-5eudru0h. However, what happens is that a folder named just xjezxu775eudru0h is created, which is in contrast to all the other resources being named following the full task ID. Is this expected behavior?

LahiLuk avatar Jul 03 '23 16:07 LahiLuk

@tasdomas do you have availability to take a look?

dacbd avatar Jul 06 '23 22:07 dacbd

Hello, @LahiLuk!

Probably long identifiers would be more adequate than short identifiers in this case. Unfortunately, when writing #687, user experience wasn't our topmost priority.

Feel free to open a pull request replacing .Short() with .Long() in all these places:

https://github.com/iterative/terraform-provider-iterative/blob/a0fb6be03344ed2d4887468efa64abe3fcce4634/task/aws/task.go#L57-L59

https://github.com/iterative/terraform-provider-iterative/blob/a0fb6be03344ed2d4887468efa64abe3fcce4634/task/az/task.go#L47-L49

https://github.com/iterative/terraform-provider-iterative/blob/a0fb6be03344ed2d4887468efa64abe3fcce4634/task/gcp/task.go#L48-L50

0x2b3bfa0 avatar Aug 24 '23 13:08 0x2b3bfa0