Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform 1.3 #1515

Closed
Shr3ps opened this issue Sep 15, 2022 · 0 comments · Fixed by #1519
Closed

Terraform 1.3 #1515

Shr3ps opened this issue Sep 15, 2022 · 0 comments · Fixed by #1519

Comments

@Shr3ps
Copy link

Shr3ps commented Sep 15, 2022

Introduction

Actual error with latest tflint:

Error: Invalid type specification
  on variables.tf line 82, in variable "origins":
  82:     http_port          = optional(number, 80)
Optional attribute modifier expects only one argument: the attribute type.
variable "origins" {
  description = "Manages CDN FrontDoor Origins"
  type = map(object({
    custom_name                    = optional(string)
    origin_group_short_name        = string
    health_probes_enabled          = optional(bool, true)
    certificate_name_check_enabled = optional(bool, true)

    host_name          = string
    http_port          = optional(number, 80)
    https_port         = optional(number, 443)
    origin_host_header = optional(string)
    priority           = optional(number, 1)
    weight             = optional(number, 1)

    private_link = optional(object({
      request_message        = optional(string)
      target_type            = optional(string)
      location               = string
      private_link_target_id = string
    }))
  }))
  default = {}
}

Expected Behavior

No errors outputed.

Additional Context

latest: Pulling from terraform-linters/tflint-bundle
Digest: sha256:ae5f7982d6723ca817db6439565c483ffa083162eca1821cd680518b4e97d116
Status: Image is up to date for ghcr.io/terraform-linters/tflint-bundle:latest
ghcr.io/terraform-linters/tflint-bundle:latest
$ terraform -v
Terraform v1.3.0-rc1
@bendrucker bendrucker changed the title tflint doesn't support new Terraform 1.3 optional and default values syntax Terraform 1.3 Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants