I’m deploying frontend application hosted by AWS S3 bucket using aws_s3_object
resource. When I add some changes for the application, I always see numerous plan of changed aws_s3_object
resources (over 100) so I cannot see any other important resource changes. In this case, it is enough to know the frontend bundle’s hash has changed and needs to be deployed again.
I have some ideas, but both of them are not so good.
1. terrafrom_data
resource
Uploads files using AWS CLI. aws s3 sync
is promising, but it has a problem it cannot set object metadata for each file.
2. Custom provider
This is a bit overwhelming for this simple requirement. Additionally, it requires users to configure the provider in the same way as AWS Provider.
Do you have any good ideas for this situation?