Skip to content

feat(packer): Allow passing in an instance_profile to packer #4278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 9, 2025

Conversation

bshelton229
Copy link
Contributor

@bshelton229 bshelton229 commented Nov 22, 2024

We ran into needing to pass a custom instance profile to packer in order to get AWS IAM credentials for pre-pulling some ECR images.

I noticed what I think was a missing instance_type override variable in the windows-core-2022 file. I'm not sure if that was an oversight, or if it was omitted for a reason. It's been a long time since I've been proficient in Windows, so I wasn't able to test that part of this very well.

Thanks so much for this project, this has been immensely beneficial for us.

@npalm npalm self-requested a review November 28, 2024 18:48
@npalm
Copy link
Member

npalm commented Dec 20, 2024

@bshelton229 can you check why the CI is failing please?

@bshelton229 bshelton229 force-pushed the ami-post-runner-install branch from 9ffd898 to cbf2ff4 Compare January 3, 2025 18:26
@bshelton229
Copy link
Contributor Author

@npalm thanks for taking a look. It looks like the shell provisioner can't take the empty concat([]). I was able to run the validator locally in codespaces. Unless you feel the custom_shell_commands_post_runner_install hook is valuable, I'm going to refactor this PR to only add the iam_instance_profile packer input. We're going to be able to use - https://github.com/philips-labs/terraform-aws-github-runner/pull/4263 to do what we were doing with the hook proposed here. We were using this to register our custom script in the /opt/actions-runner/.env file, and that's now directly possible.

@bshelton229 bshelton229 changed the title feat(packer): Allow passing in an instance_profile and custom shell scripts that run after the runner installation feat(packer): Allow passing in an instance_profile to packer Jan 3, 2025
@npalm npalm merged commit bb7346b into github-aws-runners:main Jan 9, 2025
2 checks passed
npalm pushed a commit that referenced this pull request Jan 9, 2025
🤖 I have created a release *beep* *boop*
---


##
[6.1.0](philips-labs/terraform-aws-github-runner@v6.0.1...v6.1.0)
(2025-01-09)


### Features

* **packer:** Allow passing in an instance_profile to packer
([#4278](https://github.com/philips-labs/terraform-aws-github-runner/issues/4278))
([bb7346b](philips-labs/terraform-aws-github-runner@bb7346b))


### Bug Fixes

* Disable interpolation of HEREDOC strings containing runner hook
scripts
([#4333](https://github.com/philips-labs/terraform-aws-github-runner/issues/4333))
([2622589](philips-labs/terraform-aws-github-runner@2622589))
* **lambda:** bump the aws group in /lambdas with 6 updates
([#4336](https://github.com/philips-labs/terraform-aws-github-runner/issues/4336))
([1282e11](philips-labs/terraform-aws-github-runner@1282e11))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: forest-releaser[bot] <80285352+forest-releaser[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants