Skip to content

Commit e552143

Browse files
authored
Merge pull request #6 from lgallard/fix/servicerole-creation
Add service link role creation flag
2 parents c696582 + 87c3cae commit e552143

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 0.3.0 (June 26, 2020)
2+
3+
FIXES:
4+
5+
* Add Service Link role creation flag (default to `true`)
6+
7+
18
## 0.2.1 (May 2, 2020)
29

310
UPDATE:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ module "aws_es" {
121121
| cognito\_options\_identity\_pool\_id | ID of the Cognito Identity Pool to use | `string` | `""` | no |
122122
| cognito\_options\_role\_arn | ARN of the IAM role that has the AmazonESCognitoAccess policy attached | `string` | `""` | no |
123123
| cognito\_options\_user\_pool\_id | ID of the Cognito User Pool to use | `string` | `""` | no |
124+
| create\_service\_link\_role | Create service link role for AWS Elasticsearch Service | `bool` | `true` | no |
124125
| domain\_name | Name of the domain | `string` | n/a | yes |
125126
| ebs\_enabled | Whether EBS volumes are attached to data nodes in the domain | `bool` | `true` | no |
126127
| ebs\_options | EBS related options, may be required based on chosen instance size | `map` | `{}` | no |

iam.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ CONFIG
2929

3030
# Service-linked role to give Amazon ES permissions to access your VPC
3131
resource "aws_iam_service_linked_role" "es" {
32+
count = var.create_service_link_role == true ? 1 : 0
3233
aws_service_name = "es.amazonaws.com"
3334
description = "Service-linked role to give Amazon ES permissions to access your VPC"
3435
}

variables.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,3 +244,10 @@ variable "timeouts_update" {
244244
type = string
245245
default = null
246246
}
247+
248+
# Service Link Role
249+
variable "create_service_link_role" {
250+
description = "Create service link role for AWS Elasticsearch Service"
251+
type = bool
252+
default = true
253+
}

0 commit comments

Comments
 (0)