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_timeoptional computed - string
When the Transfer Job was created.
-
deletion_timeoptional computed - string
When the Transfer Job was deleted.
-
descriptionrequired - string
Unique description to identify the Transfer Job.
-
idoptional computed - string -
last_modification_timeoptional computed - string
When the Transfer Job was last modified.
-
nameoptional computed - string
The name of the Transfer Job.
-
projectoptional computed - string
The project in which the resource belongs. If it is not provided, the provider project is used.
-
statusoptional - 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.
-
schedulelist block-
schedule_end_datelist block-
dayrequired - number
Day of month. Must be from 1 to 31 and valid for the year and month.
-
monthrequired - number
Month of year. Must be from 1 to 12.
-
yearrequired - number
Year of date. Must be from 1 to 9999.
-
-
schedule_start_datelist block-
dayrequired - number
Day of month. Must be from 1 to 31 and valid for the year and month.
-
monthrequired - number
Month of year. Must be from 1 to 12.
-
yearrequired - number
Year of date. Must be from 1 to 9999.
-
-
start_time_of_daylist block-
hoursrequired - number
Hours of day in 24 hour format. Should be from 0 to 23.
-
minutesrequired - number
Minutes of hour of day. Must be from 0 to 59.
-
nanosrequired - number
Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
-
secondsrequired - number
Seconds of minutes of the time. Must normally be from 0 to 59.
-
-
-
transfer_speclist block-
aws_s3_data_sourcelist block-
bucket_namerequired - string
S3 Bucket name.
-
aws_access_keylist block-
access_key_idrequired - string
AWS Key ID.
-
secret_access_keyrequired - string
AWS Secret Access Key.
-
-
-
gcs_data_sinklist block-
bucket_namerequired - string
Google Cloud Storage bucket name.
-
-
gcs_data_sourcelist block-
bucket_namerequired - string
Google Cloud Storage bucket name.
-
-
http_data_sourcelist block-
list_urlrequired - 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_conditionslist block-
exclude_prefixesoptional - list of string
exclude_prefixes must follow the requirements described for include_prefixes.
-
include_prefixesoptional - 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_modificationoptional - string
A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
-
min_time_elapsed_since_last_modificationoptional - string
A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".
-
-
transfer_optionslist block-
delete_objects_from_source_after_transferoptional - 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_sinkoptional - 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_sinkoptional - 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.