Skip to content

Commit e48bcb5

Browse files
add cloudfront domain to storage transfer job (#14409) (#10479)
[upstream:41b6c64a360c1d4b68a32ce67ba9946c0185eb2c] Signed-off-by: Modular Magician <magic-modules@google.com>
1 parent 827f6da commit e48bcb5

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

.changelog/14409.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
storagetransfer: added `transfer_spec.aws_s3_data_source.cloudfront_domain` field to `google_storage_transfer_job` resource
3+
```

google-beta/services/storagetransfer/resource_storage_transfer_job.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,11 @@ func awsS3DataSchema() *schema.Resource {
764764
Optional: true,
765765
Description: `Egress bytes over a Google-managed private network. This network is shared between other users of Storage Transfer Service.`,
766766
},
767+
"cloudfront_domain": {
768+
Type: schema.TypeString,
769+
Optional: true,
770+
Description: `The CloudFront distribution domain name pointing to this bucket, to use when fetching. See [Transfer from S3 via CloudFront](https://cloud.google.com/storage-transfer/docs/s3-cloudfront) for more information. Format: https://{id}.cloudfront.net or any valid custom domain. Must begin with https://.`,
771+
},
767772
},
768773
}
769774
}
@@ -1339,6 +1344,10 @@ func expandAwsS3Data(awsS3Datas []interface{}) *storagetransfer.AwsS3Data {
13391344
result.ManagedPrivateNetwork = v.(bool)
13401345
}
13411346

1347+
if v, ok := awsS3Data["cloudfront_domain"]; ok {
1348+
result.CloudfrontDomain = v.(string)
1349+
}
1350+
13421351
return result
13431352
}
13441353

@@ -1356,6 +1365,10 @@ func flattenAwsS3Data(awsS3Data *storagetransfer.AwsS3Data, d *schema.ResourceDa
13561365
data["managed_private_network"] = awsS3Data.ManagedPrivateNetwork
13571366
}
13581367

1368+
if awsS3Data.CloudfrontDomain != "" {
1369+
data["cloudfront_domain"] = awsS3Data.CloudfrontDomain
1370+
}
1371+
13591372
return []map[string]interface{}{data}
13601373
}
13611374

google-beta/services/storagetransfer/resource_storage_transfer_job_meta.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ fields:
4545
- field: 'transfer_spec.aws_s3_data_source.aws_access_key.access_key_id'
4646
- field: 'transfer_spec.aws_s3_data_source.aws_access_key.secret_access_key'
4747
- field: 'transfer_spec.aws_s3_data_source.bucket_name'
48+
- field: 'transfer_spec.aws_s3_data_source.cloudfront_domain'
4849
- field: 'transfer_spec.aws_s3_data_source.managed_private_network'
4950
- field: 'transfer_spec.aws_s3_data_source.path'
5051
- field: 'transfer_spec.aws_s3_data_source.role_arn'

website/docs/r/storage_transfer_job.html.markdown

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ A duration in seconds with up to nine fractional digits, terminated by 's'. Exam
276276

277277
* `managed_private_network` - (Optional) Egress bytes over a Google-managed private network. This network is shared between other users of Storage Transfer Service.
278278

279+
* `cloudfront_domain` - (Optional) The CloudFront distribution domain name pointing to this bucket, to use when fetching. See [Transfer from S3 via CloudFront](https://cloud.google.com/storage-transfer/docs/s3-cloudfront) for more information. Format: `https://{id}.cloudfront.net` or any valid custom domain. Must begin with `https://`.
280+
279281
The `aws_access_key` block supports:
280282

281283
* `access_key_id` - (Required) AWS Key ID.

0 commit comments

Comments
 (0)