Difference between revisions of "Terraform module: ec2-instance"

From wikieduonline
Jump to navigation Jump to search
 
Line 30: Line 30:
 
* [[Terraform: AWS instance example with aws ami lookup and key name]]
 
* [[Terraform: AWS instance example with aws ami lookup and key name]]
 
* <code>[[ebs_block_device]]</code>
 
* <code>[[ebs_block_device]]</code>
* [[metadata_options]]
+
* [[metadata_options]] Default: { "http_endpoint": "enabled", "http_put_response_hop_limit": 1, "[[http_tokens]]": "optional" }
  
 
== See also ==
 
== See also ==

Latest revision as of 09:44, 28 June 2024

Module: https://registry.terraform.io/modules/terraform-aws-modules/ec2-instance/aws/latest?tab=inputs

Resources:


module "ec2_instance" {
  source  = "terraform-aws-modules/ec2-instance/aws"
  version = "~> 3.0"

  name = "single-instance" 

  ami                    = "ami-ebd02392"
  instance_type          = "t2.micro"
  key_name               = "user1"
  monitoring             = true
  vpc_security_group_ids = ["sg-12345678"]
  subnet_id              = "subnet-eddcdzz4" 

  tags = {
    Terraform   = "true"
    Environment = "dev"
  }
}

Related[edit]

See also[edit]

Advertising: