You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
variable"description" {
description="(required) - Unique description to identify the Transfer Job."type=string
}
variable"project" {
description="(optional) - The project in which the resource belongs. If it is not provided, the provider project is used."type=stringdefault=null
}
variable"status" {
description="(optional) - 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."type=stringdefault=null
}
variable"schedule" {
description="nested block: NestingList, min items: 1, max items: 1"type=set(object(
{
schedule_end_date =list(object(
{
day =number
month =number
year =number
}
))
schedule_start_date =list(object(
{
day =number
month =number
year =number
}
))
start_time_of_day =list(object(
{
hours =number
minutes =number
nanos =number
seconds =number
}
))
}
))
}
variable"transfer_spec" {
description="nested block: NestingList, min items: 1, max items: 1"type=set(object(
{
aws_s3_data_source =list(object(
{
aws_access_key =list(object(
{
access_key_id =string
secret_access_key =string
}
))
bucket_name =string
}
))
gcs_data_sink =list(object(
{
bucket_name =string
}
))
gcs_data_source =list(object(
{
bucket_name =string
}
))
http_data_source =list(object(
{
list_url =string
}
))
object_conditions =list(object(
{
exclude_prefixes =list(string)
include_prefixes =list(string)
max_time_elapsed_since_last_modification =string
min_time_elapsed_since_last_modification =string
}
))
transfer_options =list(object(
{
delete_objects_from_source_after_transfer =bool
delete_objects_unique_in_sink =bool
overwrite_objects_already_existing_in_sink =bool
}
))
}
))
}
resource"google_storage_transfer_job""this" {
# description - (required) is a type of stringdescription=var.description# project - (optional) is a type of stringproject=var.project# status - (optional) is a type of stringstatus=var.statusdynamic"schedule" {
for_each=var.schedulecontent {
dynamic"schedule_end_date" {
for_each=schedule.value.schedule_end_datecontent {
# day - (required) is a type of numberday=schedule_end_date.value["day"]
# month - (required) is a type of numbermonth=schedule_end_date.value["month"]
# year - (required) is a type of numberyear=schedule_end_date.value["year"]
}
}
dynamic"schedule_start_date" {
for_each=schedule.value.schedule_start_datecontent {
# day - (required) is a type of numberday=schedule_start_date.value["day"]
# month - (required) is a type of numbermonth=schedule_start_date.value["month"]
# year - (required) is a type of numberyear=schedule_start_date.value["year"]
}
}
dynamic"start_time_of_day" {
for_each=schedule.value.start_time_of_daycontent {
# hours - (required) is a type of numberhours=start_time_of_day.value["hours"]
# minutes - (required) is a type of numberminutes=start_time_of_day.value["minutes"]
# nanos - (required) is a type of numbernanos=start_time_of_day.value["nanos"]
# seconds - (required) is a type of numberseconds=start_time_of_day.value["seconds"]
}
}
}
}
dynamic"transfer_spec" {
for_each=var.transfer_speccontent {
dynamic"aws_s3_data_source" {
for_each=transfer_spec.value.aws_s3_data_sourcecontent {
# bucket_name - (required) is a type of stringbucket_name=aws_s3_data_source.value["bucket_name"]
dynamic"aws_access_key" {
for_each=aws_s3_data_source.value.aws_access_keycontent {
# access_key_id - (required) is a type of stringaccess_key_id=aws_access_key.value["access_key_id"]
# secret_access_key - (required) is a type of stringsecret_access_key=aws_access_key.value["secret_access_key"]
}
}
}
}
dynamic"gcs_data_sink" {
for_each=transfer_spec.value.gcs_data_sinkcontent {
# bucket_name - (required) is a type of stringbucket_name=gcs_data_sink.value["bucket_name"]
}
}
dynamic"gcs_data_source" {
for_each=transfer_spec.value.gcs_data_sourcecontent {
# bucket_name - (required) is a type of stringbucket_name=gcs_data_source.value["bucket_name"]
}
}
dynamic"http_data_source" {
for_each=transfer_spec.value.http_data_sourcecontent {
# list_url - (required) is a type of stringlist_url=http_data_source.value["list_url"]
}
}
dynamic"object_conditions" {
for_each=transfer_spec.value.object_conditionscontent {
# exclude_prefixes - (optional) is a type of list of stringexclude_prefixes=object_conditions.value["exclude_prefixes"]
# include_prefixes - (optional) is a type of list of stringinclude_prefixes=object_conditions.value["include_prefixes"]
# max_time_elapsed_since_last_modification - (optional) is a type of stringmax_time_elapsed_since_last_modification=object_conditions.value["max_time_elapsed_since_last_modification"]
# min_time_elapsed_since_last_modification - (optional) is a type of stringmin_time_elapsed_since_last_modification=object_conditions.value["min_time_elapsed_since_last_modification"]
}
}
dynamic"transfer_options" {
for_each=transfer_spec.value.transfer_optionscontent {
# delete_objects_from_source_after_transfer - (optional) is a type of booldelete_objects_from_source_after_transfer=transfer_options.value["delete_objects_from_source_after_transfer"]
# delete_objects_unique_in_sink - (optional) is a type of booldelete_objects_unique_in_sink=transfer_options.value["delete_objects_unique_in_sink"]
# overwrite_objects_already_existing_in_sink - (optional) is a type of booloverwrite_objects_already_existing_in_sink=transfer_options.value["overwrite_objects_already_existing_in_sink"]
}
}
}
}
}