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

Argument is deprecated - "vpc = true" in resource aws_eip nat #943

Closed
rickardosmith opened this issue May 30, 2023 · 3 comments
Closed

Argument is deprecated - "vpc = true" in resource aws_eip nat #943

rickardosmith opened this issue May 30, 2023 · 3 comments

Comments

@rickardosmith
Copy link

Description

Got the following warning using vpc module version 4.0.2

│ Warning: Argument is deprecated
│ 
│   with module.vpc.aws_eip.nat,
│   on .terraform/modules/vpc/main.tf line 1044, in resource "aws_eip" "nat":
│ 1044:   vpc = true
│ 
│ use domain attribute instead
│ 
│ (and 2 more similar warnings elsewhere)
  • [✅] I have searched the open/closed issues and my issue is not listed.

Versions

  • Module version [Required]: 4.0.2

  • Terraform version:
    Terraform v1.4.5
    on darwin_amd64

  • Provider version(s):

  • provider registry.terraform.io/gavinbunney/kubectl v1.14.0
  • provider registry.terraform.io/hashicorp/archive v2.3.0
  • provider registry.terraform.io/hashicorp/aws v5.0.1
  • provider registry.terraform.io/hashicorp/cloudinit v2.3.2
  • provider registry.terraform.io/hashicorp/external v2.3.1
  • provider registry.terraform.io/hashicorp/helm v2.7.1
  • provider registry.terraform.io/hashicorp/kubernetes v2.19.0
  • provider registry.terraform.io/hashicorp/null v3.2.1
  • provider registry.terraform.io/hashicorp/random v3.4.3
  • provider registry.terraform.io/hashicorp/time v0.9.1
  • provider registry.terraform.io/hashicorp/tls v4.0.4
  • provider registry.terraform.io/viktorradnai/bcrypt v0.1.2

Reproduction Code [Required]

Steps to reproduce the behaviour:

Sample file: vpc.tf

terraform {
  required_version = ">= 1.3.0"

  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = ">=4.32.0"
    }
  }
}

data "aws_availability_zones" "available" {
  state = "available"
}

module "vpc" {
  source  = "terraform-aws-modules/vpc/aws"
  version = "4.0.2"

  name = "bug-test"
  cidr = "10.0.0.0/16"

  azs = [ data.aws_availability_zones.available.names[0], data.aws_availability_zones.available.names[1] ]

  private_subnets = ["10.0.1.0/24", "10.0.2.0/24"]
  public_subnets  = ["10.0.101.0/24", "10.0.102.0/24"]

  enable_dns_hostnames = true
  enable_dns_support   = true

  enable_nat_gateway     = true
  single_nat_gateway     = true
  one_nat_gateway_per_az = false

  enable_vpn_gateway = false
}
  1. terraform init && terraform plan

Expected behaviour

No deprecated warnings.

Actual behaviour

│ Warning: Argument is deprecated
│ 
│   with module.vpc.aws_eip.nat,
│   on .terraform/modules/vpc/main.tf line 1044, in resource "aws_eip" "nat":
│ 1044:   vpc = true
│ 
│ use domain attribute instead
│ 
│ (and 2 more similar warnings elsewhere)

Other information

There's a note on the Provider's page: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eip#vpc

@khosro-copper
Copy link

Correct. I get the same error. Just to add more context here: This started to happen when you use the latest hashicorp/aws v5.0.1 provider. It goes away when you use version 4 of aws provider. Please update the module to be compatible with version 5 as well. Thanks!

 Warning: Argument is deprecated
│
│   with aws_eip.nat,
│   on main.tf line 1044, in resource "aws_eip" "nat":
│ 1044:   vpc = true
│
│ use domain attribute instead
│
│ (and 3 more similar warnings elsewhere)

@bryantbiggs
Copy link
Member

closed in #941

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants