tfctl 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.adoc +18 -0
- data/examples/control_tower/modules/s3-bucket/main.tf +4 -0
- data/examples/control_tower/profiles/example-profile/main.tf +8 -1
- data/examples/control_tower/profiles/example-profile/terraform.tf +7 -0
- data/examples/control_tower/profiles/example-profile/variables.tf +2 -2
- data/lib/tfctl/generator.rb +5 -2
- data/lib/tfctl/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7862426153b20908c7f418711505fc0192a1ea61f5edcc5ac1aa71d69190a8a6
|
4
|
+
data.tar.gz: c2d6272043b02a506316143a4ad9f9f61c811609092a2642e64fb3dcfaf09472
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b35eb69b4a65c422e025dc02761c52947824b656d7bdd12eafe88ca214b1e11ca68b27b27edf7b0fb73002a4cdfe80e6c714b46c2957b9548ac26feb910040a5
|
7
|
+
data.tar.gz: 57ea113b1384c4b6ea77af357eb647fbf1362d06bb438b111dca1037479a66d3c9b5d294f1e375fae8e4fe9d53c6df3d093d6d2df40683b86bc21a795ed13a3d
|
data/CHANGELOG.adoc
CHANGED
@@ -1,5 +1,23 @@
|
|
1
1
|
= Changelog
|
2
2
|
|
3
|
+
== 1.6.0
|
4
|
+
|
5
|
+
* fix: pass the default AWS provider explicitly from tfctl generated configuration.
|
6
|
+
This fixes provider inheritance issues when using multiple providers which
|
7
|
+
was introduced in 1.3.0. You may need to add a terraform block with
|
8
|
+
`required_provides` to your profiles if you don't have it defined already.
|
9
|
+
Terraform will warn about this during `init`. Here's an example block:
|
10
|
+
|
11
|
+
----
|
12
|
+
terraform {
|
13
|
+
required_providers {
|
14
|
+
aws = {
|
15
|
+
source = "hashicorp/aws"
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
19
|
+
----
|
20
|
+
|
3
21
|
== 1.5.0
|
4
22
|
|
5
23
|
* feat: support for setting default tags at AWS provider level. (Thanks @patrickli)
|
@@ -1,4 +1,11 @@
|
|
1
|
+
resource "random_pet" "bucket_prefix" {
|
2
|
+
}
|
3
|
+
|
1
4
|
module "bucket" {
|
2
5
|
source = "../../modules/s3-bucket"
|
3
|
-
name = "${
|
6
|
+
name = "${random_pet.bucket_prefix.id}-${local.account["data"]["example_bucket_name"]}"
|
7
|
+
}
|
8
|
+
|
9
|
+
output "bucket_arn" {
|
10
|
+
value = module.bucket.arn
|
4
11
|
}
|
@@ -6,7 +6,7 @@ variable "config" {
|
|
6
6
|
|
7
7
|
locals {
|
8
8
|
config = jsondecode(var.config)
|
9
|
-
account_id =
|
9
|
+
account_id = data.aws_caller_identity.current.account_id
|
10
10
|
# get account configuration from tfctl config
|
11
|
-
account
|
11
|
+
account = [for account in local.config["accounts"] : account if account["id"] == local.account_id][0]
|
12
12
|
}
|
data/lib/tfctl/generator.rb
CHANGED
@@ -80,8 +80,11 @@ module Tfctl
|
|
80
80
|
profile_block = {
|
81
81
|
'module' => {
|
82
82
|
profile => {
|
83
|
-
'source'
|
84
|
-
'config'
|
83
|
+
'source' => "../../../profiles/#{profile}",
|
84
|
+
'config' => '${var.config}',
|
85
|
+
'providers' => {
|
86
|
+
'aws' => 'aws',
|
87
|
+
},
|
85
88
|
},
|
86
89
|
},
|
87
90
|
}
|
data/lib/tfctl/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tfctl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Wasilczuk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-organizations
|
@@ -164,6 +164,7 @@ files:
|
|
164
164
|
- examples/control_tower/modules/s3-bucket/variables.tf
|
165
165
|
- examples/control_tower/profiles/example-profile/data.tf
|
166
166
|
- examples/control_tower/profiles/example-profile/main.tf
|
167
|
+
- examples/control_tower/profiles/example-profile/terraform.tf
|
167
168
|
- examples/control_tower/profiles/example-profile/variables.tf
|
168
169
|
- examples/control_tower/tfctl.yaml
|
169
170
|
- lib/hash.rb
|