mirror of
				https://github.com/mr-vercetti/tf-aws-demo.git
				synced 2025-11-04 01:15:46 +01:00 
			
		
		
		
	Add autoscaling policy and create ami_data module
This commit is contained in:
		
							
								
								
									
										20
									
								
								modules/ami_data/main.tf
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										20
									
								
								modules/ami_data/main.tf
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
data "aws_ami" "amazon_linux" {
 | 
			
		||||
  most_recent = true
 | 
			
		||||
 | 
			
		||||
  filter {
 | 
			
		||||
    name   = "name"
 | 
			
		||||
    values = ["amzn2-ami-*-gp2"]
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  filter {
 | 
			
		||||
    name   = "architecture"
 | 
			
		||||
    values = ["x86_64"]
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  filter {
 | 
			
		||||
    name   = "virtualization-type"
 | 
			
		||||
    values = ["hvm"]
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  owners = ["amazon"]
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										3
									
								
								modules/ami_data/outputs.tf
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										3
									
								
								modules/ami_data/outputs.tf
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
output "amazon_linux" {
 | 
			
		||||
  value = data.aws_ami.amazon_linux
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user