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

Feat add workspace trigger patterns to CRD #496

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

baptman21
Copy link

Description

Add the fields FileTriggersEnabled, TriggerPatterns and TriggerPrefixes to the Workspace CRD to allow the user to manage those fields.

The fields are already present in the go-tfe package but are currently not editable from the CRD.

Usage Example

  • Deploy a workspace with the configuration
apiVersion: app.terraform.io/v1alpha2
kind: Workspace
metadata:
  name: tmp
spec:
  allowDestroyPlan: false
  applyMethod: auto
  description: "Example with Trigger Patterns"
  executionMode: agent
  name: example
  organization: padoa
  project:
    name: Default Project
  tags:
  - test
  terraformVariables:
    - hcl: false
      name: env
      sensitive: false
      value: dev
  token:
    secretKeyRef:
      key: token
      name: example-token
  versionControl:
    branch: main
    oAuthTokenID: ot-XXXXXXXXXXX
    repository: example
  triggerPatterns:
    - "example/test/*"
  fileTriggersEnabled: true
  workingDirectory: example/test

References

Community Note

  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

@obervinov
Copy link

I hope this feature will be merged soon, because it is needed to reduce the load on terraform agents (especially for terraform cloud agents).
Now for my 18 workspaces terraform remote agents make a plan every time for all workspaces (as their code is stored in one repository), even when there were no changes to them. Because of this, code that could be done in 5 minutes is wasting 30-40 minutes on the agents :(

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

Successfully merging this pull request may close these issues.

🤔 Choose when runs should be triggered by VCS changes.
3 participants