Skip to content

Commit

Permalink
fix: Complete ECS Example - IAM Role not configured in ASG
Browse files Browse the repository at this point in the history
The Complete ECS Example don't work. Don't configure the IAM Role in ASG.

This is because the example uses launch configuration and the variable iam_instance_profile_arn.
The variable iam_instance_profile_arn should be use with launch template.
With launch configurations should use the variable iam_instance_profile_name.

fixes #42
  • Loading branch information
mkostrikin committed Jun 23, 2021
1 parent e71b981 commit 4e19ce8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/complete-ecs/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ module "asg" {
use_lc = true
create_lc = true

image_id = data.aws_ami.amazon_linux_ecs.id
instance_type = "t2.micro"
security_groups = [module.vpc.default_security_group_id]
iam_instance_profile_arn = module.ec2_profile.iam_instance_profile_arn
user_data = data.template_file.user_data.rendered
image_id = data.aws_ami.amazon_linux_ecs.id
instance_type = "t2.micro"
security_groups = [module.vpc.default_security_group_id]
iam_instance_profile_name = module.ec2_profile.iam_instance_profile_id
user_data = data.template_file.user_data.rendered

# Auto scaling group
vpc_zone_identifier = module.vpc.private_subnets
Expand Down

0 comments on commit 4e19ce8

Please sign in to comment.