mirror of
https://github.com/farcasclaudiu/terraform-course.git
synced 2026-06-22 09:01:59 +03:00
demo-16 userdata fix
This commit is contained in:
@@ -4,7 +4,8 @@ resource "aws_launch_configuration" "example-launchconfig" {
|
||||
instance_type = "t2.micro"
|
||||
key_name = "${aws_key_pair.mykeypair.key_name}"
|
||||
security_groups = ["${aws_security_group.myinstance.id}"]
|
||||
user_data = "#!/bin/bash\napt-get install nginx\nMYIP=`ifconfig | grep 'addr:10' | awk '{ print $2 }' | cut -d ':' -f2`\necho 'this is: '$MYIP > /var/www/html/index.html"
|
||||
user_data = "#!/bin/bash\napt-get -y install nginx\nMYIP=`ifconfig | grep 'addr:10' | awk '{ print $2 }' | cut -d ':' -f2`\necho 'this is: '$MYIP > /var/www/html/index.html"
|
||||
lifecycle { create_before_destroy = true }
|
||||
}
|
||||
|
||||
resource "aws_autoscaling_group" "example-autoscaling" {
|
||||
|
||||
Reference in New Issue
Block a user