importing Packaged module in gitlab

#381
Raw
Author
Anonymous
Created
Sept. 6, 2021, 2:47 p.m.
Expires
Never
Size
781 bytes
Hits
49
Syntax
YAML
stages:          # List of stages for jobs, and their order of execution
  - build

build-job:       # This job runs in the build stage, which runs first.
  stage: build
  image:
    name: hashicorp/terraform:light
    entrypoint:
      - '/usr/bin/env'
      - 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
  variables:
    AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
    AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
    AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
  before_script:
    - mkdir terra && cd terra
    - 'wget --header="JOB-TOKEN: $CI_JOB_TOKEN" ${CI_API_V4_URL}/projects/29353513/packages/generic/module/0.0.1/module.tar.gz'
    - tar -xf module.tar.gz
    - cd ..
  script:
    - terraform init
    - terraform plan