terraform-provider-iterative
terraform-provider-iterative copied to clipboard
Unexpected folder naming when providing s3 bucket as storage container
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?
@tasdomas do you have availability to take a look?
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