provectus / swiss-army-kube

Swiss Army Kube (SAK) is an open-source IaC (Infrastructure as Code) collection of services for quick, easy, and controllable deployment of EKS Kubernetes clusters on Amazon for your projects.
https://provectus.github.io/
Apache License 2.0
147 stars 36 forks source link

Fix issue of incompatibility of vpc_module and aws_provider. #242

Open wallhided opened 1 year ago

wallhided commented 1 year ago

Describe the bug During execution "terraform apply" in examples/argocd we receive an error

 Warning: Argument is deprecated
│
│   with module.vpc.aws_eip.nat,
│   on .terraform/modules/vpc/main.tf line 929, in resource "aws_eip" "nat":
│  929:   vpc = true
│
│ use domain attribute instead
╵
╷
│ Error: Unsupported argument
│
│   on .terraform/modules/vpc/main.tf line 36, in resource "aws_vpc" "this":
│   36:   enable_classiclink               = var.enable_classiclink
│
│ An argument named "enable_classiclink" is not expected here.
╵
╷
│ Error: Unsupported argument
│
│   on .terraform/modules/vpc/main.tf line 37, in resource "aws_vpc" "this":
│   37:   enable_classiclink_dns_support   = var.enable_classiclink_dns_support
│
│ An argument named "enable_classiclink_dns_support" is not expected here.
╵
╷
│ Error: Unsupported argument
│
│   on .terraform/modules/vpc/main.tf line 1153, in resource "aws_default_vpc" "this":
│ 1153:   enable_classiclink   = var.default_vpc_enable_classiclink
│
│ An argument named "enable_classiclink" is not expected here.

Use version Terraform v1.3.7 on darwin_arm64

terraform aws provider == 5.5.0

To Reproduce Steps to reproduce the behavior:

  1. Go to examples/argocd
  2. Execute terraform init and terraform apply

Additional context The problem happened because of deprecation of classiclink in aws terraform provider version 5.0.0. The closest working version is 4.67.0, by using such version - problem disappears.

wallhided commented 1 year ago

The problem is actual for all folders under examples/