Passed the value of the Hosted Zone variable into the Terraform commands in the Actions Workflow; broke the commands up into mulitple lines to make them cleaner and more readable.
Removed the test bucket from the Terraform codebase for cleanup.
Adjusted the unique string prefix so that it generates the same unique string every time rather than trying to re-create the bucket because the timestamp is different with each passing second.
Deleted the ACL because we don't actually need it since we're using a CDN for public requests.
Deleted the redundant bucket policy.
Added a DNS record resource for the subdomain since it is coupled with the app anyway.
Added outputs for access identity ARN although they are probably not necessary other than for troubleshooting.
Moved policies to their own file for cleanup and better organization/readability.
Added new variables required for the DNS record resource
Added variables for AWS credentials just to make the output of Terraform commands shut up.
Checklist
[x] PR Name: Please name this PR in format of
[TICKET_ID]: [BRIEF DESCRIPTION]. For example: MONO-0000: Implement
component X to use with Y
[ ] Ticket(s) and Related PR(s): Add the tickets that this PR will resolve
once merge. You can also add a list of related PR(s); this is useful when
to communicate that another PR must be reviewed first.
[ ] Change Description: Please update the above change list to provide a
list of changes done. This will be added to the commit when merged for a
useful commit description.
This can be omitted in the rare case that the PR is very small and the title
alone clearly explains what it does.
[ ] Tests: All code should have strong tests. If you have questions about
this please ask one of the code owners. All tests need to pass CI for all
test matrix combinations for your PR to be considered for merge.
[ ] Code Owner Review: Please add at least one repository code owner as a
reviewer. You are welcome to add anyone else you'd like feedback from.
[ ] Squash Commit with Details: It's hard to keep a perfect commit record
so we prefer squash commits. When doing squash commits the commit name
should auto fill the the PR name (formatted as defined in the PR Name
section above) plus (#123) where the number is the PR number. Set the
commit paragraph text to be the changes list above (don't include
"Changes" header, just the list).
Ticket(s)
Related PR(s)
Changes
Checklist
[TICKET_ID]: [BRIEF DESCRIPTION]
. For example: MONO-0000: Implement component X to use with Y(#123)
where the number is the PR number. Set the commit paragraph text to be the changes list above (don't include "Changes" header, just the list).