Page MenuHomePhabricator

[terraform] Add missing Instance Profile resource
ClosedPublic

Authored by bartek on Aug 3 2023, 2:40 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 17, 3:50 AM
Unknown Object (File)
Sun, Nov 17, 3:50 AM
Unknown Object (File)
Sun, Nov 17, 3:48 AM
Unknown Object (File)
Sat, Nov 16, 11:28 PM
Unknown Object (File)
Thu, Nov 7, 9:55 PM
Unknown Object (File)
Thu, Nov 7, 9:12 PM
Unknown Object (File)
Mon, Nov 4, 4:44 AM
Unknown Object (File)
Oct 17 2024, 1:06 AM
Subscribers

Details

Summary

This stack resolves issues encountered when setting up fresh staging AWS account with Terraform.

When creating a fresh EC2 Autoscaling group, it turned out that "instance profile" isn't the same as "instance role". On Prod we created it using AWS Console, which automatically created the instance profile.
When creating it using terraform (AWS API in general), we need to create the instance profile separately and attach the role to it.

AWS Docs: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html

For production, imported the existing instance profile resource using terraform import.

Depends on D8715.

Test Plan

Terraform apply on staging finally was able to create an autoscaling group. Terraform plan on prod shows no changes.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage