polyn-cli 0.1.5 → 0.1.6

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: d0492c19f8164fbaa7e050276f22e3c56c9879f63307840e3551a5d955e190ce
4
- data.tar.gz: bc6f7f2a6899e28261453509402eaa5955e45e8c163ec9dd79a069c366ffcd8b
3
+ metadata.gz: 760188610f6199c79fadad0e1197fc2b16f414000050045f61472a588162fb9a
4
+ data.tar.gz: e1870939e9963da2cb4bf42f8b9d0224635147486f99bb5df24fca46ce8e1a6a
5
5
  SHA512:
6
- metadata.gz: dd5a1d0fc16b7d499d95e8fcc1a6c96a7006da394205ccb5ec969e91c7d3c7c37bed608d6b86b4555c39ca16e1ce70ed91120c0ddac30a5014435abfc301a2e0
7
- data.tar.gz: d33d503d6dee25d3220532b2731beac35eb90ccc28859475f2cadef9ec03dc19f8b283ef6ba2bbcbbd5a5f31ca81f48564da747e92c17a0e153665fa9381701a
6
+ metadata.gz: 86872aabe890ff8aa5877736f1f2f36ce0dbdd53f921a7556ee7cc929354c14e8e8ce28a1a62c42dafff017cfb73b0d654788979420c7533ed8e9cc1f2954fbb
7
+ data.tar.gz: 83860b0f6ae95a25a73b1f8993dfc5b413962a92f1f8f7c65b489ed64fdc3f016a6d3a03d5ca4007d62d23cd7ac2397cf2ba56ee0f3064647cf023562231d4bc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- polyn-cli (0.1.5)
4
+ polyn-cli (0.1.6)
5
5
  dotenv (~> 2.7.6)
6
6
  json_schemer (~> 0.2)
7
7
  nats-pure (~> 2.0.0)
data/README.md CHANGED
@@ -34,6 +34,7 @@ Run `polyn up` to update your NATS server with the latest configuration in your
34
34
 
35
35
  * `NATS_SERVERS` - locations of your servers (defaults to localhost)
36
36
  * `NATS_CREDENTIALS` - path to nats credentials file
37
+ * `NATS_CA_FILE` - Fully Qualified Path to a file containing Root CA (PEM format). Use when the server has certs signed by an unknown authority.
37
38
  * `POLYN_ENV` - type of environment (defaults to "development")
38
39
 
39
40
  ## Development
@@ -11,6 +11,7 @@ module Polyn
11
11
  @polyn_env = ENV["POLYN_ENV"] || "development"
12
12
  @nats_servers = ENV["NATS_SERVERS"] || "localhost:4222"
13
13
  @nats_credentials = ENV["NATS_CREDENTIALS"] || ""
14
+ @nats_ca_file = ENV["NATS_CA_FILE"] || ""
14
15
  end
15
16
  end
16
17
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Polyn
4
4
  class Cli
5
- VERSION = "0.1.5"
5
+ VERSION = "0.1.6"
6
6
  end
7
7
  end
data/lib/polyn/cli.rb CHANGED
@@ -128,6 +128,10 @@ module Polyn
128
128
  Polyn::Cli.configuration.nats_credentials
129
129
  end
130
130
 
131
+ def nats_ca_file
132
+ Polyn::Cli.configuration.nats_ca_file
133
+ end
134
+
131
135
  def tf_apply
132
136
  if polyn_env == "development"
133
137
  %(terraform apply -auto-approve -input=false -var "jetstream_servers=#{nats_servers}")
@@ -135,6 +139,7 @@ module Polyn
135
139
  "terraform apply -auto-approve -input=false "\
136
140
  "-var \"jetstream_servers=#{nats_servers}\" "\
137
141
  "-var \"nats_credentials=#{nats_credentials}\" " \
142
+ "-var \"nats_ca_file=#{nats_ca_file}\" " \
138
143
  "-var \"polyn_env=production\""
139
144
  end
140
145
  end
@@ -1,4 +1,7 @@
1
1
  provider "jetstream" {
2
2
  servers = var.jetstream_servers
3
3
  credentials = var.nats_credentials
4
+ tls {
5
+ ca_file = var.nats_ca_file
6
+ }
4
7
  }
@@ -8,6 +8,12 @@ variable "nats_credentials" {
8
8
  description = "Path to file with NATS credentials"
9
9
  }
10
10
 
11
+ variable "nats_ca_file" {
12
+ type = string
13
+ description = "Fully Qualified Path to a file containing Root CA (PEM format). Use when the server has certs signed by an unknown authority."
14
+ default = ""
15
+ }
16
+
11
17
  variable "polyn_env" {
12
18
  type = string
13
19
  description = "The environment terraform is running in"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polyn-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jarod
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-09-02 00:00:00.000000000 Z
12
+ date: 2022-10-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dotenv