Closed joseapeinado closed 1 year ago
@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.
what
It fixes the bug #35 while enabling SSM access and passing an
instance_profile
value.why
When the
instance_profile
was provided andenable_ssm_access
was set to true, the resourceaws_iam_role_policy_attachment.ec2_ssm_access
tried to attach the managed policyAmazonSSMManagedInstanceCore
to a non existing rolebasic_instance_assume_role
, which is only created when theinstance_profile
is empty.references