Giter VIP home page Giter VIP logo

terraguard's People

Contributors

carreirorco avatar nulldutra avatar omurilo avatar p0ssuidao avatar quantisan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terraguard's Issues

Problemas para Configurar - No valid credentials

Bom dia! Tudo bem? Espero que sim.

Estou com um problema para fazer funcionar. Rodo o terraform em container, possuo um arquivo .env com as minhas credenciais e também as tenho configurado no diretorio default (~/.aws). Entretanto, continuo tomando o mesmo erro de que não há configuração de credenciais válidas:

Alterações no main.tf

terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "3.50.0"
}
}
}

provider "aws" {
region = var.region
shared_credentials_file = "//.aws/credentials"
profile = ""
}

Terraform init

$ sudo make terraform-init
docker run --rm -v $PWD:/app -v $HOME/.ssh/:/root/.ssh/ -w /app/ -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e
AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY hashicorp/terraform:latest init -upgrade=true
Upgrading modules...

  • ec2 in modules/ec2
  • key in modules/key
  • sg in modules/sg

Initializing the backend...

Initializing provider plugins...

  • Finding latest version of hashicorp/local...
  • Finding latest version of hashicorp/time...
  • Finding latest version of hashicorp/null...
  • Finding latest version of hashicorp/tls...
  • Finding hashicorp/aws versions matching "3.50.0"...
  • Using previously-installed hashicorp/time v0.7.2
  • Using previously-installed hashicorp/null v3.1.0
  • Using previously-installed hashicorp/tls v3.1.0
  • Using previously-installed hashicorp/aws v3.50.0
  • Using previously-installed hashicorp/local v2.1.0

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

Terraform validate

$ sudo make terraform-validate
docker run --rm -v $PWD:/app -v $HOME/.ssh/:/root/.ssh/ -w /app/ -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e
AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY hashicorp/terraform:latest validate
Success! The configuration is valid.

Terraform plan

$ sudo make terraform-plan
docker run --rm -v $PWD:/app -v $HOME/.ssh/:/root/.ssh/ -w /app/ -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e
AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY hashicorp/terraform:latest plan -out=tfplan

│ Error: error configuring Terraform AWS Provider: no valid credential sources for Terraform AWS Provider found.

│ Please see https://registry.terraform.io/providers/hashicorp/aws
│ for more information about providing credentials.

│ Error: NoCredentialProviders: no valid providers in chain. Deprecated.
│ For verbose messaging see aws.Config.CredentialsChainVerboseErrors


│ with provider["registry.terraform.io/hashicorp/aws"],
│ on main.tf line 10, in provider "aws":
│ 10: provider "aws" {

Teste de acesso a aws usando as mesmas credenciais/profile configurados no .env

$ aws s3 ls --profile --region sa-east-1
2021-06-10 15:38:44 cf-templates-heobifcgwdf0-us-east-1

GCP More than 30 minutes - Still creating...

null_resource.ansible: Still creating... [23m51s elapsed]
null_resource.ansible: Still creating... [28m4s elapsed]
null_resource.ansible: Still creating... [29m20s elapsed]
null_resource.ansible: Still creating... [29m30s elapsed]
null_resource.ansible: Still creating... [29m40s elapsed]
null_resource.ansible: Still creating... [29m50s elapsed]
null_resource.ansible: Still creating... [30m0s elapsed]
null_resource.ansible: Still creating... [30m10s elapsed]
null_resource.ansible: Still creating... [30m20s elapsed]
null_resource.ansible: Still creating... [30m30s elapsed]
null_resource.ansible: Still creating... [30m40s elapsed]

Ansible error when -var "mobile=false"

OS: Linux archlinux 5.13.7-arch1-1 #1 SMP PREEMPT Sat, 31 Jul 2021 13:18:52 +0000 x86_64 GNU/Linux
Terraform: v1.0.3
Ansible: 2.11.3
Python: 3.9.6
Jinja: 3.0.1

Command:

sudo terraform apply -var "do_token=[REDACTED]"

Output:

TASK [client_install : Add Keys to a host holder] ****************************** fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'stdout'\n\nThe error appears to be in '/home/dnc/repos/terraguard/ansible/roles/client_install/tasks/main.yaml': line 51, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: \"Add Keys to a host holder\"\n  ^ here\n"}

Issue happens on DigitalOcean, Azure and AWS. (Didn´t test GCP yet, but probably as well)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.