Skip to content

Commit 22376f6

Browse files
committed
fix: Update example module versions to satisfy CI
1 parent f6f41fa commit 22376f6

File tree

4 files changed

+19
-30
lines changed

4 files changed

+19
-30
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.99.1
3+
rev: v1.99.4
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_wrapper_module_for_each

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/> }))</pre> | `{}` | no |
167167
| <a name="input_vpc_origin_timeouts"></a> [vpc\_origin\_timeouts](#input\_vpc\_origin\_timeouts) | Create, update, and delete timeout configurations for vpc origin | `map(string)` | `{}` | no |
168168
| <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 |
169169
| <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 |

examples/complete/README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ Note that this example may create resources which cost money. Run `terraform des
4646
|------|--------|---------|
4747
| <a name="module_acm"></a> [acm](#module\_acm) | terraform-aws-modules/acm/aws | ~> 4.0 |
4848
| <a name="module_cloudfront"></a> [cloudfront](#module\_cloudfront) | ../../ | n/a |
49-
| <a name="module_ec2"></a> [ec2](#module\_ec2) | terraform-aws-modules/ec2-instance/aws | ~> 5.0 |
50-
| <a name="module_lambda_function"></a> [lambda\_function](#module\_lambda\_function) | terraform-aws-modules/lambda/aws | ~> 7.0 |
51-
| <a name="module_log_bucket"></a> [log\_bucket](#module\_log\_bucket) | terraform-aws-modules/s3-bucket/aws | ~> 4.0 |
52-
| <a name="module_records"></a> [records](#module\_records) | terraform-aws-modules/route53/aws//modules/records | ~> 2.0 |
53-
| <a name="module_s3_one"></a> [s3\_one](#module\_s3\_one) | terraform-aws-modules/s3-bucket/aws | ~> 4.0 |
49+
| <a name="module_ec2"></a> [ec2](#module\_ec2) | terraform-aws-modules/ec2-instance/aws | ~> 6.0 |
50+
| <a name="module_lambda_function"></a> [lambda\_function](#module\_lambda\_function) | terraform-aws-modules/lambda/aws | ~> 8.0 |
51+
| <a name="module_log_bucket"></a> [log\_bucket](#module\_log\_bucket) | terraform-aws-modules/s3-bucket/aws | ~> 5.0 |
52+
| <a name="module_records"></a> [records](#module\_records) | terraform-aws-modules/route53/aws//modules/records | ~> 5.0 |
53+
| <a name="module_s3_one"></a> [s3\_one](#module\_s3\_one) | terraform-aws-modules/s3-bucket/aws | ~> 5.0 |
5454

5555
## Resources
5656

@@ -60,7 +60,6 @@ Note that this example may create resources which cost money. Run `terraform des
6060
| [aws_s3_bucket_policy.bucket_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_policy) | resource |
6161
| [null_resource.download_package](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
6262
| [random_pet.this](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) | resource |
63-
| [aws_ami.al2023](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami) | data source |
6463
| [aws_canonical_user_id.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/canonical_user_id) | data source |
6564
| [aws_cloudfront_log_delivery_canonical_user_id.cloudfront](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/cloudfront_log_delivery_canonical_user_id) | data source |
6665
| [aws_iam_policy_document.s3_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |

examples/complete/main.tf

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -259,17 +259,17 @@ data "aws_cloudfront_log_delivery_canonical_user_id" "cloudfront" {}
259259

260260
module "s3_one" {
261261
source = "terraform-aws-modules/s3-bucket/aws"
262-
version = "~> 4.0"
262+
version = "~> 5.0"
263263

264-
bucket = "s3-one-${random_pet.this.id}"
264+
bucket_prefix = "s3-one-"
265265
force_destroy = true
266266
}
267267

268268
module "log_bucket" {
269269
source = "terraform-aws-modules/s3-bucket/aws"
270-
version = "~> 4.0"
270+
version = "~> 5.0"
271271

272-
bucket = "logs-${random_pet.this.id}"
272+
bucket_prefix = "logs-"
273273

274274
control_object_ownership = true
275275
object_ownership = "ObjectWriter"
@@ -293,7 +293,7 @@ module "log_bucket" {
293293
#############################################
294294

295295
locals {
296-
package_url = "https://raw.githubusercontent.com/terraform-aws-modules/terraform-aws-lambda/master/examples/fixtures/python3.8-zip/existing_package.zip"
296+
package_url = "https://raw.githubusercontent.com/terraform-aws-modules/terraform-aws-lambda/master/examples/fixtures/python-zip/existing_package.zip"
297297
downloaded = "downloaded_package_${md5(local.package_url)}.zip"
298298
}
299299

@@ -309,12 +309,12 @@ resource "null_resource" "download_package" {
309309

310310
module "lambda_function" {
311311
source = "terraform-aws-modules/lambda/aws"
312-
version = "~> 7.0"
312+
version = "~> 8.0"
313313

314314
function_name = "${random_pet.this.id}-lambda"
315315
description = "My awesome lambda function"
316316
handler = "index.lambda_handler"
317-
runtime = "python3.8"
317+
runtime = "python3.11"
318318

319319
publish = true
320320
lambda_at_edge = true
@@ -338,7 +338,7 @@ module "lambda_function" {
338338

339339
module "records" {
340340
source = "terraform-aws-modules/route53/aws//modules/records"
341-
version = "~> 2.0"
341+
version = "~> 5.0"
342342

343343
zone_id = data.aws_route53_zone.this.zone_id
344344

@@ -407,21 +407,11 @@ resource "aws_cloudfront_function" "example" {
407407
# EC2 instance for CloudFront VPC origin
408408
#########################################
409409

410-
data "aws_ami" "al2023" {
411-
most_recent = true
412-
owners = ["amazon"]
413-
414-
filter {
415-
name = "name"
416-
values = ["al2023-ami-2023*-x86_64"]
417-
}
418-
}
419-
420410
module "ec2" {
421411
source = "terraform-aws-modules/ec2-instance/aws"
422-
version = "~> 5.0"
412+
version = "~> 6.0"
423413

424-
ami = data.aws_ami.al2023.id
414+
name = "ec2-vpc-origin-${random_pet.this.id}"
425415
}
426416

427417
########

0 commit comments

Comments
 (0)