aws-samples / amazon-ec2-gitlab-runner

This repository contains code to deploy and manage Gitlab Runners on Amazon EC2.
MIT No Attribution
58 stars 36 forks source link

Error: You must use a valid fully-formed launch template. Value for parameter iamInstanceProfile.arn is invalid. #16

Closed dreamiter closed 5 months ago

dreamiter commented 5 months ago

Did anyone encounter the same error while running ./deploy-runner.sh <properties-file> <region> <aws-profile> <stack-name>?

https://gitlab.presidio.com/presidio-data-science/devops/ec2-gitlab-runner#to-deploy-the-gitlab-runner-stack

Resource handler returned message: "You must use a valid fully-formed launch template. Value (arn:aws:iam::${AWS::AccountId}:instance-profile/GitlabRunnerRole) for parameter iamInstanceProfile.arn is invalid. Invalid IAM Instance Profile ARN (Service: AutoScaling, Status Code: 400, Request ID: f64c0ed7-f166-4d25-a39d-2c129a9570a6)" (RequestToken: 0d3985ce-5a1f-f78e-ce85-fd92bb46d496, HandlerErrorCode: InvalidRequest)

Notes:

dreamiter commented 5 months ago

OK, looks like the DependsOn: GitlabRunnerRole attribute is deprecated. I was able to fix the issue by first deploying and creating the GitlabRunnerRole and InstanceProfile