Skip to content

Commit 6a09249

Browse files
Disable ForceNew for project sink unique_writer_identity field (#8845) (#15721)
Signed-off-by: Modular Magician <[email protected]>
1 parent 0b063b1 commit 6a09249

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.changelog/8845.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
logging: supported in-place update for `unique_writer_identity` in `google_logging_project_sink`
3+
```

google/services/logging/resource_logging_project_sink.go

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ func ResourceLoggingProjectSink() *schema.Resource {
3939
Type: schema.TypeBool,
4040
Optional: true,
4141
Default: false,
42-
ForceNew: true,
4342
Description: `Whether or not to create a unique identity associated with this sink. If false (the default), then the writer_identity used is serviceAccount:[email protected]. 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.`,
4443
}
4544
return schm

google/services/logging/resource_logging_project_sink_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ resource "google_logging_project_sink" "described" {
335335
filter = "logName=\"projects/%s/logs/compute.googleapis.com%%2Factivity_log\" AND severity>=ERROR"
336336
description = "description updated"
337337
338-
unique_writer_identity = false
338+
unique_writer_identity = true
339339
}
340340
341341
resource "google_storage_bucket" "log-bucket" {
@@ -470,7 +470,7 @@ resource "google_logging_project_sink" "bigquery" {
470470
destination = "bigquery.googleapis.com/projects/%s/datasets/${google_bigquery_dataset.logging_sink.dataset_id}"
471471
filter = "logName=\"projects/%s/logs/compute.googleapis.com%%2Factivity_log\" AND severity>=WARNING"
472472
473-
unique_writer_identity = false
473+
unique_writer_identity = true
474474
}
475475
476476
resource "google_bigquery_dataset" "logging_sink" {

0 commit comments

Comments
 (0)