p0ssuidao / terraguard Goto Github PK
View Code? Open in Web Editor NEW🛡️ 🔒 This project's goal is to be simple to create and destroy your own VPN service using WireGuard.
🛡️ 🔒 This project's goal is to be simple to create and destroy your own VPN service using WireGuard.
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:
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "3.50.0"
}
}
}
provider "aws" {
region = var.region
shared_credentials_file = "//.aws/credentials"
profile = ""
}
$ 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...
Initializing the backend...
Initializing provider plugins...
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.
$ 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.
$ 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" {
│
╵
$ aws s3 ls --profile --region sa-east-1
2021-06-10 15:38:44 cf-templates-heobifcgwdf0-us-east-1
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]
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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.