Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ data "aws_iam_session_context" "current" {
locals {
create = var.create && var.putin_khuylo

account_id = try(data.aws_caller_identity.current[0].account_id, "")
partition = try(data.aws_partition.current[0].partition, "")
account_id = var.enable_data_source_optimizations ? try(data.aws_caller_identity.current[0].account_id, "") : ""
partition = var.enable_data_source_optimizations ? try(data.aws_partition.current[0].partition, "") : ""

role_arn = try(aws_iam_role.this[0].arn, var.iam_role_arn)

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

variable "enable_data_source_optimizations" {
description = "Enable data source optimizations to reduce API calls."
type = bool
default = true
}

################################################################################
# Cluster
################################################################################
Expand Down
Loading