forked from GoogleCloudPlatform/terraform-splunk-log-export
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreplay.tf
44 lines (40 loc) · 1.99 KB
/
replay.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
/*
The replay job should stay commented out while the main export pipeline is initially deployed.
When the replay job needs to be run, simply uncomment the module and deploy the replay pipeline.
From the CLI, this may look like `terraform apply -target="google_dataflow_job.splunk_dataflow_replay"`
After the deadletter Pub/Sub topic has no more messages, comment out the module and run a regular terraform deployment (ex. terraform apply). Terraform will automatically destroy the replay job.
`terraform apply -target` usage documentation is here: https://www.terraform.io/docs/cli/commands/apply.html
*/
/*
resource "google_dataflow_job" "splunk_dataflow_replay" {
name = local.dataflow_replay_job_name
template_gcs_path = local.dataflow_pubsub_template_gcs_path
temp_gcs_location = "gs://${local.dataflow_temporary_gcs_bucket_name}/${local.dataflow_temporary_gcs_bucket_path}"
machine_type = var.dataflow_job_machine_type
max_workers = var.dataflow_job_machine_count
parameters = {
inputSubscription = google_pubsub_subscription.dataflow_deadletter_pubsub_sub.id
outputTopic = google_pubsub_topic.dataflow_input_pubsub_topic.id
}
region = var.region
network = var.network
subnetwork = "regions/${var.region}/subnetworks/${local.subnet_name}"
ip_configuration = "WORKER_IP_PRIVATE"
depends_on = [
google_compute_subnetwork.splunk_subnet
]
}
*/