Code Monkey home page Code Monkey logo

aws-cicd-pipeline's People

Contributors

davoclock 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

Watchers

 avatar

aws-cicd-pipeline's Issues

Getting error Error: error configuring Terraform AWS Provider: failed to get shared config profile, xxxx

The build failing with error " Error: error configuring Terraform AWS Provider: failed to get shared config profile" and my terraform file has aws profile defined.

Variables with a default value.

variable "aws_profile" {
type = string
description = "The aws profile to be used"
default = "xxxx"
}

provider "aws" {
region = var.aws_region
profile = var.aws_profile

version = "3.46.0"

}

But the docker container having terraform lacks the same aws pfofile. How to fix this?

[Container] 2022/04/05 09:40:59 Waiting for agent ping

2 | [Container] 2022/04/05 09:41:01 Waiting for DOWNLOAD_SOURCE
3 | [Container] 2022/04/05 09:41:01 Phase is DOWNLOAD_SOURCE
4 | [Container] 2022/04/05 09:41:01 CODEBUILD_SRC_DIR=/codebuild/output/src831623222/src
5 | [Container] 2022/04/05 09:41:01 YAML location is /codebuild/readonly/buildspec.yml
6 | [Container] 2022/04/05 09:41:01 Processing environment variables
7 | [Container] 2022/04/05 09:41:03 Moving to directory /codebuild/output/src831623222/src
8 | [Container] 2022/04/05 09:41:03 Registering with agent
9 | [Container] 2022/04/05 09:41:03 Phases found in YAML: 2
10 | [Container] 2022/04/05 09:41:03 PRE_BUILD: 2 commands
11 | [Container] 2022/04/05 09:41:03 BUILD: 1 commands
12 | [Container] 2022/04/05 09:41:03 Phase complete: DOWNLOAD_SOURCE State: SUCCEEDED
13 | [Container] 2022/04/05 09:41:03 Phase context status code: Message:
14 | [Container] 2022/04/05 09:41:03 Entering phase INSTALL
15 | [Container] 2022/04/05 09:41:03 Phase complete: INSTALL State: SUCCEEDED
16 | [Container] 2022/04/05 09:41:03 Phase context status code: Message:
17 | [Container] 2022/04/05 09:41:03 Entering phase PRE_BUILD
18 | [Container] 2022/04/05 09:41:03 Running command terraform init
19 |  
20 | Initializing the backend...
21 |  
22 | Initializing provider plugins...
23 | - Reusing previous version of hashicorp/template from the dependency lock file
24 | - Reusing previous version of hashicorp/aws from the dependency lock file
25 | - Installing hashicorp/template v2.2.0...
26 | - Installed hashicorp/template v2.2.0 (signed by HashiCorp)
27 | - Installing hashicorp/aws v4.8.0...
28 | - Installed hashicorp/aws v4.8.0 (signed by HashiCorp)
29 |  
30 | Terraform has made some changes to the provider dependency selections recorded
31 | in the .terraform.lock.hcl file. Review those changes and commit them to your
32 | version control system if they represent changes you intended to make.
33 |  
34 | Terraform has been successfully initialized!
35 |  
36 | You may now begin working with Terraform. Try running "terraform plan" to see
37 | any changes that are required for your infrastructure. All Terraform commands
38 | should now work.
39 |  
40 | If you ever set or change modules or backend configuration for Terraform,
41 | rerun this command to reinitialize your working directory. If you forget, other
42 | commands will detect it and remind you to do so if necessary.
43 |  
44 | [Container] 2022/04/05 09:41:08 Running command terraform validate
45 | Success! The configuration is valid.
46 |  
47 |  
48 | [Container] 2022/04/05 09:41:10 Phase complete: PRE_BUILD State: SUCCEEDED
49 | [Container] 2022/04/05 09:41:10 Phase context status code: Message:
50 | [Container] 2022/04/05 09:41:10 Entering phase BUILD
51 | [Container] 2022/04/05 09:41:10 Running command terraform plan
52 | ╷
53 | │ Error: error configuring Terraform AWS Provider: failed to get shared config profile, xxx
54 | │
55 | │ with provider["registry.terraform.io/hashicorp/aws"],
56 | │ on main.tf line 13, in provider "aws":
57 | │ 13: provider "aws" {
58 | │

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.