Skip to content

Commit 3157ba6

Browse files
authored
Add ec2_instance_profile_role_name to outputs (#18)
1 parent 4b682a8 commit 3157ba6

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

main.tf

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,6 @@ resource "aws_ssm_activation" "ec2" {
135135
registration_limit = "${var.autoscale_max}"
136136
}
137137

138-
#
139-
140-
# Other stuff
141-
142-
#
143-
144138
data "aws_iam_policy_document" "default" {
145139
statement {
146140
sid = ""
@@ -307,7 +301,7 @@ data "aws_iam_policy_document" "default" {
307301
}
308302

309303
resource "aws_iam_instance_profile" "ec2" {
310-
name = "${module.label.id}"
304+
name = "${module.label.id}-ec2"
311305
role = "${aws_iam_role.ec2.name}"
312306
}
313307

@@ -886,35 +880,29 @@ resource "aws_elastic_beanstalk_environment" "default" {
886880
name = "Protocol"
887881
value = "HTTP"
888882
}
883+
889884
###===================== Notification =====================================================###
890885

891886
setting {
892887
namespace = "aws:elasticbeanstalk:sns:topics"
893888
name = "Notification Endpoint"
894889
value = "${var.notification_endpoint}"
895890
}
896-
897891
setting {
898892
namespace = "aws:elasticbeanstalk:sns:topics"
899893
name = "Notification Protocol"
900894
value = "${var.notification_protocol}"
901895
}
902-
903896
setting {
904897
namespace = "aws:elasticbeanstalk:sns:topics"
905898
name = "Notification Topic ARN"
906899
value = "${var.notification_topic_arn}"
907900
}
908-
909901
setting {
910902
namespace = "aws:elasticbeanstalk:sns:topics"
911903
name = "Notification Topic Name"
912904
value = "${var.notification_topic_name}"
913905
}
914-
915-
916-
917-
918906
depends_on = ["aws_security_group.default"]
919907
}
920908

outputs.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ output "elb_dns_name" {
1717
output "elb_zone_id" {
1818
value = "${var.alb_zone_id[data.aws_region.default.name]}"
1919
}
20+
21+
output "ec2_instance_profile_role_name" {
22+
value = "${aws_iam_role.ec2.name}"
23+
}

0 commit comments

Comments
 (0)