diff --git a/local-app/tf-directory-setup/remote_state.data.tf.j2 b/local-app/tf-directory-setup/remote_state.data.tf.j2 index a498a532..623327d5 100644 --- a/local-app/tf-directory-setup/remote_state.data.tf.j2 +++ b/local-app/tf-directory-setup/remote_state.data.tf.j2 @@ -1,4 +1,4 @@ -# version: 1.1.0 +# version: 1.1.1 #--- # {{ data.account_alias }}: {{ data.directory }} @@ -11,6 +11,11 @@ data "terraform_remote_state" "{{ data.directory_replaced }}" { bucket = var.tfstate_bucket key = join("/",compact([var.tfstate_key_prefix,"{{ data.directory }}",var.tfstate_key_suffix])) region = var.tfstate_region +{% if data.use_lockfile is defined and not data.use_lockfile %} dynamodb_table = var.tfstate_table +{% endif %} +{% if data.use_lockfile is defined %} + use_lockfile = {{ data.use_lockfile | default('false') | lower }} +{% endif %} } } diff --git a/local-app/tf-directory-setup/remote_state.data.tf.s3.j2 b/local-app/tf-directory-setup/remote_state.data.tf.s3.j2 index a498a532..623327d5 100644 --- a/local-app/tf-directory-setup/remote_state.data.tf.s3.j2 +++ b/local-app/tf-directory-setup/remote_state.data.tf.s3.j2 @@ -1,4 +1,4 @@ -# version: 1.1.0 +# version: 1.1.1 #--- # {{ data.account_alias }}: {{ data.directory }} @@ -11,6 +11,11 @@ data "terraform_remote_state" "{{ data.directory_replaced }}" { bucket = var.tfstate_bucket key = join("/",compact([var.tfstate_key_prefix,"{{ data.directory }}",var.tfstate_key_suffix])) region = var.tfstate_region +{% if data.use_lockfile is defined and not data.use_lockfile %} dynamodb_table = var.tfstate_table +{% endif %} +{% if data.use_lockfile is defined %} + use_lockfile = {{ data.use_lockfile | default('false') | lower }} +{% endif %} } }