mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
Initial implementation of structured logging in cloud backend (#32504)
* Implementation of structured logging. These are the changes that enable the cloud backend to consume structured logs and make use of the new plan renderer. This will enable CLI-driven runs to view the structured output in the Terraform Cloud UI. * Cloud structured logging unit tests * Remove deferred logs logic, fix minor issues Color formatting fixes, log type stop lists, default behavior for logs that are unknown * Use service disco path in redacted plan url
This commit is contained in:
5
internal/cloud/testdata/plan-json-error/main.tf
vendored
Normal file
5
internal/cloud/testdata/plan-json-error/main.tf
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
resource "null_resource" "foo" {
|
||||
triggers {
|
||||
random = "${guid()}"
|
||||
}
|
||||
}
|
||||
1
internal/cloud/testdata/plan-json-error/plan-redacted.json
vendored
Normal file
1
internal/cloud/testdata/plan-json-error/plan-redacted.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
2
internal/cloud/testdata/plan-json-error/plan.log
vendored
Normal file
2
internal/cloud/testdata/plan-json-error/plan.log
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
{"@level":"info","@message":"Terraform 1.3.7","@module":"terraform.ui","@timestamp":"2023-01-20T12:12:25.477403-05:00","terraform":"1.3.7","type":"version","ui":"1.0"}
|
||||
{"@level":"error","@message":"Error: Unsupported block type","@module":"terraform.ui","@timestamp":"2023-01-20T12:12:25.615995-05:00","diagnostic":{"severity":"error","summary":"Unsupported block type","detail":"Blocks of type \"triggers\" are not expected here. Did you mean to define argument \"triggers\"? If so, use the equals sign to assign it a value.","range":{"filename":"main.tf","start":{"line":2,"column":3,"byte":35},"end":{"line":2,"column":11,"byte":43}},"snippet":{"context":"resource \"null_resource\" \"foo\"","code":" triggers {","start_line":2,"highlight_start_offset":2,"highlight_end_offset":10,"values":[]}},"type":"diagnostic"}
|
||||
Reference in New Issue
Block a user