tfexec: Add -allow-deferral experimental options to Plan and Apply commands#447
tfexec: Add -allow-deferral experimental options to Plan and Apply commands#447radeksimko merged 10 commits intomainfrom
-allow-deferral experimental options to Plan and Apply commands#447Conversation
| if runtime.GOOS == "darwin" && runtime.GOARCH == "arm64" { | ||
| t.Skip("Terraform for darwin/arm64 is not available until v1") | ||
| } | ||
|
|
There was a problem hiding this comment.
Skipping to avoid this error: https://github.com/hashicorp/terraform-exec/actions/runs/8914271134/job/24481540878?pr=447
An unfortunate situation where the latest macos GHA runners now are macOS 14 and ARM64 architecture machines: https://github.blog/changelog/2024-04-01-macos-14-sonoma-is-generally-available-and-the-latest-macos-runner-image/. We ran into this issue on setup-terraform last week: hashicorp/setup-terraform#409
I'm not sure if we want to default fallback to amd64 or if skipping this on arm64 is acceptable.
There was a problem hiding this comment.
I think skipping on arm64 is acceptable given that the nature of the test is to check for version differences, not so much architecture differences, and the former is already being checked on other platforms as well.
| - static-checks | ||
| runs-on: ${{ matrix.os }} | ||
| timeout-minutes: 10 | ||
| timeout-minutes: 20 |
There was a problem hiding this comment.
Another GH workflow related change, it seems that setup-go is taking an extra 2 minutes to setup Go 1.22.x on windows-latest, not leaving enough time for the rest of the job to run 🙂 : https://github.com/hashicorp/terraform-exec/actions/runs/8914407327/job/24482771576?pr=447
liamcervante
left a comment
There was a problem hiding this comment.
This looks good to me, I will chase Katy or Radek for a quick look in case I'm missing something as I haven't look closely at this before.
|
|
||
| // experimentsEnabled asserts the cached terraform version has experiments enabled in the executable, | ||
| // and returns a well known error if not. Experiments are enabled in alpha and (potentially) dev builds of Terraform. | ||
| func (tf *Terraform) experimentsEnabled(ctx context.Context) error { |
There was a problem hiding this comment.
I would've probably called this versionIsPrerelease() or something along these lines, as that's what the function actually does but it's also not exposed API to downstream so I'm not too worried about the name here.
| if runtime.GOOS == "darwin" && runtime.GOARCH == "arm64" { | ||
| t.Skip("Terraform for darwin/arm64 is not available until v1") | ||
| } | ||
|
|
There was a problem hiding this comment.
I think skipping on arm64 is acceptable given that the nature of the test is to check for version differences, not so much architecture differences, and the former is already being checked on other platforms as well.
This PR introduces a new plan and apply flag
-allow-deferral. This flag enables the deferred actions experiment that was introduced in Terraformv1.9.0-alpha20240404Notes
alphaordevin the version as a best effort. Happy to update with a more accurate method if one exists!