I would like to run a GitLab pipeline that manages AWS infrastructure via Terraform.
In order to Authenticate to AWS I need to use Multi Factor Authentication (MFA). But GitLab does not support any on demand authentication per pipeline run...
How should I proceed here?
I can only imagine that before a run of the pipeline, will MFA authenticate from the command line and set via Gitlab API the following pipeline variables with
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_SESSION_TOKEN
and then I would run the pipeline.
I looked also into HC Vault, but I have not found any MFA solution. Only "more" secure pipeline variables.
I look forward for your suggestions.
Best regards, Andrej