Shared: IAM
Module tạo IAM Role và Instance Profile dùng chung
Shared Moduleshared/modules/iam
Resources được tạo
| Resource | Mô tả |
|---|---|
| aws_iam_role.milu2_allow | IAM Role MILU2-AWS-ALLOW |
| aws_iam_instance_profile.milu2_allow | Instance Profile cho EC2 |
| aws_iam_role_policy_attachment.* | Attach các managed policies |
Permissions
Role được attach các permissions cần thiết cho EC2:
- S3 - Đọc/ghi buckets
- ECR - Pull images
- CloudWatch - Push metrics/logs
- SSM - Session Manager access
Thông tin
Stage module 15-iam chỉ đọc (data source) role này, không tạo mới.
existing Flag
existing_iam = true→ Skip, role đã tồn tạiexisting_iam = false→ Tạo mới
Outputs
| Tên | Mô tả |
|---|---|
| role_arn | ARN của IAM role |
| instance_profile_name | Tên instance profile |