mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-01-15 16:23:58 +01:00
10 lines
300 B
Ruby
10 lines
300 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'awspec'
|
|
|
|
# rubocop:disable LineLength
|
|
state_file = 'terraform.tfstate.d/kitchen-terraform-default-aws/terraform.tfstate'
|
|
tf_state = JSON.parse(File.open(state_file).read)
|
|
region = tf_state['modules'][0]['outputs']['region']['value']
|
|
ENV['AWS_REGION'] = region
|