How can I install and config aws in the hashicorp/terraform:latest image

I am trying to use Gitlab CI/CD pipeline to run ther IaC code into aws account, I am blocked by the aws cli config, while install aws cli v2 using curl I can not install the curl packages, I want to know what package management tool does this image use.

seems not need to install aws cli, once config the Gitlab CDCD pipeline variable AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}

AWS_SECRET_ACCESS_KEY, AWS_SECRET_ACCESS_KEY and AWS_SESSION_TOKEN

then there is no credentials issue

if you used a static access key, then AWS_SECRET_ACCESS_KEY and AWS_SECRET_ACCESS_KEY

are enough

In an ideal world, try to us OIDC vs. static credentials if at all possible.

The use case for us is our cloudsops team want to use terraform as the automation tool to provision large number of iam objects as well as security group rules, and just use the cicd pipeline to avoide high cost in HCP. so now the GitLab pipeline variables config for AWS_SECRET_ACCESS_KEY, AWS_SECRET_ACCESS_KEY and AWS_SESSION_TOKEN works good to me and may keep this simple as of now.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.