Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable ForceNew for project sink unique_writer_identity field #6193

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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`
```
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
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