Skip to content

Commit

Permalink
Disable ForceNew for project sink unique_writer_identity field (#8845) (
Browse files Browse the repository at this point in the history
#15721)

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Sep 5, 2023
1 parent 0b063b1 commit 6a09249
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .changelog/8845.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
logging: supported in-place update for `unique_writer_identity` in `google_logging_project_sink`
```
1 change: 0 additions & 1 deletion google/services/logging/resource_logging_project_sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ func ResourceLoggingProjectSink() *schema.Resource {
Type: schema.TypeBool,
Optional: true,
Default: false,
ForceNew: true,
Description: `Whether or not to create a unique identity associated with this sink. If false (the default), then the writer_identity used is serviceAccount:cloud-logs@system.gserviceaccount.com. If true, then a unique service account is created and used for this sink. If you wish to publish logs across projects, you must set unique_writer_identity to true.`,
}
return schm
Expand Down
4 changes: 2 additions & 2 deletions google/services/logging/resource_logging_project_sink_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ resource "google_logging_project_sink" "described" {
filter = "logName=\"projects/%s/logs/compute.googleapis.com%%2Factivity_log\" AND severity>=ERROR"
description = "description updated"
unique_writer_identity = false
unique_writer_identity = true
}
resource "google_storage_bucket" "log-bucket" {
Expand Down Expand Up @@ -470,7 +470,7 @@ resource "google_logging_project_sink" "bigquery" {
destination = "bigquery.googleapis.com/projects/%s/datasets/${google_bigquery_dataset.logging_sink.dataset_id}"
filter = "logName=\"projects/%s/logs/compute.googleapis.com%%2Factivity_log\" AND severity>=WARNING"
unique_writer_identity = false
unique_writer_identity = true
}
resource "google_bigquery_dataset" "logging_sink" {
Expand Down

0 comments on commit 6a09249

Please sign in to comment.