Code Monkey home page Code Monkey logo

awsterraformstarterkit's People

Contributors

arongate avatar fabgaubert avatar osaluden avatar smasset-orange avatar tlecorre-orange avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

awsterraformstarterkit's Issues

Allow configurable project root dir

We are using terraform starterkit in an example project in the sub folder of a project. Yes, a kind of subproject.
The project is a module development.
The subprojet uses module located outside the subproject dire but inside some parent folder of the subproject.

.
├── example
│   ├── terraform
│   │   └── test
│   │           └── main.tf
│   ├── configure.yaml
│   ├── docker-compose-tools.yml
│   ├── docker-compose.yml
│   ├── get-starter-kit.sh
│   ├── Makefile
│   └── remove-starter-kit.sh
├── main.tf
├── variables.tf
└── versions.tf

At the moment, there's no way to configure the starterkit docker container to mount the entire project folder and not only the example folder.

The content of example/terraform/test/main.tf.

module "this" {
  source = "../../../"

  ...
}
...

Use .gitlab-ci dotenv to pass credentials between stages

Gilab provides dotenv handling between jobs using artifacts and dependencies keywords in a CICD pipeline code. It looks like following

my_job:
  stage: build
  script:
    - echo "ENV_VAR=content" >> .env
  artifacts:
    reports:
      dotenv: .env

anotherjob:
  stage: deploy
  script:
    - echo $ENV_VAR
  dependencies:
    - job: my_job
      artifacts: true

Newbee vision

my install test by newbee !!!!

  1. On readme in home, there is not link to install doc :)
  2. In step 4 https://github.com/Orange-OpenSource/AWSTerraformStarterKit/blob/master/docs/installation.md?plain=1#L126
    why is need to use : AWS_DEFAULT_REGION
    could is possible to use : AWS_SESSION_TOKEN

after my "make start"

## Start the AWSTerraformStarterKit

who I can teste and use ?

 => => exporting layers                                                                                                                                               0.8s
 => => writing image sha256:be297fa0b955ab00dbd3fd17e6f1de5fd9044fa00c70fd120403beaad879a32b                                                                          0.0s
 => => naming to docker.io/library/tfenv:3.0.0                                                                                                                        0.0s
[+] Running 1/1
 ✔ Container starterkit_terraform  Started                                                                                                                            0.1s
# docker compose -f docker-compose.yml exec terraform apk add --no-cache python3 py3-pip
guillaume@docker:~/GIT/WSTerraformStarterKit_demo (master)$ docker compose -f docker-compose.yml exec terraform apk add --no-cache python3 py3-pip
ERROR: Unable to lock database: Permission denied
ERROR: Failed to open apk database: Permission denied
guillaume@docker:~/GIT/WSTerraformStarterKit_demo (master)$ ls -l
total 52
drwxrwx--- 1 root vboxsf  4096 déc.   8 09:58 automation
-rwxrwx--- 1 root vboxsf  4733 janv.  5 17:15 configure.yaml
-rwxrwx--- 1 root vboxsf  4733 déc.   8 09:58 configure.yaml.dist
-rwxrwx--- 1 root vboxsf  3863 déc.   8 09:58 docker-compose-tools.yml
-rwxrwx--- 1 root vboxsf   744 déc.   8 09:58 docker-compose.yml
-rwxrwx--- 1 root vboxsf  1991 janv.  5 10:31 get-starter-kit.sh
-rwxrwx--- 1 root vboxsf 14341 janv.  5 17:21 Makefile
-rwxrwx--- 1 root vboxsf  2383 janv.  5 17:21 makeplan.mk
drwxrwx--- 1 root vboxsf     0 janv.  5 10:31 terraform
guillaume@docker:~/GIT/WSTerraformStarterKit_demo (master)$ docker ps
CONTAINER ID   IMAGE         COMMAND               CREATED              STATUS              PORTS     NAMES
3ae0305c3d63   tfenv:3.0.0   "tail -f /dev/null"   About a minute ago   Up About a minute             starterkit_terraform
guillaume@docker:~/GIT/WSTerraformStarterKit_demo (master)$
guillaume@docker:~/GIT/WSTerraformStarterKit_demo (master)$

Add StarterKit Version number

In get-starter-kit.sh add a way to get and store the version download in a file located at the root of the project

[enhancement] Provide override machanism for dev tools config files

The terraform starterkit uses default config file available on the public remote repository. Users may want (I do) to use their own tool configuration file. For example, there's no solution to use our own custom terraform-docs configuration.

This isssue ie a feature request for a mechanism to override config file for the following tools:

  • terrascan
  • terraform-docs
  • tflint
  • markdown lint
  • trivy
  • yamllint
  • shellcheck
  • pre-commit-config

Terrascan command fails because of bad config

Terrascan target in makefile runs the following commands
$(TERRASCAN_RUN) scan -i terraform --verbose --config-path=./.terrascan_config.toml {% for plan_name in plans_install %} --iac-dir={{ plan_name }} {% endfor %}

the --config-path value is incorrect. must set --config-path=.config/.terrascan_config.toml.

Documentation Improvement

Must mention the fact that this starterkit is depends on Gitlab.

I think these points are missing

  • A Gitlab instance as a requirement
  • Clearly state that this starterkit code must be downloaded or copied to a Dedicated Gitlab project, the project must then be Released and the correct asset produced (The "How To Guide" on how to acheive this must also be documented) and only after that the get-starter-kit.sh script could be run
  • Clearly mention that the value of GITLAB_TOKEN must be a Project Access Token for the Dedicated Gitlab Project for Starterkit created before with api and read_api scope permission.

[enhancement] Can we add git-secrets DevSecOps Tools to prevent secrets leaks

git-secrets scan commit messages and files to detect senstive information. Add it as pre-commit hooks(?).
The idea here is to use git-secrets to prevent secrets leak.
Can be added as a merge-request validation job which prevent pull request with senstive information to be merged into the main branch for example.
More possibilities to explore here.

compare configuration failing because of wrong workdir

the compare_configuration action run from a container with a default non configurable wokdir set to /workdir set in the built Dockerfile.
Workdir must be configured dynamicaly using PROJECT_ROOT_DIR and PROJECT_DIR variables.

ExternalId

Some IAM roles require an ExternalId to be assumed. The externalId cannot be store in git.

Optimize .gitlab-ci build

  • configure plugin cache directory with "terraform rc"
  • use gitlab job caches to allow reuse of terraform local cache made from first init
  • modify validate, plan, install (apply), destroy to not perform init again but only the intended operation. (Atomicity)

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.