Skip to content

Commit 23de4dd

Browse files
author
Ichigo97438
committed
feat: add timeouts block for vpc origin resource
1 parent d66669f commit 23de4dd

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,16 +154,16 @@ No modules.
154154
| <a name="input_logging_config"></a> [logging\_config](#input\_logging\_config) | The logging configuration that controls how logs are written to your distribution (maximum one). | `any` | `{}` | no |
155155
| <a name="input_ordered_cache_behavior"></a> [ordered\_cache\_behavior](#input\_ordered\_cache\_behavior) | An ordered list of cache behaviors resource for this distribution. List from top to bottom in order of precedence. The topmost cache behavior will have precedence 0. | `any` | `[]` | no |
156156
| <a name="input_origin"></a> [origin](#input\_origin) | One or more origins for this distribution (multiples allowed). | `any` | `null` | no |
157-
| <a name="input_origin_access_control"></a> [origin\_access\_control](#input\_origin\_access\_control) | Map of CloudFront origin access control | <pre>map(object({<br/> description = string<br/> origin_type = string<br/> signing_behavior = string<br/> signing_protocol = string<br/> }))</pre> | <pre>{<br/> "s3": {<br/> "description": "",<br/> "origin_type": "s3",<br/> "signing_behavior": "always",<br/> "signing_protocol": "sigv4"<br/> }<br/>}</pre> | no |
157+
| <a name="input_origin_access_control"></a> [origin\_access\_control](#input\_origin\_access\_control) | Map of CloudFront origin access control | <pre>map(object({<br> description = string<br> origin_type = string<br> signing_behavior = string<br> signing_protocol = string<br> }))</pre> | <pre>{<br> "s3": {<br> "description": "",<br> "origin_type": "s3",<br> "signing_behavior": "always",<br> "signing_protocol": "sigv4"<br> }<br>}</pre> | no |
158158
| <a name="input_origin_access_identities"></a> [origin\_access\_identities](#input\_origin\_access\_identities) | Map of CloudFront origin access identities (value as a comment) | `map(string)` | `{}` | no |
159159
| <a name="input_origin_group"></a> [origin\_group](#input\_origin\_group) | One or more origin\_group for this distribution (multiples allowed). | `any` | `{}` | no |
160160
| <a name="input_price_class"></a> [price\_class](#input\_price\_class) | The price class for this distribution. One of PriceClass\_All, PriceClass\_200, PriceClass\_100 | `string` | `null` | no |
161161
| <a name="input_realtime_metrics_subscription_status"></a> [realtime\_metrics\_subscription\_status](#input\_realtime\_metrics\_subscription\_status) | A flag that indicates whether additional CloudWatch metrics are enabled for a given CloudFront distribution. Valid values are `Enabled` and `Disabled`. | `string` | `"Enabled"` | no |
162162
| <a name="input_retain_on_delete"></a> [retain\_on\_delete](#input\_retain\_on\_delete) | Disables the distribution instead of deleting it when destroying the resource through Terraform. If this is set, the distribution needs to be deleted manually afterwards. | `bool` | `false` | no |
163163
| <a name="input_staging"></a> [staging](#input\_staging) | Whether the distribution is a staging distribution. | `bool` | `false` | no |
164164
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to assign to the resource. | `map(string)` | `null` | no |
165-
| <a name="input_viewer_certificate"></a> [viewer\_certificate](#input\_viewer\_certificate) | The SSL configuration for this distribution | `any` | <pre>{<br/> "cloudfront_default_certificate": true,<br/> "minimum_protocol_version": "TLSv1"<br/>}</pre> | no |
166-
| <a name="input_vpc_origin"></a> [vpc\_origin](#input\_vpc\_origin) | Map of CloudFront VPC origin | <pre>map(object({<br/> name = string<br/> arn = string<br/> http_port = number<br/> https_port = number<br/> origin_protocol_policy = string<br/> origin_ssl_protocols = object({<br/> items = list(string)<br/> quantity = number<br/> })<br/> }))</pre> | `{}` | no |
165+
| <a name="input_viewer_certificate"></a> [viewer\_certificate](#input\_viewer\_certificate) | The SSL configuration for this distribution | `any` | <pre>{<br> "cloudfront_default_certificate": true,<br> "minimum_protocol_version": "TLSv1"<br>}</pre> | no |
166+
| <a name="input_vpc_origin"></a> [vpc\_origin](#input\_vpc\_origin) | Map of CloudFront VPC origin | <pre>map(object({<br> name = string<br> arn = string<br> http_port = number<br> https_port = number<br> origin_protocol_policy = string<br> origin_ssl_protocols = object({<br> items = list(string)<br> quantity = number<br> })<br> timeouts = optional(object({<br> create = optional(string)<br> update = optional(string)<br> delete = optional(string)<br> }))<br> }))</pre> | `{}` | no |
167167
| <a name="input_wait_for_deployment"></a> [wait\_for\_deployment](#input\_wait\_for\_deployment) | If enabled, the resource will wait for the distribution status to change from InProgress to Deployed. Setting this to false will skip the process. | `bool` | `true` | no |
168168
| <a name="input_web_acl_id"></a> [web\_acl\_id](#input\_web\_acl\_id) | If you're using AWS WAF to filter CloudFront requests, the Id of the AWS WAF web ACL that is associated with the distribution. The WAF Web ACL must exist in the WAF Global (CloudFront) region and the credentials configuring this argument must have waf:GetWebACL permissions assigned. If using WAFv2, provide the ARN of the web ACL. | `string` | `null` | no |
169169

examples/complete/main.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ module "cloudfront" {
6565
items = ["TLSv1.2"]
6666
quantity = 1
6767
}
68+
timeouts = {
69+
create = "20m"
70+
update = "20m"
71+
destroy = "20m"
72+
}
6873
}
6974
}
7075

main.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ resource "aws_cloudfront_vpc_origin" "this" {
4141
}
4242
}
4343

44+
timeouts {
45+
create = try(each.value.timeouts.create, null)
46+
update = try(each.value.timeouts.update, null)
47+
delete = try(each.value.timeouts.delete, null)
48+
}
49+
4450
tags = var.tags
4551
}
4652

variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ variable "vpc_origin" {
200200
items = list(string)
201201
quantity = number
202202
})
203+
timeouts = optional(object({
204+
create = optional(string)
205+
update = optional(string)
206+
delete = optional(string)
207+
}))
203208
}))
204209
default = {}
205210
}

0 commit comments

Comments
 (0)