Skip to content
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #51 from dgrizzanti/instance_role_options
Browse files Browse the repository at this point in the history
Instance role options
  • Loading branch information
brikis98 authored Jul 22, 2019
2 parents 33a378c + 429023c commit 8f6bd85
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/couchbase-ami/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ The Packer template in this example folder can build not only AMIs, but also Doc
convenient for testing out the various scripts in the `modules` folder without having to wait for an AMI to build and
a bunch of EC2 Instances to boot up. See the [local-mocks
folder](https://github.com/gruntwork-io/terraform-aws-couchbase/tree/master/modules/install-couchbase-server) for
instructions.
instructions.
6 changes: 4 additions & 2 deletions modules/couchbase-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,10 @@ resource "aws_iam_instance_profile" "instance_profile" {
}

resource "aws_iam_role" "instance_role" {
name_prefix = var.cluster_name
assume_role_policy = data.aws_iam_policy_document.instance_role.json
name_prefix = var.cluster_name
assume_role_policy = data.aws_iam_policy_document.instance_role.json
path = var.instance_role_path
permissions_boundary = var.instance_permissions_boundary

# aws_iam_instance_profile.instance_profile in this module sets create_before_destroy to true, which means
# everything it depends on, including this resource, must set it as well, or you'll get cyclic dependency errors
Expand Down
12 changes: 12 additions & 0 deletions modules/couchbase-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,18 @@ variable "instance_profile_path" {
default = "/"
}

variable "instance_role_path" {
description = "Path in which to create the IAM instance role."
type = string
default = "/"
}

variable "instance_permissions_boundary" {
description = "The ARN of the policy that is used to set the permissions boundary for the instance profile role"
type = string
default = null
}

variable "ssh_port" {
description = "The port used for SSH connections"
type = number
Expand Down

0 comments on commit 8f6bd85

Please sign in to comment.