-
Notifications
You must be signed in to change notification settings - Fork 167
[TF-24744] Terraform Version Arm Support #1714
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-24744] Terraform Version Arm Support #1714
Conversation
the plugin framework. This migration had already been released in version 0.65.0 but it had to be reverted. Users were seeing the error 'error inferring type for key' for output objects that had a key with value nil. This PR reintroduces the tfe_outputs migration to the framework after addressing this issue.
Reintroduce migration of tfe_outputs data source to the plugin framew…
* chore: onboard repo to Common Release Tooling * chore: incorporate review feedback
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.3.0 to 5.4.0. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](actions/setup-go@v5.3.0...0aaccfd) --- updated-dependencies: - dependency-name: actions/setup-go dependency-version: 5.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…own,r/workspace_settings.markdown,r/workspace_run_task.html.markdown,r/workspace_run.html.markdown,r/workspace_policy_set_exclusion.html.markdown,r/workspace_policy_set.html.markdown,r/workspace.html.markdown,r/variable_set.html.markdown,r/variable.html.markdown,r/tfe_test_variable.html.markdown,r/terraform_version.html.markdown,r/team_token.html.markdown,r/team_project_access.html.markdown,r/team_organization_members.html.markdown,r/team_organization_member.html.markdown,r/team_notification_configuration.html.markdown,r/team_members.html.markdown,r/team_member.html.markdown,r/team_access.html.markdown,r/team.html.markdown,r/stack.html.markdown,r/ssh_key.html.markdown,r/sentinel_version.html.markdown,r/sentinel_policy.html.markdown,r/saml_settings.html.markdown,r/run_trigger.html.markdown,r/registry_provider.html.markdown,r/registry_module.html.markdown,r/registry_gpg_key.html.markdown,r/project_variable_set.html.markdown,r/project_policy_set.html.markdown,r/project_oauth_client.html.markdown,r/project.html.markdown,r/policy_set_parameter.html.markdown,r/policy_set.html.markdown,r/policy.html.markdown,r/organization_token.html.markdown,r/organization_run_task_global_settings.html.markdown,r/organization_run_task.html.markdown,r/organization_module_sharing.html.markdown,r/organization_membership.html.markdown,r/organization_default_settings.html.markdown,r/organization.html.markdown,r/opa_version.html.markdown,r/oauth_client.html.markdown,r/notification_configuration.html.markdown,r/no_code_module.html.markdown,r/data_retention_policy.html.markdown,r/audit_trail_token.html.markdown,r/agent_token.html.markdown,r/agent_pool_allowed_workspaces.html.markdown,r/agent_pool.html.markdown,r/admin_organization_settings.markdown,ephemeral-resources/team_token.html.markdown,ephemeral-resources/outputs.html.markdown,ephemeral-resources/organization_token.html.markdown,ephemeral-resources/audit_trail.html.markdown,ephemeral-resources/agent_token.html.markdown,d/workspace_run_task.html.markdown,d/workspace_ids.html.markdown,d/workspace.html.markdown,d/variables.html.markdown,d/variable_set.html.markdown,d/teams.html.markdown,d/team_project_access.html.markdown,d/team_access.html.markdown,d/team.html.markdown,d/ssh_key.html.markdown,d/slug.html.markdown,d/saml_settings.html.markdown,d/registry_providers.html.markdown,d/registry_provider.html.markdown,d/registry_module.html.markdown,d/registry_gpg_keys.html.markdown,d/registry_gpg_key.html.markdown,d/projects.html.markdown,d/project.html.markdown,d/policy_set.html.markdown,d/outputs.html.markdown,d/organizations.html.markdown,d/organization_tags.html.markdown,d/organization_run_task_global_settings.html.markdown,d/organization_run_task.html.markdown,d/organization_membership.html.markdown,d/organization_members.html.markdown,d/organization.html.markdown,d/oauth_client.html.markdown,d/no_code_module.html.markdown,d/ip_ranges.html.markdown,d/github_app_installation.html.markdown,d/agent_pool.html.markdown (#1702)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.37.0 to 0.38.0. - [Commits](golang/net@v0.37.0...v0.38.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-version: 0.38.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.2.1 to 4.3.0. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@95815c3...d3f86a1) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: 4.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.
This looks good. Almost all of my comments are about the same thing - I'm thinking we should let Atlas handle top level URL/SHA vs Archs decisions. That being said, I could be convinced of otherwise. Let me know your thoughts. This could have been clearer in the ticket so apologies there.
I added a bullet point to the A/C for a deprecation message.
Type: schema.TypeString, | ||
Optional: true, | ||
Default: nil, | ||
ConflictsWith: []string{"archs"}, |
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.
If I am understanding ConflictsWith
properly, it cannot be used w/ "archs" at all, right? I think it should be allowed to be used w/ archs because maybe there are url, sha, and arm64 arch fields or url, sha, and matching amd64 fields.
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.
yeah, I can definitely update this validation. I added this when I was having weird behavior with the api. But with TFDN-842 this behavior should be taken care of
Optional: true, | ||
Default: nil, | ||
ConflictsWith: []string{"archs"}, | ||
RequiredWith: []string{"sha"}, |
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.
For PATCH requests, a SHA does not have to be present w/ a URL and the other way around. Will this interfere with that?
Optional: true, | ||
Default: nil, | ||
ConflictsWith: []string{"url", "sha"}, | ||
AtLeastOneOf: []string{"archs", "url", "sha"}, |
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.
Still wondering about the PATCH here. Let me know if you want me to do any manual testing around this.
} else { | ||
url, urlOk := d.GetOk("url") | ||
sha, shaOk := d.GetOk("sha") | ||
if urlOk && shaOk { | ||
opts.URL = tfe.String(url.(string)) | ||
opts.Sha = tfe.String(sha.(string)) | ||
} | ||
} |
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 can see why you have an else because we want to get away from relying on URL and SHA but I wonder if we should set the URL and SHA if present regardless of Archs because then the user will get the 422 if they don't match. It might be confusing for them to send these values and not get any acknowledgement of them.
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.
Ok, the reason that I had conditionally set these was because of this warning that is returned that may be confusing (but may also be acceptable, I am not familiar with providers 😅 )
This was how I set the tfe_terraform_version
:
resource "tfe_terraform_version" "test" {
version = "9.9.9"
deprecated = false
enabled = true
official = false
beta = false
archs {
url = "https://releases.hashicorp.com/terraform/1.11.0-alpha20241211/terraform_1.11.0-alpha20241211_linux_amd64.zip"
sha = "dd68a600989c122c5e2ca9fd055f071bfbff8fa7047b48349489e4290b62b8c1"
os = "linux"
arch = "amd64"
}
archs {
url = "https://releases.hashicorp.com/terraform/1.11.0-alpha20241211/terraform_1.11.0-alpha20241211_linux_amd64.zip"
sha = "dd68a600989c122c5e2ca9fd055f071bfbff8fa7047b48349489e4290b62b8c9"
os = "linux"
arch = "arm64"
}
}
Since the tool_version url
and sha
are sent back at the read, it set's both of those values in state and returns this warning:
2025-05-02T10:14:31.067-0600 [WARN] Provider "provider[\"registry.terraform.io/hashicorp/tfe\"]" produced an unexpected new value for tfe_terraform_version.test, but we are tolerating it because it is using the legacy plugin SDK.
The following problems may be the cause of any confusing errors from downstream operations:
- .url: was null, but now cty.StringVal("https://releases.hashicorp.com/terraform/1.11.0-alpha20241211/terraform_1.11.0-alpha20241211_linux_amd64.zip")
- .sha: was null, but now cty.StringVal("dd68a600989c122c5e2ca9fd055f071bfbff8fa7047b48349489e4290b62b8c1")
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 updated to just set it each time, since it is a lot cleaner. But curious on your thoughts!
d.Set("url", v.URL) | ||
d.Set("sha", v.Sha) |
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'm wondering if we should leave these and realizing I should not have included details like "replace" in the ticket. I'll fix that.
d.Set("url", nil) | ||
d.Set("sha", nil) | ||
} else { | ||
d.Set("archs", nil) |
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.
d.Set("archs", nil) |
This will default to nil
d.Set("url", nil) | ||
d.Set("sha", nil) |
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.
Maybe we populate these and let Atlas handle it.
URL: tfe.String(d.Get("url").(string)), | ||
Sha: tfe.String(d.Get("sha").(string)), |
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.
Same as lines 78, 79.
…1722) Bumps [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) from 2.0.0 to 2.1.0. - [Release notes](https://github.com/slackapi/slack-github-action/releases) - [Commits](slackapi/slack-github-action@485a9d4...b0fa283) --- updated-dependencies: - dependency-name: slackapi/slack-github-action dependency-version: 2.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [go.uber.org/mock](https://github.com/uber/mock) from 0.5.1 to 0.5.2. - [Release notes](https://github.com/uber/mock/releases) - [Changelog](https://github.com/uber-go/mock/blob/main/CHANGELOG.md) - [Commits](uber-go/mock@v0.5.1...v0.5.2) --- updated-dependencies: - dependency-name: go.uber.org/mock dependency-version: 0.5.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Addresses `Error: Provider produced inconsistent result after apply` for remote_state_consumer_ids
Update PR Template to be PCI compliant
…fe-gh-issue-1688-tfe-workspace-settings-intermittent-error fix: default remote_state_consumer_ids to empty set of strings, not null
…1698) * Upgrade go-tfe * Add description as option for team token By setting the description, this allows for creation of multiple team tokens. * Use token ID as resource ID when multiple tokens Previously, when a team only had a single token, it was sufficient to have the ID of the token be set to the team ID. Now that we support multiple team tokens, we should use the token ID instead. We will continue to use the team ID for descriptionless tokens so that it is backwards compatible, though. * Support importing by team token ID * Update documentation for team tokens * Update changelog * Update go-tfe to v1.79.0 * Clarify that create error can be due to TFE version
Bumps [github.com/hashicorp/terraform-plugin-mux](https://github.com/hashicorp/terraform-plugin-mux) from 0.18.0 to 0.19.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-mux/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-mux/blob/main/CHANGELOG.md) - [Commits](hashicorp/terraform-plugin-mux@v0.18.0...v0.19.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-mux dependency-version: 0.19.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/hashicorp/terraform-plugin-sdk/v2](https://github.com/hashicorp/terraform-plugin-sdk) from 2.36.1 to 2.37.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-sdk/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-sdk/blob/main/CHANGELOG.md) - [Commits](hashicorp/terraform-plugin-sdk@v2.36.1...v2.37.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-sdk/v2 dependency-version: 2.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix(ci): get tests passing * chore: go mod tidy
…1743) Bumps [github.com/hashicorp/go-tfe](https://github.com/hashicorp/go-tfe) from 1.79.0 to 1.81.0. - [Release notes](https://github.com/hashicorp/go-tfe/releases) - [Changelog](https://github.com/hashicorp/go-tfe/blob/main/CHANGELOG.md) - [Commits](hashicorp/go-tfe@v1.79.0...v1.81.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/go-tfe dependency-version: 1.81.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
…idators (#1729) Bumps [github.com/hashicorp/terraform-plugin-framework-validators](https://github.com/hashicorp/terraform-plugin-framework-validators) from 0.17.0 to 0.18.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-framework-validators/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-framework-validators/blob/main/CHANGELOG.md) - [Commits](hashicorp/terraform-plugin-framework-validators@v0.17.0...v0.18.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-framework-validators dependency-version: 0.18.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.1 to 4.6.2. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v4.6.1...ea165f8) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: 4.6.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.4.0 to 5.5.0. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](actions/setup-go@0aaccfd...d35c59a) --- updated-dependencies: - dependency-name: actions/setup-go dependency-version: 5.5.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… resources (#1736) * fix: implement close for tfe_team_token and tfe_agent_token ephemeral resources * docs: update docs for tfe_team_token and tfe_agent_token ephemeral resources * chore: remove tfe_organization_token, tfe_audit_trail, and tfe_agent_token ephemeral resources * docs: improve inline documentation for write-only values * docs: update changelog * chore: remove unused code * tests(e/tfe_team_token): skip tests
Bumps [github.com/cloudflare/circl](https://github.com/cloudflare/circl) from 1.6.0 to 1.6.1. - [Release notes](https://github.com/cloudflare/circl/releases) - [Commits](cloudflare/circl@v1.6.0...v1.6.1) --- updated-dependencies: - dependency-name: github.com/cloudflare/circl dependency-version: 1.6.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [github.com/hashicorp/go-slug](https://github.com/hashicorp/go-slug) from 0.16.5 to 0.16.7. - [Release notes](https://github.com/hashicorp/go-slug/releases) - [Changelog](https://github.com/hashicorp/go-slug/blob/main/CHANGELOG.md) - [Commits](hashicorp/go-slug@v0.16.5...v0.16.7) --- updated-dependencies: - dependency-name: github.com/hashicorp/go-slug dependency-version: 0.16.7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
…com/cloudflare/circl-1.6.1 build(deps): bump github.com/cloudflare/circl from 1.6.0 to 1.6.1
…com/hashicorp/go-slug-0.16.7 build(deps): bump github.com/hashicorp/go-slug from 0.16.5 to 0.16.7
Description
tfe_terraform_version
resource to havearchs
url
andsha
ORarchs
is requiredarchs
on update/create opts (if present)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.