Skip to content
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

Fix: enabling SSM access when a profile is passed #36

Merged
merged 7 commits into from
Sep 11, 2023

Conversation

joseapeinado
Copy link
Contributor

@joseapeinado joseapeinado commented Apr 17, 2023

what

It fixes the bug #35 while enabling SSM access and passing an instance_profile value.

why

When the instance_profile was provided and enable_ssm_access was set to true, the resource aws_iam_role_policy_attachment.ec2_ssm_access tried to attach the managed policy AmazonSSMManagedInstanceCore to a non existing role basic_instance_assume_role, which is only created when the instance_profile is empty.

references

@exequielrafaela exequielrafaela requested a review from a team April 17, 2023 21:49
@exequielrafaela exequielrafaela added bug Something isn't working patch labels Apr 17, 2023
@exequielrafaela
Copy link
Member

@joseapeinado The tests passed after the fix => https://app.circleci.com/pipelines/github/binbashar/terraform-aws-ec2-basic-layout/228/workflows/24e86786-6b3b-404a-a498-6069cbf15539/jobs/328 But I don't get why they're failing now. For this iteration I'll move forward and merge this PR and we can give it another try the next PR.

@exequielrafaela exequielrafaela merged commit 8fe4b2e into master Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug | Module failing when enabling SSM flag but passing external ec2 profile
2 participants