Skip to content

Instantly share code, notes, and snippets.

@arun9theja
Forked from DuranIsrael/main.tf
Created March 11, 2024 19:07
Show Gist options
  • Select an option

  • Save arun9theja/f547e6ac454cf4cd6fe1f0e3856a2aca to your computer and use it in GitHub Desktop.

Select an option

Save arun9theja/f547e6ac454cf4cd6fe1f0e3856a2aca to your computer and use it in GitHub Desktop.

Revisions

  1. @DuranIsrael DuranIsrael created this gist Jun 1, 2022.
    20 changes: 20 additions & 0 deletions main.tf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    terraform {
    required_providers {
    aws = {
    source = "hashicorp/aws"
    version = "~> 3.27"
    }
    }

    required_version = ">= 0.14.9"
    }

    provider "aws" {
    region = var.region
    }

    module "EC2" {
    source = "./EC2"
    ami = "ami-0022f774911c1d690"
    instance_type = "t2.micro"
    }
    14 changes: 14 additions & 0 deletions vars.tf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    variable "ami" {
    type = string
    default = ""
    }

    variable "instance_type" {
    type = string
    default = "t2,micro"
    }

    variable "region" {
    type = string
    default = "us-east-1"
    }