Skip to content

[Bug]: A difference occurs every time even though there is no change in aws_lightsail_instance_public_ports #30286

@hirosakaki

Description

@hirosakaki

Terraform Core Version

1.4.2

AWS Provider Version

4.60.0

Affected Resource(s)

aws_lightsail_instance_public_ports

Expected Behavior

No changes. Your infrastructure matches the configuration.

Actual Behavior

  - port_info { # forces replacement
      - cidr_list_aliases = [] -> null
      - cidrs             = [
          - "0.0.0.0/0",
        ] -> null
      - from_port         = 0 -> null
      - ipv6_cidrs        = [
          - "::/0",
        ] -> null
      - protocol          = "-1" -> null
      - to_port           = 65535 -> null
    }
  + port_info { # forces replacement
      + cidr_list_aliases = (known after apply)
      + cidrs             = [
          + "0.0.0.0/0",
        ]
      + from_port         = 0
      + ipv6_cidrs        = [
          + "::/0",
        ]
      + protocol          = "all"
      + to_port           = 65535
    }
}

Plan: 1 to add, 0 to change, 1 to destroy.

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

resource "aws_lightsail_instance_public_ports" "example" {
  instance_name = aws_lightsail_instance.example.name
  port_info {
    protocol   = "all"
    from_port  = 0
    to_port    = 65535
    cidrs      = ["0.0.0.0/0"]
    ipv6_cidrs = ["::/0"]
  }
}

Steps to Reproduce

Execute the following command

terraform apply -auto-approve

Then execute the following command

terraform apply

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAddresses a defect in current functionality.service/lightsailIssues and PRs that pertain to the lightsail service.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions