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

DOPS-101 Add trussworks bootstrap to devops example #64

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

akagr
Copy link

@akagr akagr commented Aug 31, 2022

Proposed Changes

After research, I've found https://github.com/trussworks/terraform-aws-bootstrap to be the easiest solution for bootstrapping Terraform projects. Using this module, we can add the bootstrap infrastructure to the repo and manage it going forward.

How it works

The bootstrap module has a local backend. We need to first apply the bootstrap module to generate the resources like S3 bucket, DynamoDB table etc.

These resources can then be used in the backend of main Terraform project.

✅ Add bootstrap project
✅ Updated README.md with new setup instructions for Terraform project
✅ Added the bootstrap state to the repo. This makes sure the terraform project is good to go without bootstrapping (if using default aliases and prefix)

akagr added 5 commits August 23, 2022 11:27
Updated README to point to bootstrap project for setting up terraform
backend.

Updated main terraform project's backend with the S3 and DynamoDB
tables generated using default bootstrap values.
This alias needs to match the one used in bootstrap project to use
correct names for S3 bucket and DynamoDB table.
We validate the backend in our CI and need the S3 and DynamoDB resources
to exist for that to pass.
Terraform does not allow interpolation of values in backend block.
This is because it executes backend way before other stuff.
@modus-jenkins
Copy link

Ran Plan for 2 projects:

  1. dir: terraform/bootstrap workspace: default
  2. dir: terraform workspace: default

1. dir: terraform/bootstrap workspace: default

Plan Error

Show Output
running "/usr/local/bin/terraform init -input=false" in "/home/atlantis/.atlantis/repos/ModusCreateOrg/devops-infra-demo/64/default/terraform/bootstrap": exit status 1
Initializing modules...
Downloading registry.terraform.io/trussworks/bootstrap/aws 3.0.0 for bootstrap...
- bootstrap in .terraform/modules/bootstrap
Downloading registry.terraform.io/trussworks/s3-private-bucket/aws 4.0.0 for bootstrap.terraform_state_bucket...
- bootstrap.terraform_state_bucket in .terraform/modules/bootstrap.terraform_state_bucket
Downloading registry.terraform.io/trussworks/logs/aws 13.0.0 for bootstrap.terraform_state_bucket_logs...
- bootstrap.terraform_state_bucket_logs in .terraform/modules/bootstrap.terraform_state_bucket_logs
╷
│ Error: Unsupported Terraform Core version
│ 
│   on main.tf line 9, in terraform:
│    9:   required_version = "~> 1.2.0"
│ 
│ This configuration does not support Terraform version 1.1.2. To proceed,
│ either choose another supported Terraform version or update this version
│ constraint. Version constraints are normally set for good reason, so
│ updating the constraint may lead to other errors or unexpected behavior.
╵



2. dir: terraform workspace: default

Plan Error

Show Output
running "/usr/local/bin/terraform init -input=false -upgrade" in "/home/atlantis/.atlantis/repos/ModusCreateOrg/devops-infra-demo/64/default/terraform": exit status 1
Upgrading modules...
Downloading registry.terraform.io/terraform-aws-modules/vpc/aws 1.73.0 for vpc...
- vpc in .terraform/modules/vpc
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.
╷
│ Warning: Version constraints inside provider configuration blocks are deprecated
│ 
│   on aws.tf line 6, in provider "aws":
│    6:   version = "~> 1.57"
│ 
│ Terraform 0.13 and earlier allowed provider version constraints inside the
│ provider configuration block, but that is now deprecated and will be
│ removed in a future version of Terraform. To silence this warning, move the
│ provider version constraint into the required_providers block.
│ 
│ (and 3 more similar warnings elsewhere)
╵

╷
│ Warning: Quoted references are deprecated
│ 
│   on codedeploy.tf line 36, in resource "aws_codedeploy_deployment_group" "infra-demo":
│   36:   depends_on            = ["aws_autoscaling_group.infra-demo-web-asg"]
│ 
│ In this context, references are expected literally rather than in quotes.
│ Terraform 0.11 and earlier required quotes, but quoted references are now
│ deprecated and will be removed in a future version of Terraform. Remove the
│ quotes surrounding this reference to silence this warning.
│ 
│ (and 3 more similar warnings elsewhere)
╵

╷
│ Error: Invalid quoted type constraints
│ 
│   on variables.tf line 95, in variable "newrelic_apm_entities":
│   95:   type        = "list"
│ 
│ Terraform 0.11 and earlier required type constraints to be given in quotes,
│ but that form is now deprecated and will be removed in a future version of
│ Terraform. Remove the quotes around "list" and write list(string) instead
│ to explicitly indicate that the list elements are strings.
╵

╷
│ Error: Invalid argument name
│ 
│   on vpc.tf line 26, in module "vpc":
│   26:     "Terraform"   = "true"
│ 
│ Argument names must not be quoted.
╵



  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply
  • 🚮 To delete all plans and locks for the PR, comment:
    • atlantis unlock

@modus-jenkins
Copy link

Ran Plan for 2 projects:

  1. dir: terraform/bootstrap workspace: default
  2. dir: terraform workspace: default

1. dir: terraform/bootstrap workspace: default

Plan Error

Show Output
running "/usr/local/bin/terraform init -input=false" in "/home/atlantis/.atlantis/repos/ModusCreateOrg/devops-infra-demo/64/default/terraform/bootstrap": exit status 1
Initializing modules...
Downloading registry.terraform.io/trussworks/bootstrap/aws 3.0.0 for bootstrap...
- bootstrap in .terraform/modules/bootstrap
Downloading registry.terraform.io/trussworks/s3-private-bucket/aws 4.0.0 for bootstrap.terraform_state_bucket...
- bootstrap.terraform_state_bucket in .terraform/modules/bootstrap.terraform_state_bucket
Downloading registry.terraform.io/trussworks/logs/aws 13.0.0 for bootstrap.terraform_state_bucket_logs...
- bootstrap.terraform_state_bucket_logs in .terraform/modules/bootstrap.terraform_state_bucket_logs
╷
│ Error: Unsupported Terraform Core version
│ 
│   on main.tf line 9, in terraform:
│    9:   required_version = "~> 1.2.0"
│ 
│ This configuration does not support Terraform version 1.1.2. To proceed,
│ either choose another supported Terraform version or update this version
│ constraint. Version constraints are normally set for good reason, so
│ updating the constraint may lead to other errors or unexpected behavior.
╵



2. dir: terraform workspace: default

Plan Error

Show Output
running "/usr/local/bin/terraform init -input=false -upgrade" in "/home/atlantis/.atlantis/repos/ModusCreateOrg/devops-infra-demo/64/default/terraform": exit status 1
Upgrading modules...
Downloading registry.terraform.io/terraform-aws-modules/vpc/aws 1.73.0 for vpc...
- vpc in .terraform/modules/vpc
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.
╷
│ Warning: Version constraints inside provider configuration blocks are deprecated
│ 
│   on aws.tf line 6, in provider "aws":
│    6:   version = "~> 1.57"
│ 
│ Terraform 0.13 and earlier allowed provider version constraints inside the
│ provider configuration block, but that is now deprecated and will be
│ removed in a future version of Terraform. To silence this warning, move the
│ provider version constraint into the required_providers block.
│ 
│ (and 3 more similar warnings elsewhere)
╵

╷
│ Warning: Quoted references are deprecated
│ 
│   on codedeploy.tf line 36, in resource "aws_codedeploy_deployment_group" "infra-demo":
│   36:   depends_on            = ["aws_autoscaling_group.infra-demo-web-asg"]
│ 
│ In this context, references are expected literally rather than in quotes.
│ Terraform 0.11 and earlier required quotes, but quoted references are now
│ deprecated and will be removed in a future version of Terraform. Remove the
│ quotes surrounding this reference to silence this warning.
│ 
│ (and 3 more similar warnings elsewhere)
╵

╷
│ Error: Invalid quoted type constraints
│ 
│   on variables.tf line 95, in variable "newrelic_apm_entities":
│   95:   type        = "list"
│ 
│ Terraform 0.11 and earlier required type constraints to be given in quotes,
│ but that form is now deprecated and will be removed in a future version of
│ Terraform. Remove the quotes around "list" and write list(string) instead
│ to explicitly indicate that the list elements are strings.
╵

╷
│ Error: Invalid argument name
│ 
│   on vpc.tf line 26, in module "vpc":
│   26:     "Terraform"   = "true"
│ 
│ Argument names must not be quoted.
╵



  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply
  • 🚮 To delete all plans and locks for the PR, comment:
    • atlantis unlock

Apparently, using variables without interpolation doesn't work with
older terraform versions. In this case, 0.11.7.
@modus-jenkins
Copy link

Ran Plan for 2 projects:

  1. dir: terraform/bootstrap workspace: default
  2. dir: terraform workspace: default

1. dir: terraform/bootstrap workspace: default

Plan Error

Show Output
running "/usr/local/bin/terraform init -input=false" in "/home/atlantis/.atlantis/repos/ModusCreateOrg/devops-infra-demo/64/default/terraform/bootstrap": exit status 1
Initializing modules...
Downloading registry.terraform.io/trussworks/bootstrap/aws 3.0.0 for bootstrap...
- bootstrap in .terraform/modules/bootstrap
Downloading registry.terraform.io/trussworks/s3-private-bucket/aws 4.0.0 for bootstrap.terraform_state_bucket...
- bootstrap.terraform_state_bucket in .terraform/modules/bootstrap.terraform_state_bucket
Downloading registry.terraform.io/trussworks/logs/aws 13.0.0 for bootstrap.terraform_state_bucket_logs...
- bootstrap.terraform_state_bucket_logs in .terraform/modules/bootstrap.terraform_state_bucket_logs
╷
│ Error: Unsupported Terraform Core version
│ 
│   on main.tf line 9, in terraform:
│    9:   required_version = "~> 1.2.0"
│ 
│ This configuration does not support Terraform version 1.1.2. To proceed,
│ either choose another supported Terraform version or update this version
│ constraint. Version constraints are normally set for good reason, so
│ updating the constraint may lead to other errors or unexpected behavior.
╵



2. dir: terraform workspace: default

Plan Error

Show Output
running "/usr/local/bin/terraform init -input=false -upgrade" in "/home/atlantis/.atlantis/repos/ModusCreateOrg/devops-infra-demo/64/default/terraform": exit status 1
Upgrading modules...
Downloading registry.terraform.io/terraform-aws-modules/vpc/aws 1.73.0 for vpc...
- vpc in .terraform/modules/vpc
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.
╷
│ Warning: Version constraints inside provider configuration blocks are deprecated
│ 
│   on aws.tf line 6, in provider "aws":
│    6:   version = "~> 1.57"
│ 
│ Terraform 0.13 and earlier allowed provider version constraints inside the
│ provider configuration block, but that is now deprecated and will be
│ removed in a future version of Terraform. To silence this warning, move the
│ provider version constraint into the required_providers block.
│ 
│ (and 3 more similar warnings elsewhere)
╵

╷
│ Warning: Quoted references are deprecated
│ 
│   on codedeploy.tf line 36, in resource "aws_codedeploy_deployment_group" "infra-demo":
│   36:   depends_on            = ["aws_autoscaling_group.infra-demo-web-asg"]
│ 
│ In this context, references are expected literally rather than in quotes.
│ Terraform 0.11 and earlier required quotes, but quoted references are now
│ deprecated and will be removed in a future version of Terraform. Remove the
│ quotes surrounding this reference to silence this warning.
│ 
│ (and 3 more similar warnings elsewhere)
╵

╷
│ Error: Invalid quoted type constraints
│ 
│   on variables.tf line 95, in variable "newrelic_apm_entities":
│   95:   type        = "list"
│ 
│ Terraform 0.11 and earlier required type constraints to be given in quotes,
│ but that form is now deprecated and will be removed in a future version of
│ Terraform. Remove the quotes around "list" and write list(string) instead
│ to explicitly indicate that the list elements are strings.
╵

╷
│ Error: Invalid argument name
│ 
│   on vpc.tf line 26, in module "vpc":
│   26:     "Terraform"   = "true"
│ 
│ Argument names must not be quoted.
╵



  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply
  • 🚮 To delete all plans and locks for the PR, comment:
    • atlantis unlock

@modus-jenkins
Copy link

Ran Plan for 2 projects:

  1. dir: terraform/bootstrap workspace: default
  2. dir: terraform workspace: default

1. dir: terraform/bootstrap workspace: default

Plan Error

Show Output
running "/usr/local/bin/terraform init -input=false" in "/home/atlantis/.atlantis/repos/ModusCreateOrg/devops-infra-demo/64/default/terraform/bootstrap": exit status 1
Initializing modules...
Downloading registry.terraform.io/trussworks/bootstrap/aws 3.0.0 for bootstrap...
- bootstrap in .terraform/modules/bootstrap
Downloading registry.terraform.io/trussworks/s3-private-bucket/aws 4.0.0 for bootstrap.terraform_state_bucket...
- bootstrap.terraform_state_bucket in .terraform/modules/bootstrap.terraform_state_bucket
Downloading registry.terraform.io/trussworks/logs/aws 13.0.0 for bootstrap.terraform_state_bucket_logs...
- bootstrap.terraform_state_bucket_logs in .terraform/modules/bootstrap.terraform_state_bucket_logs
╷
│ Error: Unsupported Terraform Core version
│ 
│   on main.tf line 9, in terraform:
│    9:   required_version = "~> 1.2.0"
│ 
│ This configuration does not support Terraform version 1.1.2. To proceed,
│ either choose another supported Terraform version or update this version
│ constraint. Version constraints are normally set for good reason, so
│ updating the constraint may lead to other errors or unexpected behavior.
╵



2. dir: terraform workspace: default

Plan Error

Show Output
running "/usr/local/bin/terraform init -input=false -upgrade" in "/home/atlantis/.atlantis/repos/ModusCreateOrg/devops-infra-demo/64/default/terraform": exit status 1
Upgrading modules...
Downloading registry.terraform.io/terraform-aws-modules/vpc/aws 1.73.0 for vpc...
- vpc in .terraform/modules/vpc
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.
╷
│ Warning: Version constraints inside provider configuration blocks are deprecated
│ 
│   on aws.tf line 6, in provider "aws":
│    6:   version = "~> 1.57"
│ 
│ Terraform 0.13 and earlier allowed provider version constraints inside the
│ provider configuration block, but that is now deprecated and will be
│ removed in a future version of Terraform. To silence this warning, move the
│ provider version constraint into the required_providers block.
│ 
│ (and 3 more similar warnings elsewhere)
╵

╷
│ Warning: Quoted references are deprecated
│ 
│   on codedeploy.tf line 36, in resource "aws_codedeploy_deployment_group" "infra-demo":
│   36:   depends_on            = ["aws_autoscaling_group.infra-demo-web-asg"]
│ 
│ In this context, references are expected literally rather than in quotes.
│ Terraform 0.11 and earlier required quotes, but quoted references are now
│ deprecated and will be removed in a future version of Terraform. Remove the
│ quotes surrounding this reference to silence this warning.
│ 
│ (and 3 more similar warnings elsewhere)
╵

╷
│ Error: Invalid quoted type constraints
│ 
│   on variables.tf line 95, in variable "newrelic_apm_entities":
│   95:   type        = "list"
│ 
│ Terraform 0.11 and earlier required type constraints to be given in quotes,
│ but that form is now deprecated and will be removed in a future version of
│ Terraform. Remove the quotes around "list" and write list(string) instead
│ to explicitly indicate that the list elements are strings.
╵

╷
│ Error: Invalid argument name
│ 
│   on vpc.tf line 26, in module "vpc":
│   26:     "Terraform"   = "true"
│ 
│ Argument names must not be quoted.
╵



  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply
  • 🚮 To delete all plans and locks for the PR, comment:
    • atlantis unlock

1 similar comment
@modus-jenkins
Copy link

Ran Plan for 2 projects:

  1. dir: terraform/bootstrap workspace: default
  2. dir: terraform workspace: default

1. dir: terraform/bootstrap workspace: default

Plan Error

Show Output
running "/usr/local/bin/terraform init -input=false" in "/home/atlantis/.atlantis/repos/ModusCreateOrg/devops-infra-demo/64/default/terraform/bootstrap": exit status 1
Initializing modules...
Downloading registry.terraform.io/trussworks/bootstrap/aws 3.0.0 for bootstrap...
- bootstrap in .terraform/modules/bootstrap
Downloading registry.terraform.io/trussworks/s3-private-bucket/aws 4.0.0 for bootstrap.terraform_state_bucket...
- bootstrap.terraform_state_bucket in .terraform/modules/bootstrap.terraform_state_bucket
Downloading registry.terraform.io/trussworks/logs/aws 13.0.0 for bootstrap.terraform_state_bucket_logs...
- bootstrap.terraform_state_bucket_logs in .terraform/modules/bootstrap.terraform_state_bucket_logs
╷
│ Error: Unsupported Terraform Core version
│ 
│   on main.tf line 9, in terraform:
│    9:   required_version = "~> 1.2.0"
│ 
│ This configuration does not support Terraform version 1.1.2. To proceed,
│ either choose another supported Terraform version or update this version
│ constraint. Version constraints are normally set for good reason, so
│ updating the constraint may lead to other errors or unexpected behavior.
╵



2. dir: terraform workspace: default

Plan Error

Show Output
running "/usr/local/bin/terraform init -input=false -upgrade" in "/home/atlantis/.atlantis/repos/ModusCreateOrg/devops-infra-demo/64/default/terraform": exit status 1
Upgrading modules...
Downloading registry.terraform.io/terraform-aws-modules/vpc/aws 1.73.0 for vpc...
- vpc in .terraform/modules/vpc
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.
╷
│ Warning: Version constraints inside provider configuration blocks are deprecated
│ 
│   on aws.tf line 6, in provider "aws":
│    6:   version = "~> 1.57"
│ 
│ Terraform 0.13 and earlier allowed provider version constraints inside the
│ provider configuration block, but that is now deprecated and will be
│ removed in a future version of Terraform. To silence this warning, move the
│ provider version constraint into the required_providers block.
│ 
│ (and 3 more similar warnings elsewhere)
╵

╷
│ Warning: Quoted references are deprecated
│ 
│   on codedeploy.tf line 36, in resource "aws_codedeploy_deployment_group" "infra-demo":
│   36:   depends_on            = ["aws_autoscaling_group.infra-demo-web-asg"]
│ 
│ In this context, references are expected literally rather than in quotes.
│ Terraform 0.11 and earlier required quotes, but quoted references are now
│ deprecated and will be removed in a future version of Terraform. Remove the
│ quotes surrounding this reference to silence this warning.
│ 
│ (and 3 more similar warnings elsewhere)
╵

╷
│ Error: Invalid quoted type constraints
│ 
│   on variables.tf line 95, in variable "newrelic_apm_entities":
│   95:   type        = "list"
│ 
│ Terraform 0.11 and earlier required type constraints to be given in quotes,
│ but that form is now deprecated and will be removed in a future version of
│ Terraform. Remove the quotes around "list" and write list(string) instead
│ to explicitly indicate that the list elements are strings.
╵

╷
│ Error: Invalid argument name
│ 
│   on vpc.tf line 26, in module "vpc":
│   26:     "Terraform"   = "true"
│ 
│ Argument names must not be quoted.
╵



  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply
  • 🚮 To delete all plans and locks for the PR, comment:
    • atlantis unlock

@modus-jenkins
Copy link

Ran Plan for 2 projects:

  1. dir: terraform/bootstrap workspace: default
  2. dir: terraform workspace: default

1. dir: terraform/bootstrap workspace: default

Plan Error

Show Output
running "/usr/local/bin/terraform init -input=false" in "/home/atlantis/.atlantis/repos/ModusCreateOrg/devops-infra-demo/64/default/terraform/bootstrap": exit status 1
Initializing modules...
Downloading registry.terraform.io/trussworks/bootstrap/aws 3.0.0 for bootstrap...
- bootstrap in .terraform/modules/bootstrap
Downloading registry.terraform.io/trussworks/s3-private-bucket/aws 4.0.0 for bootstrap.terraform_state_bucket...
- bootstrap.terraform_state_bucket in .terraform/modules/bootstrap.terraform_state_bucket
Downloading registry.terraform.io/trussworks/logs/aws 13.0.0 for bootstrap.terraform_state_bucket_logs...
- bootstrap.terraform_state_bucket_logs in .terraform/modules/bootstrap.terraform_state_bucket_logs
╷
│ Error: Unsupported Terraform Core version
│ 
│   on main.tf line 9, in terraform:
│    9:   required_version = "~> 1.2.0"
│ 
│ This configuration does not support Terraform version 1.1.2. To proceed,
│ either choose another supported Terraform version or update this version
│ constraint. Version constraints are normally set for good reason, so
│ updating the constraint may lead to other errors or unexpected behavior.
╵



2. dir: terraform workspace: default

Plan Error

Show Output
running "/usr/local/bin/terraform init -input=false -upgrade" in "/home/atlantis/.atlantis/repos/ModusCreateOrg/devops-infra-demo/64/default/terraform": exit status 1
Upgrading modules...
Downloading registry.terraform.io/terraform-aws-modules/vpc/aws 1.73.0 for vpc...
- vpc in .terraform/modules/vpc
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.
╷
│ Warning: Version constraints inside provider configuration blocks are deprecated
│ 
│   on aws.tf line 6, in provider "aws":
│    6:   version = "~> 1.57"
│ 
│ Terraform 0.13 and earlier allowed provider version constraints inside the
│ provider configuration block, but that is now deprecated and will be
│ removed in a future version of Terraform. To silence this warning, move the
│ provider version constraint into the required_providers block.
│ 
│ (and 3 more similar warnings elsewhere)
╵

╷
│ Warning: Quoted references are deprecated
│ 
│   on codedeploy.tf line 36, in resource "aws_codedeploy_deployment_group" "infra-demo":
│   36:   depends_on            = ["aws_autoscaling_group.infra-demo-web-asg"]
│ 
│ In this context, references are expected literally rather than in quotes.
│ Terraform 0.11 and earlier required quotes, but quoted references are now
│ deprecated and will be removed in a future version of Terraform. Remove the
│ quotes surrounding this reference to silence this warning.
│ 
│ (and 3 more similar warnings elsewhere)
╵

╷
│ Error: Invalid quoted type constraints
│ 
│   on variables.tf line 95, in variable "newrelic_apm_entities":
│   95:   type        = "list"
│ 
│ Terraform 0.11 and earlier required type constraints to be given in quotes,
│ but that form is now deprecated and will be removed in a future version of
│ Terraform. Remove the quotes around "list" and write list(string) instead
│ to explicitly indicate that the list elements are strings.
╵

╷
│ Error: Invalid argument name
│ 
│   on vpc.tf line 26, in module "vpc":
│   26:     "Terraform"   = "true"
│ 
│ Argument names must not be quoted.
╵



  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply
  • 🚮 To delete all plans and locks for the PR, comment:
    • atlantis unlock

Use the same versions of terraform and aws provider in bootstrap
as the main project. This avoids any tricky version mismatch.

TODO Update terraform and aws to latest
@modus-jenkins
Copy link

Ran Plan for 2 projects:

  1. dir: terraform/bootstrap workspace: default
  2. dir: terraform workspace: default

1. dir: terraform/bootstrap workspace: default

Plan Error

Show Output
running "/usr/local/bin/terraform init -input=false" in "/home/atlantis/.atlantis/repos/ModusCreateOrg/devops-infra-demo/64/default/terraform/bootstrap": exit status 1
Initializing modules...
Downloading registry.terraform.io/trussworks/bootstrap/aws 3.0.0 for bootstrap...
- bootstrap in .terraform/modules/bootstrap
Downloading registry.terraform.io/trussworks/s3-private-bucket/aws 4.0.0 for bootstrap.terraform_state_bucket...
- bootstrap.terraform_state_bucket in .terraform/modules/bootstrap.terraform_state_bucket
Downloading registry.terraform.io/trussworks/logs/aws 13.0.0 for bootstrap.terraform_state_bucket_logs...
- bootstrap.terraform_state_bucket_logs in .terraform/modules/bootstrap.terraform_state_bucket_logs

Initializing the backend...

