terraspace_plugin_google 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 60aa63a18ee7e8e607a58f0e00534bf68158a117070c1cbddd7c13eb9ed2d148
4
- data.tar.gz: 969b365d1168cc6a5b3d4ed5a03d88699d701ec54e2490162f00f89d5b511ee5
3
+ metadata.gz: b210bb6190e4c84d5e1dc299d98761541bdbefdc8c68f7c81487a95586785529
4
+ data.tar.gz: 6e2a0b9fad7a7a702b143ac0c2569109c07326693b75aa5cb7c09cee820dc7f3
5
5
  SHA512:
6
- metadata.gz: 06ce418b5be6190d68246b9f7066045cd40781c4d75db40c4f04792b1004aeeb7306644dafd843fe732fe3e39d175d63bec42fb4aafae433332f1c1fa4a28b81
7
- data.tar.gz: 78398add7a43d881056f85910873ebf283c287fd0f139ba864e0ad45dcb22059800fc9cfb4756bcf395ac8294091cc1e4ed952bd7c996cd9d0a8a9d1f69f771d
6
+ metadata.gz: df87fc25c96629faed3c64e193cddf5ca18d40a43564b483e2f077b2b9a9dd62adda07de6e3e0ae729456a716b2785eea3ce9d5e437a257dfdea3f05b419e5ac
7
+ data.tar.gz: 2fd58bbfb84efb5de44bbf4603efc296e53d407920a64b7739c0e052ae5c027ef8ad187606b4059b7b965c86bfc015c311ea260c244eb0aa37c831698f611ccf
@@ -3,6 +3,10 @@
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.2.1]
7
+ - #3 update starter example template: bucket_policy_only deprecated for uniform_bucket_level_access
8
+ - edge case: graceful error when bucket doesnt exist yet
9
+
6
10
  ## [0.2.0]
7
11
  - #2 include layer interface, update template to use expansion method
8
12
 
@@ -1,4 +1,4 @@
1
1
  resource "google_storage_bucket" "this" {
2
- name = var.name
3
- bucket_policy_only = var.bucket_policy_only
2
+ name = var.name
3
+ uniform_bucket_level_access = var.uniform_bucket_level_access
4
4
  }
@@ -3,8 +3,8 @@ variable "name" {
3
3
  type = string
4
4
  }
5
5
 
6
- variable "bucket_policy_only" {
7
- description = "bucket_policy_only"
6
+ variable "uniform_bucket_level_access" {
7
+ description = "uniform_bucket_level_access"
8
8
  type = bool
9
9
  default = false
10
10
  }
@@ -5,6 +5,6 @@ resource "random_pet" "this" {
5
5
  module "bucket" {
6
6
  source = "../../modules/example"
7
7
 
8
- name = "bucket-${random_pet.this.id}"
9
- bucket_policy_only = var.bucket_policy_only
8
+ name = "bucket-${random_pet.this.id}"
9
+ uniform_bucket_level_access = var.uniform_bucket_level_access
10
10
  }
@@ -1,5 +1,5 @@
1
- variable "bucket_policy_only" {
2
- description = "bucket_policy_only"
1
+ variable "uniform_bucket_level_access" {
2
+ description = "uniform_bucket_level_access"
3
3
  type = bool
4
4
  default = false
5
5
  }
@@ -1,4 +1,4 @@
1
1
  resource("google_storage_bucket", "this",
2
- name: var.name,
3
- bucket_policy_only:var.bucket_policy_only,
2
+ name: var.name,
3
+ uniform_bucket_level_access: var.uniform_bucket_level_access,
4
4
  )
@@ -3,8 +3,8 @@ variable("name",
3
3
  type: "string",
4
4
  )
5
5
 
6
- variable("bucket_policy_only",
7
- description: "bucket_policy_only",
6
+ variable("uniform_bucket_level_access",
7
+ description: "uniform_bucket_level_access",
8
8
  type: "bool",
9
9
  default: false,
10
10
  )
@@ -1,5 +1,5 @@
1
- variable("bucket_policy_only",
2
- description: "bucket_policy_only",
1
+ variable("uniform_bucket_level_access",
2
+ description: "uniform_bucket_level_access",
3
3
  type: "bool",
4
4
  default: false,
5
5
  )
@@ -5,6 +5,6 @@ resource "random_pet" "this" {
5
5
  module "bucket" {
6
6
  source = "../../modules/example"
7
7
 
8
- name = "bucket-${random_pet.this.id}"
9
- bucket_policy_only = var.bucket_policy_only
8
+ name = "bucket-${random_pet.this.id}"
9
+ uniform_bucket_level_access = var.uniform_bucket_level_access
10
10
  }
@@ -1,5 +1,5 @@
1
- variable "bucket_policy_only" {
2
- description = "bucket_policy_only"
1
+ variable "uniform_bucket_level_access" {
2
+ description = "uniform_bucket_level_access"
3
3
  type = bool
4
4
  default = false
5
5
  }
@@ -11,6 +11,10 @@ module TerraspacePluginGoogle::Interfaces
11
11
  # interface method
12
12
  def download
13
13
  bucket = storage.bucket(@bucket)
14
+ unless bucket
15
+ logger.error "ERROR: bucket #{@bucket} does not exist".color(:red)
16
+ exit 1
17
+ end
14
18
  bucket.files(prefix: @folder).all do |f|
15
19
  file = bucket.file(f.name)
16
20
  next if file.nil? # in case file has been removed since .files
@@ -1,3 +1,3 @@
1
1
  module TerraspacePluginGoogle
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terraspace_plugin_google
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.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: 2020-08-20 00:00:00.000000000 Z
11
+ date: 2020-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gcp_data