fivexl / terraform-aws-sso-elevator

Slack bot to temporary assign AWS SSO Permission set to a user
https://registry.terraform.io/modules/fivexl/sso-elevator/aws/latest
Apache License 2.0
32 stars 2 forks source link

Terraform Cloud #75

Closed dash-aug closed 2 months ago

dash-aug commented 5 months ago

Module can't be used with terraform cloud as neither docker nor the correct python version are available. Perhaps shipping a zip file for each lambda might be a more portable option.

EreminAnton commented 5 months ago

Hi! Sorry that the response took so long, I somehow missed a notification. It sounds like a good idea, thanks! And we may want the same for our other project, CloudTrailToSlack. However, for now, I can't promise either if or when it will be implemented. I will keep you updated if there are any changes.

dash-aug commented 5 months ago

@EreminAnton No worries, I found a solution by deploying a custom TFC agent that has the python version required installed. However, others might not have the chance to do it this way.

The way i'd see this change happen is to bundle the source code at release time and then just commit it back to the repo and refactor the lambdas to refer to those .zip files created. YMMV, just thought I'd share this of the top of my head.

Andrey9kin commented 3 months ago

There is another problem with building zip files locally—at times; it fails to fetch deps if the Python version requirements aren't met and give no warning. Let's build zip files in CI and update terraform to fetch pre-built files from CDN with the possibility to fallback to the local build

Andrey9kin commented 3 months ago

This will also address #64

Andrey9kin commented 3 months ago

Or even better - publish deps as a public layer and app itself as a public layer or to GitHub ECR

Andrey9kin commented 2 months ago

@dash-aug, we implemented the use of pre-build docker images that should remove all build requirements from the machine where you run Terraform We are going to test new release today and next week to iron out all the bugs and then it is ready to be tried