Skip to content

Commit 2da8c45

Browse files
committed
Add Service Link Role flag
1 parent c696582 commit 2da8c45

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

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)