mantil-io / mantil

Build your AWS Lambda-based Go backends quicker than ever
https://www.mantil.com
MIT License
110 stars 3 forks source link

Terraform apply fails due to long name prefixes #53

Closed djelusic closed 2 years ago

djelusic commented 2 years ago

One example is when trying to create buckets for public sites:

TF: Error: expected length of bucket_prefix to be in the range (0 - 37), got mantil-public-cool-project-production-ping-
ianic commented 2 years ago

Related to #39

IvanVlasic commented 2 years ago

I’ve removed bucket_prefix’ from public site bucket. Workspace uid is used instead of generating suffix randomly through terraform.

Since Daniel moved all public sites to one bucket, it’s name is now ‘mantil-public-{project}-{stage}-{workspace uid}’.

I think we should avoid all namings created through terraform since they have their own limits separate from names of resources, like bucket prefix limit of 37 characters in this case which would leave very little space for project and stage names and it’s hard to keep track of various different limits.

This was the only case where such naming was used so I don’t think this issue is necessary anymore since it will be fixed through #39 once we limit all names to 64 characters.