Skip to content

Commit

Permalink
fix tf lint
Browse files Browse the repository at this point in the history
  • Loading branch information
aahel committed Aug 31, 2023
1 parent 24a0457 commit 76e6c91
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion modules/lambda-registrator/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
lambda_events_key = "${var.name}-lambda_events"
image_parts = split(":", var.consul_lambda_registrator_image)
image_tag = local.image_parts[1]
image_path_parts = split("/",local.image_parts[0])
image_path_parts = split("/", local.image_parts[0])
image_username = local.image_path_parts[1]
image_name = local.image_path_parts[2]
ecr_image_uri = "${data.aws_caller_identity.current.account_id}.dkr.ecr.${var.region}.amazonaws.com/${var.private_ecr_repo_name}:${local.image_tag}"
Expand Down
12 changes: 6 additions & 6 deletions modules/lambda-registrator/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ variable "consul_lambda_registrator_image" {
type = string
default = "public.ecr.aws/hashicorp/consul-lambda-registrator:0.1.0-beta4"

validation {
validation {
condition = can(regex("^[a-zA-Z0-9_.-]+/[a-z0-9_.-]+/[a-z0-9_.-]+:[a-zA-Z0-9_.-]+$", var.consul_lambda_registrator_image))
error_message = "Image format of 'consul_lambda_registrator_image' is invalid. It should be in the format 'registry/repository:tag'."
}
Expand All @@ -131,17 +131,17 @@ variable "consul_lambda_registrator_image" {
variable "docker_host" {
description = "The docker socket for your system"
type = string
default = "unix:///var/run/docker.sock"
default = "unix:///var/run/docker.sock"
}

variable ecr_repository_prefix {
variable "ecr_repository_prefix" {
description = "The repository namespace to use when caching images from the source registry"
type = string
default = "ecr-public"
default = "ecr-public"
}

variable upstream_registry_url {
variable "upstream_registry_url" {
description = "The public registry url"
type = string
default = "public.ecr.aws"
default = "public.ecr.aws"
}

0 comments on commit 76e6c91

Please sign in to comment.