terraspace_plugin_aws 0.3.7 → 0.4.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f6548d387f1353c70c8d7ce848f22f5e77f3cc0e9c2aaa19c9357c724b77ce9
4
- data.tar.gz: 140d53ddb0ee7688a90b8acc04189d48079c88685d9d296420b8df3e5b9f05bd
3
+ metadata.gz: 95b6616183e8c70e88ac887cf5f78770ad64b475d66bee094a2ba86088c7092c
4
+ data.tar.gz: 28b59d3ebaec51b767b192c45c2d9a1a389c881945775e3feb69284a85ba9e66
5
5
  SHA512:
6
- metadata.gz: f920f7e43bb2fdd470ddbf1a12c906f0d76b4630070f466929d01941c82daead85cb7a5f955d9ca9dad129cbd144f91c81e9a6c4f7e84dbdd58585cf99c83e51
7
- data.tar.gz: e61f88175f512a64687521f8cbc78b484702e2367d6c0eb65e40ef2a4a019a68ca54487b145787cfa525870437ff59aac61b459b735468759ec1d388a5ec02a9
6
+ metadata.gz: f842142813d980f761e4f637c62f56db1716891586f89fd846c7c611a2c2c95bbd50c94e58311a4caf21685c97e7878d63e1fb5f492bee56b43c05b2427c9817
7
+ data.tar.gz: 5cf6a34378c83c8f8bd06a4589884ca79568428c85d6ce83a90a0afc23d52d213466c555e9b566e2d853eeead5749ec4672fca8bf9218f07607a459543b069f9
data/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## [0.4.1] - 2022-06-14
7
+ - [#21](https://github.com/boltops-tools/terraspace_plugin_aws/pull/21) backend.tf template: add project variable
8
+
9
+ ## [0.4.0] - 2022-06-10
10
+ - [#20](https://github.com/boltops-tools/terraspace_plugin_aws/pull/20) Update Generated Default Backend Key and CI Interface
11
+ - add ci interface class
12
+ - change default backend key
13
+
14
+ ## [0.3.8] - 2022-06-09
15
+ - [#19](https://github.com/boltops-tools/terraspace_plugin_aws/pull/19) fix bucket tagging: use parsed region from backend.tf for s3 client
16
+
6
17
  ## [0.3.7] - 2022-02-15
7
18
  - [#18](https://github.com/boltops-tools/terraspace_plugin_aws/pull/18) update starter s3 bucket example to work with terraform aws provider v4
8
19
 
@@ -1,7 +1,7 @@
1
1
  terraform {
2
2
  backend "s3" {
3
3
  bucket = "<%%= expansion('terraform-state-:ACCOUNT-:REGION-:ENV') %>"
4
- key = "<%%= expansion(':REGION/:ENV/:BUILD_DIR/terraform.tfstate') %>"
4
+ key = "<%%= expansion(':PROJECT/:TYPE_DIR/:APP/:ROLE/:MOD_NAME/:ENV/:EXTRA/:REGION/terraform.tfstate') %>"
5
5
  region = "<%%= expansion(':REGION') %>"
6
6
  encrypt = true
7
7
  dynamodb_table = "terraform_locks"
@@ -1,6 +1,6 @@
1
1
  backend("s3",
2
- bucket: "terraform-state-:ACCOUNT-:REGION-:ENV", # expanded by terraspace IE: terraform-state-112233445566-us-west-2-dev
3
- key: ":REGION/:ENV/:BUILD_DIR/terraform.tfstate", # expanded by terraspace IE: us-west-2/dev/modules/vm/terraform.tfstate
2
+ bucket: "terraform-state-:ACCOUNT-:REGION-:ENV",
3
+ key: ":PROJECT/:TYPE_DIR/:APP/:ROLE/:MOD_NAME/:ENV/:EXTRA/:REGION/terraform.tfstate",
4
4
  region: ":REGION",
5
5
  encrypt: true,
6
6
  dynamodb_table: "terraform_locks"
@@ -1,10 +1,8 @@
1
1
  class TerraspacePluginAws::Interfaces::Backend::Bucket
2
- class Tagging
3
- include TerraspacePluginAws::Clients
4
- include TerraspacePluginAws::Logging
5
-
6
- def initialize(bucket)
7
- @bucket = bucket
2
+ class Tagging < TerraspacePluginAws::Interfaces::Backend::Base
3
+ def initialize(info)
4
+ super
5
+ @bucket = info['bucket']
8
6
  end
9
7
 
10
8
  def tag
@@ -34,7 +34,7 @@ class TerraspacePluginAws::Interfaces::Backend
34
34
  end
35
35
 
36
36
  def tag(bucket)
37
- Tagging.new(@info["bucket"]).tag
37
+ Tagging.new(@info).tag
38
38
  end
39
39
  end
40
40
  end
@@ -0,0 +1,12 @@
1
+ module TerraspacePluginAws::Interfaces
2
+ class Ci
3
+ # interface method
4
+ def vars
5
+ {
6
+ AWS_ACCESS_KEY_ID: '${{ secrets.AWS_ACCESS_KEY_ID }}',
7
+ AWS_SECRET_ACCESS_KEY: '${{ secrets.AWS_SECRET_ACCESS_KEY }}',
8
+ AWS_REGION: AwsData.new.region,
9
+ }
10
+ end
11
+ end
12
+ end
@@ -1,3 +1,3 @@
1
1
  module TerraspacePluginAws
2
- VERSION = "0.3.7"
2
+ VERSION = "0.4.1"
3
3
  end
@@ -39,5 +39,6 @@ Terraspace::Plugin.register("aws",
39
39
  config_class: TerraspacePluginAws::Interfaces::Config,
40
40
  helper_class: TerraspacePluginAws::Interfaces::Helper,
41
41
  layer_class: TerraspacePluginAws::Interfaces::Layer,
42
+ ci_class: TerraspacePluginAws::Interfaces::Ci,
42
43
  root: File.dirname(__dir__),
43
44
  )
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terraspace_plugin_aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-15 00:00:00.000000000 Z
11
+ date: 2022-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-dynamodb
@@ -175,6 +175,7 @@ files:
175
175
  - lib/terraspace_plugin_aws/interfaces/backend/bucket/tagging.rb
176
176
  - lib/terraspace_plugin_aws/interfaces/backend/setup.rb
177
177
  - lib/terraspace_plugin_aws/interfaces/backend/table.rb
178
+ - lib/terraspace_plugin_aws/interfaces/ci.rb
178
179
  - lib/terraspace_plugin_aws/interfaces/config.rb
179
180
  - lib/terraspace_plugin_aws/interfaces/decorator.rb
180
181
  - lib/terraspace_plugin_aws/interfaces/decorator/aws_security_group.rb
@@ -209,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
209
210
  - !ruby/object:Gem::Version
210
211
  version: '0'
211
212
  requirements: []
212
- rubygems_version: 3.2.32
213
+ rubygems_version: 3.3.12
213
214
  signing_key:
214
215
  specification_version: 4
215
216
  summary: Terraspace AWS Plugin