Commit 0301e395 authored by rajat.kulkarni's avatar rajat.kulkarni

Update sampleec2.tf

parent 03889d0d
Pipeline #26664 failed with stage
in 4 seconds
...@@ -5,11 +5,6 @@ provider "aws" { ...@@ -5,11 +5,6 @@ provider "aws" {
secret_key ="H6ZxEVFZBVCO56mUFv4Oi1hzm2u934Z6yQxb9G15" secret_key ="H6ZxEVFZBVCO56mUFv4Oi1hzm2u934Z6yQxb9G15"
} }
resource "aws_instance" "ec301" { resource "aws_instance" "ec301" {
ami ="ami-087c17d1fe0178315" ami ="ami-087c17d1fe0178315"
instance_type =var.instance_type instance_type =var.instance_type
...@@ -17,6 +12,8 @@ resource "aws_instance" "ec301" { ...@@ -17,6 +12,8 @@ resource "aws_instance" "ec301" {
key_name = "ec2instance" key_name = "ec2instance"
tags = { ec2_create = "instance1" } tags = { ec2_create = "instance1" }
} }
variable "instance_type" { variable "instance_type" {
description = "Value of the Name tag for the EC2 instance" description = "Value of the Name tag for the EC2 instance"
type = string type = string
...@@ -25,7 +22,8 @@ variable "instance_type" { ...@@ -25,7 +22,8 @@ variable "instance_type" {
} }
resource "aws_default_vpc" "main" { resource "aws_default_vpc" "main" {
tags = { Name = "main" }
tags = { Name = "main" }
} }
resource "aws_ebs_volume" "vol" { resource "aws_ebs_volume" "vol" {
availability_zone = "us-east-1a" availability_zone = "us-east-1a"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment