You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running and applying to receive the following massage
nomad_job.test: Creating...
nomad_job.test: Creation complete after 1s [id=consul-exporter-two]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
Job Warnings:
1 warning:
* task-docker-telemetry : Result: false (allowed failure based on level)
Description:
* Validate Docker container labels that are used for Telemetry related purposes (logging metadata, metric labels)
Print messages:
!! Missing Docker task container labels !!
....
Actual Behavior
We currently have multiple Sentinel policies in place to track and enforce various things.
We noticed that policies that are set as warning never actually print anything out once you do terraform apply
If the policy is meant to stop you from deploying you would immediately see the error on apply but warnings are dropped.
Please list the steps required to reproduce the issue, for example:
The one of the sentinel policies we have applied - https://gist.github.com/dkyanakiev/9ef5a958eea67f6a837cfaa2c4a2ad3f
It checks for labels (Note: We did notice another issue in terms of how labels are rendered but thats not relevant for the overall results)
Any warning level policy would be enough
Ah yes, we could use that for now. Usually those logs are for dev debugging but given the lack of alternatives that's probably the best we can do at this point.
Hi there,
Terraform Version
Nomad Version
build: 1.5.1+ent
Provider Configuration
Which values are you setting in the provider configuration?
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
Debug Output
https://gist.github.com/dkyanakiev/e26aab001fd7b0ea6c47aaf38be45e94
Expected Behavior
When running and applying to receive the following massage
Actual Behavior
We currently have multiple Sentinel policies in place to track and enforce various things.
We noticed that policies that are set as warning never actually print anything out once you do
terraform apply
If the policy is meant to stop you from deploying you would immediately see the error on apply but warnings are dropped.
Steps to Reproduce
terraform apply
Important Factoids
Please list the steps required to reproduce the issue, for example:
The one of the sentinel policies we have applied - https://gist.github.com/dkyanakiev/9ef5a958eea67f6a837cfaa2c4a2ad3f
It checks for labels (Note: We did notice another issue in terms of how labels are rendered but thats not relevant for the overall results)
Any warning level policy would be enough
References
https://github.com/hashicorp/nomad/blob/v1.5.8/command/job_plan.go#L317
Noticed that the nomad client actually looks for warnings and displays them, so its just a matter of actually looking for those warnings on the resource level . Currently its only checking for errors but warnings should be displayed as terraform warnings as well
The text was updated successfully, but these errors were encountered: