Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Terraform_ec2_instance
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rajat.kulkarni
Terraform_ec2_instance
Commits
93ad6cbf
Commit
93ad6cbf
authored
Oct 08, 2021
by
rajat.kulkarni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
f5e9546a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
0 deletions
+54
-0
sampleec2.tf
sampleec2.tf
+54
-0
No files found.
sampleec2.tf
0 → 100644
View file @
93ad6cbf
provider
"aws"
{
profile
=
"default"
region
=
"us-east-1"
access_key
=
"AKIAXH6PITZUD6E7DLNX"
secret_key
=
"miYosKiYXxcc4bGpfpVL8dmGWNFLPS4FhIl+dFqM"
}
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
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment