File tree 5 files changed +37
-4
lines changed
5 files changed +37
-4
lines changed Original file line number Diff line number Diff line change 18
18
with :
19
19
version : " 0.11.14"
20
20
- name : Build module 'aws-instance-first-script'
21
- run : cd aws-instance-first-script && terraform init && terraform validate && terraform plan
21
+ run : cd aws-instance-first-script && terraform init && terraform validate && terraform plan
22
+ - name : Build module 'aws-EC2-with-jenkins'
23
+ run : cd EC2withJenkins && terraform init && terraform validate && terraform plan
Original file line number Diff line number Diff line change 1
1
provider "aws" {
2
- region = " ${ var . region } "
3
- version = " ~> 2.0"
2
+ region = " ${ var . region } "
3
+ version = " ~> 2.0"
4
4
}
Original file line number Diff line number Diff line change
1
+ # aws-instance-first-script
2
+
3
+ A Terraform module for creating AWS EC2 instance with userdata for creating EBS.
4
+
5
+ ## Usage
6
+
7
+ ``` hcl
8
+ module "ec2_instance" {
9
+ source = "git::https://github.com/easyawslearn/Terraform-Tutorial.git/ebc-with-userdata"
10
+
11
+ region = "us-west-2"
12
+ key-name = "ec2-demo"
13
+ instance_type = "t2.micro"
14
+ ebs_size = "20"
15
+ }
16
+ ```
17
+
18
+ ## Inputs
19
+
20
+ | Name | Description | Type | Default | Required |
21
+ | ------| -------------| :----:| :-----:| :-----:|
22
+ | region | AWS region | string | us-east-1 | yes |
23
+ | key-name | ec2 access key name | string | ec2-demo | yes |
24
+ | instance_type | ec2 instance_type | string | t2.micro | yes |
25
+ | ebs_size | EBS volume size | string | 20 | yes |
Original file line number Diff line number Diff line change 1
1
resource "aws_ebs_volume" "ebs_volume" {
2
2
availability_zone = " us-east-1a"
3
- size = 20
3
+ size = var . ebs_size
4
4
type = " gp2"
5
5
6
6
tags = {
Original file line number Diff line number Diff line change @@ -19,6 +19,12 @@ variable "device_name" {
19
19
type = " string"
20
20
default = " /dev/xvdh"
21
21
}
22
+
23
+ variable "ebs_size" {
24
+ type = " string"
25
+ default = " 20"
26
+ }
27
+
22
28
variable "key_name" {
23
29
type = " string"
24
30
default = " ec2-demo"
You can’t perform that action at this time.
0 commit comments