Skip to content

Commit

Permalink
Merge pull request #2 from DevopsCare/feature/iam-role-ec2
Browse files Browse the repository at this point in the history
Add iam instance profile
  • Loading branch information
okgolove authored Mar 26, 2020
2 parents dad73a3 + 7cf637b commit fd88b72
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ module "jenkins" {
| cidr | The CIDR block for the VPC which will be created if `vpc_id` is not specified | `string` | `""` | no |
| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes` | `string` | `"-"` | no |
| environment | Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT' | `string` | `""` | no |
| ip\_whitelist | IP list will be able to access Jenkins | `list` | <code>["0.0.0.0/0"<br>]<br></code> | no |
| ip\_whitelist | IP list will be able to access Jenkins | `list` | <code>["0.0.0.0/0"]</code> | no |
| jekins\_volume\_size | EC2 root volume size | `string` | `20` | no |
| jenkins\_ami\_id | Jenkins AMI ID. It's recommended to use https://github.com/DevopsCare/packer-jenkins-ami for AMI building | `string` | `""` | no |
| jenkins\_ami\_id | Jenkins AMI id. It's recommended to use https://github.com/DevopsCare/packer-jenkins-ami for AMI building | `string` | `""` | no |
| jenkins\_domain\_name | Domain will be used for ACM module | `string` | `""` | no |
| jenkins\_iam\_instance\_profile | The IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile | `string` | `""` | no |
| jenkins\_instance\_type | The type of instance to start | `string` | `"t3.medium"` | no |
| keypair\_name | Key pair will be used for EC2 instance | `string` | `""` | no |
| name | Solution name, e.g. 'app' or 'jenkins' | `string` | `""` | no |
Expand Down
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -180,5 +180,7 @@ module "jenkins_ec2" {
vpc_security_group_ids = [module.jenkins_sg.this_security_group_id]
subnet_id = module.vpc.private_subnets[0]

iam_instance_profile = var.jenkins_iam_instance_profile

tags = module.label.tags
}
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ variable "keypair_name" {
default = ""
}

variable "jenkins_iam_instance_profile" {
description = "The IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile"
type = string
default = ""
}

#######
# ACM #
#######
Expand Down

0 comments on commit fd88b72

Please sign in to comment.