Skip to content

Commit

Permalink
Opinionated formatting (tf 0.14.0) (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Steers authored Nov 25, 2020
1 parent 94cd6c9 commit c145624
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion catalog/aws/data-lake/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

resource "random_id" "suffix" { byte_length = 2 }

data aws_s3_bucket "data_bucket_override" {
data "aws_s3_bucket" "data_bucket_override" {
count = var.data_bucket_override != null ? 1 : 0
bucket = var.data_bucket_override
}
Expand Down
2 changes: 1 addition & 1 deletion catalog/aws/dbt/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ variable "resource_tags" {

variable "admin_cidr" {
description = "Optional. The range of IP addresses which should be able to access the DBT instance. Defaults to the local user's current IP."
type = list
type = list(any)
default = []
}
variable "container_image" {
Expand Down
2 changes: 1 addition & 1 deletion catalog/aws/ml-ops/s3.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resource "random_id" "suffix" { byte_length = 2 }

data aws_s3_bucket "ml_bucket_override" {
data "aws_s3_bucket" "ml_bucket_override" {
count = var.ml_bucket_override != null ? 1 : 0
bucket = var.ml_bucket_override
}
Expand Down
2 changes: 1 addition & 1 deletion catalog/aws/ml-ops/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ variable "static_hyperparameters" {
Map of hyperparameter names to static values, which should not be altered during hyperparameter tuning.
E.g. `{ "kfold_splits" = "5" }`
EOF
type = map
type = map(any)
default = {
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/aws/ec2/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ data "http" "icanhazip" { url = "https://ipv4.icanhazip.com" }

locals {
project_shortname = substr(var.name_prefix, 0, length(var.name_prefix) - 1)
my_ip = "${chomp(data.http.icanhazip.body)}"
my_ip = chomp(data.http.icanhazip.body)
my_ip_cidr = "${chomp(data.http.icanhazip.body)}/32"
admin_cidr = flatten([local.my_ip_cidr, var.admin_cidr])
app_cidr = length(var.app_cidr) == 0 ? local.admin_cidr : var.app_cidr
Expand Down
4 changes: 2 additions & 2 deletions components/aws/ec2/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ variable "admin_ports" {
A map defining the admin ports which should be goverened by `admin_cidr`. Single ports
(e.g. '22') and port ranges (e.g. '0:65535') and both supported.
EOF
type = map
type = map(any)
default = { "SSH" : "22" }
}
variable "app_cidr" {
Expand All @@ -54,7 +54,7 @@ variable "app_ports" {
A map defining the end-user ports which should be goverened by `app_cidr`. Single ports
(e.g. '22') and port ranges (e.g. '0:65535') and both supported.
EOF
type = map
type = map(any)
default = {}
}
variable "cluster_ports" {
Expand Down
6 changes: 3 additions & 3 deletions components/aws/ecr/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
output "ecr_repo_arn" {
description = "The unique ID (ARN) of the ECR repo."
value = "${aws_ecr_repository.ecr_repo.arn}"
value = aws_ecr_repository.ecr_repo.arn
}
output "ecr_repo_root" {
description = "The path to the ECR repo, excluding image name."
value = "${dirname(aws_ecr_repository.ecr_repo.repository_url)}"
value = dirname(aws_ecr_repository.ecr_repo.repository_url)
}
output "ecr_image_url" {
description = "The full path to the ECR image, including image name."
value = "${aws_ecr_repository.ecr_repo.repository_url}"
value = aws_ecr_repository.ecr_repo.repository_url
}
2 changes: 1 addition & 1 deletion components/aws/ecs-task/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ output "ecs_runtask_cli" {
}
output "ecs_task_name" {
description = "The name of the ECS task."
value = "${aws_ecs_task_definition.ecs_task.family}"
value = aws_ecs_task_definition.ecs_task.family
}
output "ecs_security_group" {
description = "The name of the EC2 security group used by ECS."
Expand Down
4 changes: 2 additions & 2 deletions components/aws/ecs-task/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ variable "admin_ports" {
}
variable "admin_cidr" {
description = "Optional. The range of IP addresses which should be able to access admin ports. Defaults to the local user's current IP."
type = list
type = list(any)
default = []
}
variable "app_ports" {
Expand All @@ -46,7 +46,7 @@ variable "app_ports" {
}
variable "app_cidr" {
description = "Optional. The range of IP addresses which should be able to access app ports. Defaults to the local user's current IP."
type = list
type = list(any)
default = []
}
variable "container_command" {
Expand Down
2 changes: 1 addition & 1 deletion components/aws/glue-crawler/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
output "glue_crawler_name" {
description = "The name of the Glue crawler."
value = "${aws_glue_crawler.glue_crawler.id}"
value = aws_glue_crawler.glue_crawler.id
}
2 changes: 1 addition & 1 deletion samples/azure/data-lake-gen1-on-azure/00-resource-group.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ locals {
project_shortname = local.config["project_shortname"]
azure_subscription = local.config["subscription_id"]
azure_location = local.config["azure_location"]
name_prefix = "${local.project_shortname}"
name_prefix = local.project_shortname
resource_tags = merge(local.config["resource_tags"], { project = local.project_shortname })
}

Expand Down
2 changes: 1 addition & 1 deletion samples/azure/data-lake-gen2-on-azure/00-resource-group.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ locals {
project_shortname = local.config["project_shortname"]
azure_subscription = local.config["subscription_id"]
azure_location = local.config["azure_location"]
name_prefix = "${local.project_shortname}"
name_prefix = local.project_shortname
resource_tags = merge(local.config["resource_tags"], { project = local.project_shortname })
}

Expand Down
2 changes: 1 addition & 1 deletion samples/azure/storage-on-azure/00-resource-group.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ locals {
project_shortname = local.config["project_shortname"]
azure_subscription = local.config["subscription_id"]
azure_location = local.config["azure_location"]
name_prefix = "${local.project_shortname}"
name_prefix = local.project_shortname
resource_tags = merge(local.config["resource_tags"], { project = local.project_shortname })
}

Expand Down

0 comments on commit c145624

Please sign in to comment.