-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
specify TPI version #885
specify TPI version #885
Conversation
casperdcl
commented
Jan 22, 2022
- Specify minimum terraform-provider-iterative version (may fix edge cases)
- follow-up to Deploy runner on EC2 gives error #883
ee1492b
to
026e936
Compare
🤔 What edge cases is this change trying to cover? |
Things related to iterative/terraform-provider-iterative#266? |
@casperdcl if I do not specify the version I always get the latest. |
could be nice, in combo with: iterative/terraform-provider-iterative#255 for users to have the option to lock their automation into a tested/proven release (for them). For example, I had a failure, and at least one other user from discord where a new release of tpi was out that cml tried to use but the registry hadn't quite propagated completely and jobs failed, granted this was an edge case of some stars aligning just right with when a job was running / when a release was made. Yes if not set, default to latest 💯 |
But this PR the thing it does it to enforce that the tpi version is above a minimum and not to specify a specific terraform version, right? @dacbd
|
I confess to only reading the comments 💥 xD |
my brain auto translated "specify TPI version" to "Allow user to set TPI version" |
I think at least letting the user specify the TPI version as @dacbd suggests is a good idea.
|
Just for the record CML unversion the tfstate from terraform. This is done to avoid minor terraform changes that avoids the run. |
@DavidGOrtega are you referring to when cml is invoked with base64 tfstate on the server? |
Yes, one of the biggest issues was having synced the terraform version in the remote host and the user's local one. If they differ terraform will fail. This topic was a hell back in the day for terraform users that discovered unpleasantly that they were not able to terminate instances because they updated terraform |
In any case. Does this PR solve the problem? Should we merge it? Should we close it? @iterative/cml |
I'm happy to add the selection feature I want to see as a new PR or as one targeting this branch (convert this PR to draft for now?) |
026e936
to
17b1cbb
Compare
@iterative/cml this half works. the invoking cml can have its tpi specified via passing a version constraint with I feel this doesn't quite match the "expected behavior" but on the other hand the instance's tpi only preforms the delete action and none of the setup/configuration... 👍 👎 |
From what I understand, something along the lines of iterative/terraform-provider-iterative#103 should suffice to close the stange loop between “TPI” and CML. |
Yeah, that was my initial thought about how to get it there as well but feels extra redundant, you pick your version or constraint which is part of the provider definition but also pass in the resource definition? I would want to try embedding it here so that it is communicated to the instance via base64 tfstate. /my "haven't investigated" part |
being able to parse it out of the tfstate like that would make it a simple adjustment here: Lines 375 to 383 in 01b2cef
as a param to line 375 |
Not sure if it's going to work, but definitely worth a try. Good initiation in the path of the Terraform Heresy. 🎉 😄 |
I think I'm on the side of (for lack of better words); it doesn't matter; the only action performed is the delete. The more critical component behind this idea was that Happy to revisit if people think otherwise. |
17b1cbb
to
36d33c3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Static review: looks good to me!
ahh yes, tested via:
Cat of the generated main.tf / lock file
|