-
Notifications
You must be signed in to change notification settings - Fork 2
Catch template errors on terraform plan #93
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
Comments
Thank you for sharing your feedback. We are happy that you found the provider useful. The environment where we use the |
You're right, the issue seems to be more with coder itself because coder does not offer a way to validate templates before pushing them |
To validate a template, Coder needs the We can investigate this behavior further in a discussion on |
Closing this as it's outside the scope of the provider. The recommended workflow for debugging a template is to just |
@matifali If I can run a terraform plan I would assume I have the terraform binary installed.
@ethanndickson I'm worried that this will cause issues when pushing a broken template (maybe not in code, but in logic) because I have no way of validating the changes in a test workspace first. Having separate versions like in your example (with the staging and stable version) would provoke code duplicity which is what I was aiming to reduce when switching to the coderd provider |
By authentication I mean authenticating to the provisioner. For example you may have a k8s template but no access to the cluster locally on your machine where you are running The same argument applies for cloud provider templates and a local client probably will not have access to provision/plan resources on the cloud. So the best place to validate is the provisioner. As a workaround you can make sure your local terraform is authenticated with infrastructure providers and run a |
Yes, this is what I was doing until I started using coderd. Was hoping it would be possible to omit that. |
It would be great if errors in the template (which would be caught by a terraform plan on the template) that occur on a terraform apply would also be evaluated when running a terraform plan against the terraform project where the coderd_template ist defined.
In the current state, the template does not seem to be evaluated at all when terraform plan is run.
The text was updated successfully, but these errors were encountered: