@hiiretail/gcp-infra-cli 0.76.1 → 0.76.2

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.
@@ -0,0 +1,23 @@
1
+ names:
2
+ - "<%-bucketName%>"
3
+ prefix: "<%-prefix%>"
4
+ storage_class: "STANDARD" <% if (env == 'prod') { %>
5
+ location: "EU" <% } else { %>
6
+ location: "EUROPE-WEST1"<% } %>
7
+ versioning:
8
+ "<%-bucketName%>": <%-versioning%>
9
+ set_viewer_roles: true <% if (lifecycleRules == 'true') { %>
10
+ lifecycle_rules:
11
+ action:
12
+ type: "<%-action%>" <% if (action == 'SetStorageClass') { %>
13
+ storage_class: "<%-storageClass%>" <% } else { %>
14
+ storage_class: null <% } %>
15
+ condition:
16
+ age: <%-age%> <% if (createdBefore != 'null') { %>
17
+ created_before: "<%-createdBefore%>" <% } else { %>
18
+ created_before: null <% } %> <% if (withState != 'null') { %>
19
+ with_state: "<%-withState%>" <% } else { %>
20
+ with_state: null <% } %> <% if (matchesStorageClass != 'null') { %>
21
+ matches_storage_class: "<%-matchesStorageClass%>" <% } else { %>
22
+ matches_storage_class: null <% } %>
23
+ num_newer_versions: <%-numNewerVersions%> <% } %>
@@ -10,14 +10,13 @@ include {
10
10
  }
11
11
 
12
12
  locals {
13
- spec_vars = read_terragrunt_config("${get_terragrunt_dir()}/spec.hcl")
14
13
  project_vars = read_terragrunt_config(find_in_parent_folders("project.hcl"))
15
14
  common_vars = read_terragrunt_config(find_in_parent_folders("common.hcl"))
16
15
  }
17
16
 
18
17
  # These are the variables we have to pass in to use the module specified in the terragrunt configuration above
19
18
  inputs = merge(
20
- local.spec_vars.locals,
19
+ yamldecode(file("${get_terragrunt_dir()}/storage.yaml")),
21
20
  local.project_vars.locals,
22
21
  {
23
22
  project_id = local.project_vars.locals.project_id
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiiretail/gcp-infra-cli",
3
- "version": "0.76.1",
3
+ "version": "0.76.2",
4
4
  "description": "Infrastructure as code generator for GCP.",
5
5
  "main": "src/cli.js",
6
6
  "bin": {
@@ -1,47 +0,0 @@
1
- locals {
2
- ###################
3
- # REQUIRED INPUTS #
4
- ###################
5
-
6
- names = ["<%-bucketName%>"]
7
- prefix = "<%-prefix%>"
8
-
9
-
10
- ###################
11
- # OPTIONAL INPUTS #
12
- ###################
13
-
14
- # The Storage Class of the new bucket.
15
- # Supported values include: STANDARD, MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE.
16
- storage_class = "STANDARD"
17
-
18
- # The GCS location - 'EU' for multi-regional buckets.
19
- <% if (env == 'prod') { %>
20
- location = "EU"
21
- <% } else { %>
22
- location = "EUROPE-WEST1"
23
- <% } %>
24
- versioning = {
25
- "<%-bucketName%>" = <%-versioning%>
26
- }
27
- set_viewer_roles = true
28
-
29
- <% if (lifecycleRules == 'true') { %>
30
- lifecycle_rules = [{
31
- action = {
32
- type = "<%-action%>" <% if (action == 'SetStorageClass') { %>
33
- storage_class = "<%-storageClass%>" <% } else { %>
34
- storage_class = null <% } %>
35
- }
36
- condition = {
37
- age = <%-age%> <% if (createdBefore != 'null') { %>
38
- created_before = "<%-createdBefore%>" <% } else { %>
39
- created_before = null <% } %> <% if (withState != 'null') { %>
40
- with_state = "<%-withState%>" <% } else { %>
41
- with_state = null <% } %> <% if (matchesStorageClass != 'null') { %>
42
- matches_storage_class = "<%-matchesStorageClass%>" <% } else { %>
43
- matches_storage_class = null <% } %>
44
- num_newer_versions = <%-numNewerVersions%>
45
- }
46
- }] <% } %>
47
- }