Skip to content

Commit 420920f

Browse files
author
Alex Hewson
committed
docs: Allow statement to example VPC endpoint policy and switch S3 endpoint to type 'Gateway'
1 parent 7c1f791 commit 420920f

File tree

2 files changed

+19
-33
lines changed

2 files changed

+19
-33
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,6 @@
11
repos:
2-
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.99.0
4-
hooks:
5-
- id: terraform_fmt
6-
- id: terraform_docs
7-
args:
8-
- '--args=--lockfile=false'
9-
- id: terraform_tflint
10-
args:
11-
- '--args=--only=terraform_deprecated_interpolation'
12-
- '--args=--only=terraform_deprecated_index'
13-
- '--args=--only=terraform_unused_declarations'
14-
- '--args=--only=terraform_comment_syntax'
15-
- '--args=--only=terraform_documented_outputs'
16-
- '--args=--only=terraform_documented_variables'
17-
- '--args=--only=terraform_typed_variables'
18-
- '--args=--only=terraform_module_pinned_source'
19-
- '--args=--only=terraform_naming_convention'
20-
- '--args=--only=terraform_required_version'
21-
- '--args=--only=terraform_required_providers'
22-
- '--args=--only=terraform_standard_module_structure'
23-
- '--args=--only=terraform_workspace_remote'
24-
- id: terraform_validate
25-
- repo: https://github.com/pre-commit/pre-commit-hooks
26-
rev: v5.0.0
27-
hooks:
28-
- id: check-merge-conflict
29-
- id: end-of-file-fixer
30-
- id: trailing-whitespace
2+
- repo: https://github.com/antonbabenko/pre-commit-terraform
3+
rev: v1.99.3
4+
hooks:
5+
- id: terraform_fmt
6+
- id: terraform_docs

examples/complete/main.tf

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,9 @@ module "vpc_endpoints" {
106106
s3 = {
107107
service = "s3"
108108
private_dns_enabled = true
109-
dns_options = {
110-
private_dns_only_for_inbound_resolver_endpoint = false
111-
}
112-
tags = { Name = "s3-vpc-endpoint" }
109+
type = "Gateway"
110+
route_table_ids = flatten([module.vpc.intra_route_table_ids, module.vpc.private_route_table_ids, module.vpc.public_route_table_ids])
111+
tags = { Name = "s3-vpc-endpoint" }
113112
},
114113
dynamodb = {
115114
service = "dynamodb"
@@ -210,6 +209,17 @@ data "aws_iam_policy_document" "generic_endpoint_policy" {
210209
values = [module.vpc.vpc_id]
211210
}
212211
}
212+
213+
statement {
214+
effect = "Allow"
215+
actions = ["*"]
216+
resources = ["*"]
217+
218+
principals {
219+
type = "*"
220+
identifiers = ["*"]
221+
}
222+
}
213223
}
214224

215225
resource "aws_security_group" "rds" {

0 commit comments

Comments
 (0)