Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

check for TagsRegex being an empty string before throwing an error #679

Closed

Conversation

jpetrucciani
Copy link
Contributor

@jpetrucciani jpetrucciani commented Dec 22, 2023

This was a tweak that I had to make in order to allow workspaces with TriggerPatterns to be created via the tfe_workspace resource from the TFE provider. It seems that this value may be coming in as an empty string if not passed, which causes this error to be thrown, and which seems to get otf a bit confused (it will attempt to repeatedly try to create the workspace, but fail, and I think it queues up further plans? I ended up having to kill off otf and start fresh if i had an apply running trying to create workspaces in this way)!

Currently running this fork and I am able to create these workspaces as expected! (edit: later, testing updating workspaces, this appears to not work as expected)

Feel free to tweak if necessary, or let me know if there are any other ways you might want this case handled!

@jpetrucciani jpetrucciani marked this pull request as draft December 22, 2023 15:56
@jpetrucciani
Copy link
Contributor Author

jpetrucciani commented Dec 22, 2023

I think this needs further work - creation of new workspaces works as expected with the correct trigger patterns, but attempting to update does not seem to change from always trigger runs to Only trigger runs when files in specified paths change in the UI. Will look into this more later today

@jpetrucciani
Copy link
Contributor Author

jpetrucciani commented Dec 23, 2023

With this last commit, this appears to work as expected for creating and updating workspaces!

@jpetrucciani jpetrucciani marked this pull request as ready for review December 23, 2023 17:35
@leg100 leg100 closed this Dec 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants