-
Notifications
You must be signed in to change notification settings - Fork 172
[TFDN-217] Add Support for Tool Version Architecture Fields #1762
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
base: main
Are you sure you want to change the base?
Conversation
cdf0756
to
8dc2594
Compare
One thing that I fond confusing is that if we send only archs, it updates the top level ![]() @natalie-todd how willTFDN-843 effect this? |
TFDN-843 will make it so the top level url and sha are no longer being set. |
@kelsi-hoyle do you know what the release schedule is for the provider? We will need to know so we can time this with the TFE release. Let me know if it would be helpful for me to ask about this. |
func testAccCheckTFEOPAVersionAttributesArchs(opaVersion *tfe.AdminOPAVersion, version string, sha string) resource.TestCheckFunc { | ||
return func(s *terraform.State) error { | ||
if opaVersion.Version != version { | ||
return fmt.Errorf("Bad version: %s", opaVersion.Version) |
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 know this is happening in other parts of the repo too, but generally error strings are not capitalized. https://go.dev/wiki/CodeReviewComments#error-strings
…into kelsi-hoyle/TF-24744/arm-toolversion-support
"deprecated_reason": schema.StringAttribute{ | ||
Optional: true, | ||
}, | ||
"archs": schema.SetNestedAttribute{ |
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.
new archs functionality
setplanmodifier.UseStateForUnknown(), | ||
PreserveAMD64ArchsOnChange(), |
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.
UseStateForUnknown
is needed to ensure that no refresh plans pass- Since these values can be computed and not always in the config, these plan modifiers are needed to ensure the values on update are correct.
Optional: true, | ||
Default: nil, | ||
}, | ||
"archs": schema.SetNestedAttribute{ |
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.
new archs functionality
"deprecated_reason": schema.StringAttribute{ | ||
Optional: true, | ||
}, | ||
"archs": schema.SetNestedAttribute{ |
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.
new archs functionality
Description
At the time of GA for the Arm64 Agent Support project, the TFE Provider will need to support the creation and updating of tool versions with Linux amd64 and Linux arm64 architectures.
The tfe provider calls the Terraform versions API via go-tfe’s AdminTerraformVersionCreateOptions and AdminTerraformVersionUpdateOptions. To support the arm64 Terraform version creation and updates, the Archs field will need to be included in this request.
This change enables adds archs to the tool version resources to be added to the create and update calls and adds them to the read.
tfe_terraform_version
,tfe_sentinel_version
, andtfe_opa_version
use the archs block:Remember to:
Testing plan
External links
Include any links here that might be helpful for people reviewing your PR. If there are none, feel free to delete this section.
Output from acceptance tests
Please run applicable acceptance tests locally and include the output here. See testing.md to learn how to run acceptance tests.
If you are an external contributor, your contribution(s) will first be reviewed before running them against the project's CI pipeline.
Rollback Plan
Changes to Security Controls