Skip to content

Subtle issue representing null as unset value, resulting in deprecation warning #31730

Closed as not planned
aws-ia/terraform-aws-mwaa
#39
@lorengordon

Description

@lorengordon

Terraform Version

❯ terraform version
Terraform v1.2.8
on linux_amd64
+ provider registry.terraform.io/hashicorp/aws v4.28.0


### Terraform Configuration Files

```terraform
variable "enable_classiclink" {
  type    = bool
  default = null
}

resource "aws_vpc" "main" {
  cidr_block         = "10.0.0.0/16"
  enable_classiclink = var.enable_classiclink
}

Debug Output

not comfortable posting this

Expected Behavior

No deprecation warning should be displayed when the input is null, since null should be treated the same as unset.

Actual Behavior

Received the deprecation warning:

│ Warning: Argument is deprecated
│
│   with aws_vpc.main,
│   on main.tf line 8, in resource "aws_vpc" "main":
│    8:   enable_classiclink = var.enable_classiclink
│
│ With the retirement of EC2-Classic the enable_classiclink attribute has been deprecated and will be removed in a future version.

Steps to Reproduce

  1. terraform init
  2. terraform plan

Additional Context

Slack convo in #hangops: https://hangops.slack.com/archives/C0Z93TPFX/p1662060793011949?thread_ts=1662056311.323019&cid=C0Z93TPFX

References

No response

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