Skip to content

Commit

Permalink
log-export: make group specific redact noncomputed (#174)
Browse files Browse the repository at this point in the history
* log-export: make group specific redact noncomputed

Currently, the "redact" field in the individual log groups is declared as
a "computed" field. When a field is marked as "computed", user removing
the field/commenting it out is sometimes not recognised as a "diff" in
terraform state. This makes it look like the "redact" field is not working

* update the CHANGELOG
  • Loading branch information
arjunmahishi authored Dec 1, 2023
1 parent dc91056 commit eaef245
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Fixed a nil pointer exception which could occur while retrying a certain
class of api failures.
- Fixed a bug where the `log_export_config` would sometimes fail to detect changes to
the group level `redact` field due to it being declared as a `computed` field.

## [1.3.0] - 2023-09-14

Expand Down
4 changes: 2 additions & 2 deletions examples/workflows/cockroach_dedicated_cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ provider "cockroach" {
}

resource "cockroach_cluster" "example" {
name = var.cluster_name
cloud_provider = var.cloud_provider
name = var.cluster_name
cloud_provider = var.cloud_provider
dedicated = {
storage_gib = var.storage_gib
num_virtual_cpus = var.num_virtual_cpus
Expand Down
1 change: 0 additions & 1 deletion internal/provider/log_export_config_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ var logExportAttributes = map[string]schema.Attribute{
"redact": schema.BoolAttribute{
Optional: true,
MarkdownDescription: "Governs whether this log group should aggregate redacted logs if unset.",
Computed: true,
},
},
},
Expand Down

0 comments on commit eaef245

Please sign in to comment.