Initializing provider plugins...
- Reusing previous version of hashicorp/aws from the dependency lock file
╷
│ Error: Failed to query available provider packages
│ 
│ Could not retrieve the list of available versions for provider
│ hashicorp/aws: locked provider registry.terraform.io/hashicorp/aws 4.27.0
│ does not match configured version constraint ~> 1.57, >= 3.75.0; must use
│ terraform init -upgrade to allow selection of new versions
╵



2. dir: terraform workspace: default

Plan Error

Show Output
running "/usr/local/bin/terraform init -input=false -upgrade" in "/home/atlantis/.atlantis/repos/ModusCreateOrg/devops-infra-demo/64/default/terraform": exit status 1
Upgrading modules...
Downloading registry.terraform.io/terraform-aws-modules/vpc/aws 1.73.0 for vpc...
- vpc in .terraform/modules/vpc
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.
╷
│ Warning: Version constraints inside provider configuration blocks are deprecated
│ 
│   on aws.tf line 6, in provider "aws":
│    6:   version = "~> 1.57"
│ 
│ Terraform 0.13 and earlier allowed provider version constraints inside the
│ provider configuration block, but that is now deprecated and will be
│ removed in a future version of Terraform. To silence this warning, move the
│ provider version constraint into the required_providers block.
│ 
│ (and 3 more similar warnings elsewhere)
╵

╷
│ Warning: Quoted references are deprecated
│ 
│   on codedeploy.tf line 36, in resource "aws_codedeploy_deployment_group" "infra-demo":
│   36:   depends_on            = ["aws_autoscaling_group.infra-demo-web-asg"]
│ 
│ In this context, references are expected literally rather than in quotes.
│ Terraform 0.11 and earlier required quotes, but quoted references are now
│ deprecated and will be removed in a future version of Terraform. Remove the
│ quotes surrounding this reference to silence this warning.
│ 
│ (and 3 more similar warnings elsewhere)
╵

╷
│ Error: Invalid quoted type constraints
│ 
│   on variables.tf line 95, in variable "newrelic_apm_entities":
│   95:   type        = "list"
│ 
│ Terraform 0.11 and earlier required type constraints to be given in quotes,
│ but that form is now deprecated and will be removed in a future version of
│ Terraform. Remove the quotes around "list" and write list(string) instead
│ to explicitly indicate that the list elements are strings.
╵

╷
│ Error: Invalid argument name
│ 
│   on vpc.tf line 26, in module "vpc":
│   26:     "Terraform"   = "true"
│ 
│ Argument names must not be quoted.
╵



  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply
  • 🚮 To delete all plans and locks for the PR, comment:
    • atlantis unlock

@modus-jenkins
Copy link

Ran Plan for dir: terraform workspace: default

Plan Error

Show Output
running "/usr/local/bin/terraform init -input=false -upgrade" in "/home/atlantis/.atlantis/repos/ModusCreateOrg/devops-infra-demo/64/default/terraform": exit status 1
Upgrading modules...
Downloading registry.terraform.io/terraform-aws-modules/vpc/aws 1.73.0 for vpc...
- vpc in .terraform/modules/vpc
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.
╷
│ Warning: Version constraints inside provider configuration blocks are deprecated
│ 
│   on aws.tf line 6, in provider "aws":
│    6:   version = "~> 1.57"
│ 
│ Terraform 0.13 and earlier allowed provider version constraints inside the
│ provider configuration block, but that is now deprecated and will be
│ removed in a future version of Terraform. To silence this warning, move the
│ provider version constraint into the required_providers block.
│ 
│ (and 3 more similar warnings elsewhere)
╵

╷
│ Warning: Quoted references are deprecated
│ 
│   on codedeploy.tf line 36, in resource "aws_codedeploy_deployment_group" "infra-demo":
│   36:   depends_on            = ["aws_autoscaling_group.infra-demo-web-asg"]
│ 
│ In this context, references are expected literally rather than in quotes.
│ Terraform 0.11 and earlier required quotes, but quoted references are now
│ deprecated and will be removed in a future version of Terraform. Remove the
│ quotes surrounding this reference to silence this warning.
│ 
│ (and 3 more similar warnings elsewhere)
╵

╷
│ Error: Invalid quoted type constraints
│ 
│   on variables.tf line 95, in variable "newrelic_apm_entities":
│   95:   type        = "list"
│ 
│ Terraform 0.11 and earlier required type constraints to be given in quotes,
│ but that form is now deprecated and will be removed in a future version of
│ Terraform. Remove the quotes around "list" and write list(string) instead
│ to explicitly indicate that the list elements are strings.
╵

╷
│ Error: Invalid argument name
│ 
│   on vpc.tf line 26, in module "vpc":
│   26:     "Terraform"   = "true"
│ 
│ Argument names must not be quoted.
╵


@modus-jenkins
Copy link

Ran Plan for dir: terraform workspace: default

Plan Error

running "/home/atlantis/.atlantis/bin/terraform0.11.7 init -input=false -upgrade" in "/home/atlantis/.atlantis/repos/ModusCreateOrg/devops-infra-demo/64/default/terraform": exit status 1
Upgrading modules...
- module.vpc
  Found version 1.73.0 of terraform-aws-modules/vpc/aws on registry.terraform.io
  Updating source "terraform-aws-modules/vpc/aws"

Initializing the backend...

Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.
Error loading state: AccessDenied: Access Denied
	status code: 403, request id: GCQ6QP95YA6Z8XNT, host id: 0cgCF7ZmJ9dgI2BmbRAk7wf5GDni4ZJKGu55OEUk4cgkuPi9aq3TdyiyYt/2OWpZBM2h/8QNTA4=

@modus-jenkins
Copy link

Ran Plan for dir: terraform workspace: default

Plan Error

running "/home/atlantis/.atlantis/bin/terraform0.11.7 init -input=false -upgrade" in "/home/atlantis/.atlantis/repos/ModusCreateOrg/devops-infra-demo/64/default/terraform": exit status 1
Upgrading modules...
- module.vpc
  Found version 1.73.0 of terraform-aws-modules/vpc/aws on registry.terraform.io
  Updating source "terraform-aws-modules/vpc/aws"

Initializing the backend...

Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.
Error loading state: AccessDenied: Access Denied
	status code: 403, request id: EX42KVYD99ZVHMZK, host id: 7pEpMhLMA2uouosVkxbmcvHoRzXCFnpQjme+qbog4hwDjvuWEIc5kvyI28WrPW30y/WV8QN/fC4=

@modus-jenkins
Copy link

Ran Plan for dir: terraform workspace: default

Plan Error

Show Output
running "/home/atlantis/.atlantis/bin/terraform0.11.7 init -input=false -upgrade" in "/home/atlantis/.atlantis/repos/ModusCreateOrg/devops-infra-demo/64/default/terraform": exit status 1
Upgrading modules...
- module.vpc
  Found version 1.73.0 of terraform-aws-modules/vpc/aws on registry.terraform.io
  Updating source "terraform-aws-modules/vpc/aws"

Initializing the backend...

Error configuring the backend "s3": The role "arn:aws:iam::587267277416:role/terraform_sandbox_backend_admin" cannot be assumed.

  There are a number of possible causes of this - the most common are:
    * The credentials used in order to assume the role are invalid
    * The credentials do not have appropriate permission to assume the role
    * The role ARN is not valid

Please update the configuration in your Terraform files to fix this error
then run this command again.


@modus-jenkins
Copy link

Ran Plan for dir: terraform workspace: default

Plan Error

Show Output
running "/home/atlantis/.atlantis/bin/terraform0.11.7 init -input=false -upgrade" in "/home/atlantis/.atlantis/repos/ModusCreateOrg/devops-infra-demo/64/default/terraform": exit status 1
Upgrading modules...
- module.vpc
  Found version 1.73.0 of terraform-aws-modules/vpc/aws on registry.terraform.io
  Updating source "terraform-aws-modules/vpc/aws"

Initializing the backend...

Error configuring the backend "s3": The role "arn:aws:iam::587267277416:role/terraform_sandbox_backend_admin" cannot be assumed.

  There are a number of possible causes of this - the most common are:
    * The credentials used in order to assume the role are invalid
    * The credentials do not have appropriate permission to assume the role
    * The role ARN is not valid

Please update the configuration in your Terraform files to fix this error
then run this command again.


@akagr akagr force-pushed the feat/dops-101 branch 16 times, most recently from 09c4ac9 to 3acff5d Compare September 21, 2022 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants