Google Storage Transfer Service Storage Transfer Job
This page shows how to write Terraform for Storage Transfer Service Storage Transfer Job and write them securely.
google_storage_transfer_job (Terraform)
The Storage Transfer Job in Storage Transfer Service can be configured in Terraform with the resource name google_storage_transfer_job
. The following sections describe 1 example of how to use the resource and its parameters.
Example Usage from GitHub
resource "google_storage_transfer_job" "this" {
description = var.description
project = var.project
status = var.status
dynamic "schedule" {
Parameters
-
creation_time
optional computed - string
When the Transfer Job was created.
-
deletion_time
optional computed - string
When the Transfer Job was deleted.
-
description
required - string
Unique description to identify the Transfer Job.
-
id
optional computed - string -
last_modification_time
optional computed - string
When the Transfer Job was last modified.
-
name
optional computed - string
The name of the Transfer Job.
-
project
optional computed - string
The project in which the resource belongs. If it is not provided, the provider project is used.
-
status
optional - string
Status of the job. Default: ENABLED. NOTE: The effect of the new job status takes place during a subsequent job run. For example, if you change the job status from ENABLED to DISABLED, and an operation spawned by the transfer is running, the status change would not affect the current operation.
-
schedule
list block-
schedule_end_date
list block-
day
required - number
Day of month. Must be from 1 to 31 and valid for the year and month.
-
month
required - number
Month of year. Must be from 1 to 12.
-
year
required - number
Year of date. Must be from 1 to 9999.
-
-
schedule_start_date
list block-
day
required - number
Day of month. Must be from 1 to 31 and valid for the year and month.
-
month
required - number
Month of year. Must be from 1 to 12.
-
year
required - number
Year of date. Must be from 1 to 9999.
-
-
start_time_of_day
list block-
hours
required - number
Hours of day in 24 hour format. Should be from 0 to 23.
-
minutes
required - number
Minutes of hour of day. Must be from 0 to 59.
-
nanos
required - number
Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
-
seconds
required - number
Seconds of minutes of the time. Must normally be from 0 to 59.
-
-
-
transfer_spec
list block-
aws_s3_data_source
list block-
bucket_name
required - string
S3 Bucket name.
-
aws_access_key
list block-
access_key_id
required - string
AWS Key ID.
-
secret_access_key
required - string
AWS Secret Access Key.
-
-
-
gcs_data_sink
list block-
bucket_name
required - string
Google Cloud Storage bucket name.
-
-
gcs_data_source
list block-
bucket_name
required - string
Google Cloud Storage bucket name.
-
-
http_data_source
list block-
list_url
required - string
The URL that points to the file that stores the object list entries. This file must allow public access. Currently, only URLs with HTTP and HTTPS schemes are supported.
-
-
object_conditions
list block-
exclude_prefixes
optional - list of string
exclude_prefixes must follow the requirements described for include_prefixes.
-
include_prefixes
optional - list of string
If include_refixes is specified, objects that satisfy the object conditions must have names that start with one of the include_prefixes and that do not start with any of the exclude_prefixes. If include_prefixes is not specified, all objects except those that have names starting with one of the exclude_prefixes must satisfy the object conditions.
-
max_time_elapsed_since_last_modification
optional - string
A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
-
min_time_elapsed_since_last_modification
optional - string
A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
-
-
transfer_options
list block-
delete_objects_from_source_after_transfer
optional - bool
Whether objects should be deleted from the source after they are transferred to the sink. Note that this option and delete_objects_unique_in_sink are mutually exclusive.
-
delete_objects_unique_in_sink
optional - bool
Whether objects that exist only in the sink should be deleted. Note that this option and delete_objects_from_source_after_transfer are mutually exclusive.
-
overwrite_objects_already_existing_in_sink
optional - bool
Whether overwriting objects that already exist in the sink is allowed.
-
-
Explanation in Terraform Registry
Creates a new Transfer Job in Google Cloud Storage Transfer. To get more information about Google Cloud Storage Transfer, see:
Frequently asked questions
What is Google Storage Transfer Service Storage Transfer Job?
Google Storage Transfer Service Storage Transfer Job is a resource for Storage Transfer Service of Google Cloud Platform. Settings can be wrote in Terraform.
Where can I find the example code for the Google Storage Transfer Service Storage Transfer Job?
For Terraform, the niveklabs/google source code example is useful. See the Terraform Example section for further details.