Skip to content

Commit

Permalink
rename vars
Browse files Browse the repository at this point in the history
  • Loading branch information
drewmullen committed Oct 14, 2021
1 parent 155da65 commit d0feab5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ VPC Flow Log allows to capture IP traffic for a specific network interface (ENI)
By default `file_format` is `plain-text`. You can also specify `parquet` to have logs written in Apache Parquet format.

```
log_file_format = "parquet"
flow_log_file_format = "parquet"
```

### Permissions Boundary
Expand Down
2 changes: 1 addition & 1 deletion examples/vpc-flow-logs/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module "vpc_with_flow_logs_s3_bucket_parquet" {
enable_flow_log = true
flow_log_destination_type = "s3"
flow_log_destination_arn = module.s3_bucket.this_s3_bucket_arn
log_file_format = "parquet"
flow_log_file_format = "parquet"

vpc_flow_log_tags = {
Name = "vpc-flow-logs-s3-bucket"
Expand Down
8 changes: 4 additions & 4 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -1152,24 +1152,24 @@ variable "outpost_az" {
default = null
}

variable "log_file_format" {
variable "flow_log_file_format" {
description = "(Optional) The format for the flow log. Valid values: `plain-text`, `parquet`."
type = string
default = "plain-text"
validation {
condition = can(regex("^(plain-text|parquet)$",
var.log_file_format))
var.flow_log_file_format))
error_message = "ERROR valid values: plain-text, parquet."
}
}

variable "hive_compatible_partitions" {
variable "flow_log_hive_compatible_partitions" {
description = "(Optional) Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3."
type = bool
default = false
}

variable "per_hour_partition" {
variable "flow_log_per_hour_partition" {
description = "(Optional) Indicates whether to partition the flow log per hour. This reduces the cost and response time for queries."
type = bool
default = false
Expand Down
6 changes: 3 additions & 3 deletions vpc-flow-logs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ resource "aws_flow_log" "this" {
vpc_id = local.vpc_id
max_aggregation_interval = var.flow_log_max_aggregation_interval
destination_options {
file_format = var.log_file_format
hive_compatible_partitions = var.hive_compatible_partitions
per_hour_partition = var.per_hour_partition
file_format = var.flow_log_file_format
flow_log_hive_compatible_partitions = var.flow_log_hive_compatible_partitions
flow_log_per_hour_partition = var.flow_log_per_hour_partition
}

tags = merge(var.tags, var.vpc_flow_log_tags)
Expand Down

0 comments on commit d0feab5

Please sign in to comment.