Commit 51c8d977 authored by rajat.kulkarni's avatar rajat.kulkarni

Upload New File

parent ebedb9b4
Pipeline #26677 failed with stage
in 5 seconds
provider "aws" {
profile = "default"
region = "us-east-1"
access_key = "AKIAXH6PITZUD6E7DLNX"
secret_key = "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"
}
resource "aws_instance" "ec301" {
ami ="ami-087c17d1fe0178315"
instance_type =var.instance_type
#security_groups = var.security_group_name
key_name = "ec2instance"
tags = { ec2_create = "instance1" }
}
variable "instance_type" {
description = "Value of the Name tag for the EC2 instance"
type = string
default = "t2.micro"
sensitive = true
}
resource "aws_default_vpc" "main" {
tags = { Name = "main" }
}
resource "aws_ebs_volume" "vol" {
availability_zone = "us-east-1a"
size = 8
tags = { key_name = "ec2instance" }
}
resource "time_sleep" "wait_30_seconds" {
depends_on = [aws_instance.ec301]
create_duration = "60s"
}
variable "security_group_name" {
description = "Value of the Security group name"
type = string
default = "ExampleAppServerInstance"
}
variable "role_name" {
description = "Value of the Name tag for the IAM role"
type = string
default = "ExampleAppServerInstance"
sensitive = true
}
variable "policy_name" {
description = "Value of the Name tag for the EC2 instance"
type = string
default = "ExampleAppServerInstance"
sensitive = true
}
resource "local_file" "foo" {
content = var.environment
filename = "/C:/Users/rajat.kulkarni/Screenshots/New folder/stage.tfvars"
}
variable "environment" {}
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