Skip to content
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

Add AutoApplyRunTrigger attribute to workspaces #798

Merged
merged 3 commits into from
Nov 7, 2023

Conversation

nfagerlund
Copy link
Contributor

@nfagerlund nfagerlund commented Oct 31, 2023

Description

Support the new auto-apply-run-trigger workspace attribute, which is exactly like auto-apply except it has to be a new attribute to avoid surprising anyone accustomed to the prior behavior of hard-denying auto-apply for run triggers.

This feature is shipped to TFC prod, but not yet available in TFE.

Testing plan

  • Set the new attribute on a workspace.
  • It worked, yey.

External links

Output from tests

I'm internal, check CI.

@nfagerlund nfagerlund requested a review from a team as a code owner October 31, 2023 00:28
@nfagerlund nfagerlund marked this pull request as draft October 31, 2023 00:28
nfagerlund added a commit to hashicorp/terraform-provider-tfe that referenced this pull request Oct 31, 2023
This is the commit from hashicorp/go-tfe#798, which is a
prerequisite of the impending work. It should be replaced with a commit that
updates go-tfe to a released version with the required feature before merge. If
you see this commit log on main, someone done messed up!
@nfagerlund nfagerlund marked this pull request as ready for review November 1, 2023 17:37
brandonc
brandonc previously approved these changes Nov 1, 2023
Copy link
Collaborator

@brandonc brandonc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just needs BETA labelling since it's behind a FF and maybe a CHANGELOG

nfagerlund added a commit to hashicorp/terraform-provider-tfe that referenced this pull request Nov 1, 2023
This is the commit from hashicorp/go-tfe#798, which is a
prerequisite of the impending work. It should be replaced with a commit that
updates go-tfe to a released version with the required feature before merge. If
you see this commit log on main, someone done messed up!
@nfagerlund nfagerlund force-pushed the nf/oct23-auto-run-trigger branch 2 times, most recently from 57468bc to fbcc54a Compare November 1, 2023 22:19
nfagerlund added a commit to hashicorp/terraform-provider-tfe that referenced this pull request Nov 1, 2023
This is the commit from hashicorp/go-tfe#798, which is a
prerequisite of the impending work. It should be replaced with a commit that
updates go-tfe to a released version with the required feature before merge. If
you see this commit log on main, someone done messed up!
@nfagerlund
Copy link
Contributor Author

For posterity: we discussed in slack, and this is not in fact beta — there's a feature flag, but it's rolled out 100% to prod in TFC.

@@ -506,6 +506,34 @@ func TestWorkspacesCreate(t *testing.T) {
}
})

t.Run("with valid auto-apply-run-trigger option", func(t *testing.T) {
skipUnlessBeta(t)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is no longer beta, but only available in TFC we should use the skipIfEnterprise() helper

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

omg. yeah, thank you!

sebasslash
sebasslash previously approved these changes Nov 6, 2023
@nfagerlund nfagerlund merged commit 3e993c6 into main Nov 7, 2023
10 checks passed
@nfagerlund nfagerlund deleted the nf/oct23-auto-run-trigger branch November 7, 2023 01:24
Copy link

github-actions bot commented Nov 7, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants