-
Notifications
You must be signed in to change notification settings - Fork 102
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
[TF-18527] Add Archs to AdminTerraformVersionCreateOptions #1022
[TF-18527] Add Archs to AdminTerraformVersionCreateOptions #1022
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 1419 Passed, 153 Skipped, 21m 47.33s Total Time |
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.
Thanks for adding this! A few blocking things before we merge:
- We should add tests to
admin_terraform_version_integration_test.go
to ensure this new field is behaving as expected when we create/update a version. - Please add a changelog entry under the
# Unreleased
section - See comment below
Thank you 👍
…d by terraform releases
2dadf41
to
b3dc95d
Compare
Hi @sebasslash, I think I addressed these bullet points but let me know if there is anything else I'm missing. Thanks! |
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.
A couple of very minor questions, but this makes sense to me as a first pass to enable basic usage of the create endpoint while the feature is still flagged!
CHANGELOG.md
Outdated
* Add support for project level auto destroy settings @simonxmh [#1011](https://github.com/hashicorp/go-tfe/pull/1011) | ||
* Add `Archs` field to `AdminTerraformVersionCreateOptions` by @natalie-todd [#1022](https://github.com/hashicorp/go-tfe/pull/1022) |
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.
Question for core cloud folks: do we need to note that this is in beta to give any TFE users a heads up that they won't be able to use that field yet?
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.
Thank you, yes! In the past we have used words like: Adds BETA support for [such and such feature], which is EXPERIMENTAL, SUBJECT TO CHANGE, and may not be available to all users.
Those words could be applied here.
@@ -194,7 +203,7 @@ func (a *adminTerraformVersions) Delete(ctx context.Context, id string) error { | |||
} | |||
|
|||
func (o AdminTerraformVersionCreateOptions) valid() error { |
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.
Do we want to add a validation that checks all fields are provided for architectures, if present? I could also make a case for waiting to add that handling along with update support once the feature is released and the API is fully stable!
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.
I just added a validation to check whether at least one valid arch was provided or a valid URL and SHA. Let me know if this seems good or if you were thinking of something else.
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.
That's perfect! Just a little nicer to skip making the request if we already know it's going to fail.
734e931
to
ceaf38c
Compare
… and update changelog
ceaf38c
to
56eeb74
Compare
Natalie addressed the changes requested by Sebastian
Reminder to the contributor that merged this PR: if your changes have added important functionality or fixed a relevant bug, open a follow-up PR to update CHANGELOG.md with a note on your changes. |
Description
The purpose of this PR is to update the
AdminTerraformVersionCreateOptions
struct with anArchs
field so Terraform Releases can add Terraform versions with Linux amd64 and arm64 architectures.External links