-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
28 lines (25 loc) · 878 Bytes
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
##################################################
# locals for tagging
##################################################
locals {
common_tags = {
Owner = var.owner
Environment = var.environment
Cost_center = var.cost_center
Application = var.app_name
}
}
##################################################
# launch Config
##################################################
resource "aws_launch_configuration" "ec2_launch" {
name_prefix = "poc-web-"
image_id = var.ami
instance_type = var.instance_type
key_name = aws_key_pair.ssh.key_name
security_groups = [aws_security_group.sg.id]
user_data = filebase64("${path.module}/scripts/init.sh")
associate_public_ip_address = false
iam_instance_profile = aws_iam_instance_profile.session_manager.id
enable_monitoring = true
}