Skip to content

terraform destroy fails on extra-cluster because aws_lb_arn has no default #63

Description

@jpvelasco

Problem

The aws_lb_arn variable in terraform/extra-cluster/variables.tf (lines 84-86) has no default value:

variable "aws_lb_arn" {
  type = string
}

During terraform destroy, the user must provide this value. However, the load balancer it references was created by Kubernetes (via the AWS Load Balancer Controller for the Open Match Frontend ingress), not by Terraform. If the intra-cluster stage was already destroyed, the LB no longer exists, making it difficult to provide the correct ARN.

Even when provided, Terraform handles it gracefully during destroy (the resource referencing it gets destroyed regardless of the value), but requiring the value at all creates unnecessary friction during teardown.

Proposed Fix

Add default = "" to the variable declaration. The variable is only used in aws_globalaccelerator_endpoint_group.aga_frontend which gets destroyed during teardown regardless of the provided value.

Affected Files

  • terraform/extra-cluster/variables.tf (lines 84-86)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions