0

So, I have a big terraform folder where I put all my work with terraform. In that terraform folder I have a terraform-project subfolder which is a structured terraform project with modules, environments, etc. I was wondering where should I put my buildspec.yml file so my aws_codebuild_project will see it. I tried putting it in the modules folder, on the same level as module folder and on the same level as terraform-project folder. This is how my terraform folder looks like.

The aws_codebuild_project looks like this and this.

I use the code build in environment like this.

When I run the pipeline, at build stage I always get this error.

Luke
  • 7
  • 3
  • How exactly do you use codebuild? What is your input source? How did you setup your codebuild project? – Marcin Sep 21 '21 at 07:28
  • I updated the post, I couldn't put pictures as comment. – Luke Sep 21 '21 at 07:38
  • Sadly the question is no clear. Can you describe, step by step, how anyone could reproduce the issue on their own? – Marcin Sep 21 '21 at 07:58
  • So all the modules creates a working pipeline which uses ecs blue/green deployment and deploys an image from an ecr repository when I use 'terraform apply' in one of my 3 environments. Each environment uses the folders from the 'modules' folder using the module resource. I added code build so I can do image scanning on the build stage. I want to know where should I put the buildspec.yml file so my aws_codebuild_project will see here. I know that the buildspec.yml file should be on root level, but in my structure I don't really know which one is the root. – Luke Sep 21 '21 at 08:05
  • In the environment folder I have 3 folders called dev, prod and qa where in the main.tf file I 'link' the folders from 'modules' folder using the aws module resource. – Luke Sep 21 '21 at 08:06

0 Answers0