Skip to content

Commit

Permalink
Fixes for defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleKotowick committed Jul 30, 2021
1 parent 1f11e71 commit 0f4afe2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion local.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ module "assert_default_unlocked" {
}

locals {
default_state = var.fetch_raw_state && length(module.read_local_state) > 0 ? (module.read_local_state[0].exitstatus == 0 ? jsondecode(module.read_local_state[0].stdout) : null) : null
default_state = var.fetch_raw_state && length(module.read_local_state) > 0 && module.assert_default_unlocked.checked ? (module.read_local_state[0].exitstatus == 0 ? jsondecode(module.read_local_state[0].stdout) : null) : null
}
11 changes: 6 additions & 5 deletions s3.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ locals {

provider "aws" {
alias = "backend"
access_key = local.is_s3 ? local.backend.config.access_key : null
secret_key = local.is_s3 ? local.backend.config.secret_key : null
access_key = local.is_s3 ? local.backend.config.access_key : "1"
secret_key = local.is_s3 ? local.backend.config.secret_key : "A"
region = local.is_s3 ? local.backend.config.region : "us-east-1"
profile = local.is_s3 ? local.backend.config.profile : null
assume_role {
Expand All @@ -27,9 +27,10 @@ provider "aws" {
shared_credentials_file = local.is_s3 ? local.backend.config.shared_credentials_file : null
token = local.is_s3 ? local.backend.config.token : null
max_retries = local.is_s3 ? local.backend.config.max_retries : null
skip_credentials_validation = local.is_s3 ? local.backend.config.skip_credentials_validation : null
skip_metadata_api_check = local.is_s3 ? local.backend.config.skip_metadata_api_check : null
skip_region_validation = local.is_s3 ? local.backend.config.skip_region_validation : null
skip_credentials_validation = true
skip_metadata_api_check = true
skip_region_validation = true
skip_requesting_account_id = true
s3_force_path_style = local.is_s3 ? local.backend.config.force_path_style : null
}

Expand Down

0 comments on commit 0f4afe2

Please sign in to comment.