The AWS Glue documentation says:
To create a new database, choose Add database and provide a name and description. For compatibility with other metadata stores, such as Apache Hive, the name is folded to lowercase characters.
https://docs.aws.amazon.com/glue/latest/dg/console-databases.html
This means that, if there are uppercase letters in the database name, Terraform will always try to re-apply the changes because AWS automatically lower-cased the name specified in Terraform. In other words, the example in https://www.terraform.io/docs/providers/aws/r/glue_catalog_table.html won't ever converge.
It would also be nice if Terraform raised an error if the DB name wasn't lowercase-only.
I'd like to contribute to this, is there any concensus on the best way to handle this?
I think throwing an error is the simplest solution, but it could also be handled behind the scenes to always assume lowercase and check the lower case value of the name provided prior to determining if a change is needed.
I'm not from Terraform's team, but as an user, I'd rather have Terraform throw an error and ask me to fix it than do so automatically. Explicit is better than implict.
This has been released in version 3.14.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.
For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!
Most helpful comment
I'm not from Terraform's team, but as an user, I'd rather have Terraform throw an error and ask me to fix it than do so automatically. Explicit is better than implict.