Skip to content

Instantly share code, notes, and snippets.

@mrcrilly
Created March 20, 2023 04:35
Show Gist options
  • Save mrcrilly/e25ed573c31859ed040e07c8a7e25aa6 to your computer and use it in GitHub Desktop.
Save mrcrilly/e25ed573c31859ed040e07c8a7e25aa6 to your computer and use it in GitHub Desktop.
Gayan's TF
$ terraform init
Initializing the backend...
There are some problems with the configuration, described below.
The Terraform configuration must be valid before initialization so that
Terraform can determine which modules and providers need to be installed.
│ Error: Duplicate resource "aws_lb_target_group" configuration
│ on alb_eip.tf line 72:
│ 72: resource "aws_lb_target_group" "my_target_group" {
│ A aws_lb_target_group resource named "my_target_group" was already declared at alb_acm.tf:27,1-49. Resource names must be unique per type in each module.
│ Error: Unsupported argument
│ on alb_eip.tf line 110:
│ 110: depends_on = [aws_eip.wordpress_eip]
│ An argument named "depends_on" is not expected here.
│ Error: Unsupported block type
│ on alb_eip.tf line 114:
│ 114: default_action {
│ Blocks of type "default_action" are not expected here.
│ Error: Unsupported block type
│ on alb_eip.tf line 117:
│ 117: redirect {
│ Blocks of type "redirect" are not expected here.
│ Error: Unsupported argument
│ on alb_eip.tf line 122:
│ 122: target_group_arn = "arn:aws:ec2:::eip/$"
│ An argument named "target_group_arn" is not expected here.
│ Error: Duplicate resource "aws_acm_certificate" configuration
│ on alb_eip.tf line 140:
│ 140: resource "aws_acm_certificate" "cert" {
│ A aws_acm_certificate resource named "cert" was already declared at alb_eip.tf:126,5-42. Resource names must be unique per type in each module.
│ Error: Duplicate provider configuration
│ on main.tf line 12:
│ 12: provider "aws" {
│ A default (non-aliased) provider configuration for "aws" was already given at alb_acm.tf:1,1-15. If multiple configurations are required, set the "alias" argument for alternative
│ configurations.
│ Error: Duplicate resource "aws_lb_listener" configuration
│ on main.tf line 268:
│ 268: resource "aws_lb_listener" "alb_http_listener" {
│ A aws_lb_listener resource named "alb_http_listener" was already declared at alb_eip.tf:35,1-47. Resource names must be unique per type in each module.
│ Error: Duplicate resource "aws_lb_listener" configuration
│ on main.tf line 287:
│ 287: resource "aws_lb_listener" "alb_https_listener" {
│ A aws_lb_listener resource named "alb_https_listener" was already declared at alb_eip.tf:54,1-48. Resource names must be unique per type in each module.
│ Error: Duplicate resource "aws_lb_listener" configuration
│ on main.tf line 330:
│ 330: resource "aws_lb_listener" "my_listener" {
│ A aws_lb_listener resource named "my_listener" was already declared at alb_eip.tf:96,1-41. Resource names must be unique per type in each module.
│ Error: Duplicate resource "aws_acm_certificate" configuration
│ on main.tf line 342:
│ 342: resource "aws_acm_certificate" "cert" {
│ A aws_acm_certificate resource named "cert" was already declared at alb_eip.tf:126,5-42. Resource names must be unique per type in each module.
│ Error: Duplicate resource "aws_route53_record" configuration
│ on main.tf line 357:
│ 357: resource "aws_route53_record" "cert" {
│ A aws_route53_record resource named "cert" was already declared at alb_eip.tf:149,1-37. Resource names must be unique per type in each module.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment