Skip to content

Syntax highlight broken with braces not part of a terraform variable declaration #21

@CloudNiner

Description

@CloudNiner

Using version 0.10.0, it appears that syntax highlighting breaks when there are braces that are not part of a Terraform variable declaration. The braces in the regex are the offender here.

resource "aws_alb_target_group" "pfb_app_http" {
  # Name can only be 32 characters long, so we MD5 hash the name and
  # truncate it to fit.
  name = "tf-alb-${replace("${md5("${var.environment}HTTPAppServer")}", "/(.{0,26})(.*)/", "$1")}"

  health_check {
    healthy_threshold   = "3"
    interval            = "60"
    matcher             = "301"
    protocol            = "HTTP"
    timeout             = "3"
    path                = "/"
    unhealthy_threshold = "2"
  }

  port     = "80"
  protocol = "HTTP"
  vpc_id   = "${module.vpc.id}"

  tags {
    Name        = "tg${var.environment}HTTPAppServer"
    Project     = "${var.project}"
    Environment = "${var.environment}"
  }
}

screen shot 2017-03-06 at 08 19 49

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions