FormidableLabs / terraform-aws-serverless

Infrastructure support for Serverless framework apps, done the right way
https://registry.terraform.io/modules/FormidableLabs/serverless/aws
MIT License
144 stars 19 forks source link

Upgrade to TF 12 #65

Closed kevinmstephens closed 4 years ago

kevinmstephens commented 4 years ago

Fixes #55

Run the automated 0.12upgrade terraform script in each module.

Testing: This is tested through the aws-lambda-serverless-reference app pointed at a local version of this branch. A plan shows no changes with the updated code.

If you already have these repos cloned it might be good in aws-lambda-serverless-reference to delete .terraform folder to make sure you have a clean local state.

Clone both repos, check out the TF 12 upgrade branches, and run tf init then plan.

git clone git@github.com:FormidableLabs/terraform-aws-serverless.git && \
cd terraform-aws-serverless && \
git checkout feat/terraform-12-upgrade && \
cd .. \
git clone git@github.com:FormidableLabs/aws-lambda-serverless-reference.git && \
cd aws-lambda-serverless-reference && \
git checkout feat/terraform-12-upgrade && \
tfenv install 0.12.18 && tfenv use 0.12.18 && \
STAGE=sandbox aws-vault exec FIRST.LAST --no-session -- \
yarn tf:service:init --reconfigure && \
STAGE=sandbox aws-vault exec FIRST.LAST --no-session -- \
yarn tf:service:plan
ryan-roemer commented 4 years ago

Same comment as in https://github.com/FormidableLabs/aws-lambda-serverless-reference/pull/56#issuecomment-569173458

Is the Terraform ecosystem ready to completely deprecate 0.11 such that we should move this project (which technically doesn't need 0.12) to 0.12?

kevinmstephens commented 4 years ago

Just some info on timelines. TF 0.12.0 was released May 22, 2019 so it's been out for 7 months.

If we think that we want to keep this as TF 11 for a while longer we could agree on a timeline to update to 12 and execute at that point, maybe 9 months or a year after TF 12 release?

My opinion is that as an OSS project we would do well to keep our projects caught up to major updates in our dependencies like TF 12. It makes them more pleasant to contribute to and makes our projects appear more current.

I also just checked and a TF 12 project can't consume this package as-is. Because of this we shouldn't expect to get many folks bringing this package into use on their new projects. This seems like a good enough reason to migrate now. Folks on TF 11 can still use the old version and if they really can't upgrade to TF 12 and they need changes they can fork our repo as needed.