unoverse 0.1.65 → 0.1.67
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.
- package/operator/lib/deploy.sh +9 -6
- package/package.json +1 -1
package/operator/lib/deploy.sh
CHANGED
|
@@ -164,13 +164,9 @@ cmd_deploy() {
|
|
|
164
164
|
found=$(grep '^#[[:space:]]*existing_pg_cluster_name' "$tfv" | sed -E 's/.*"([^"]+)".*/\1/')
|
|
165
165
|
if [ -n "$found" ]; then
|
|
166
166
|
echo ""
|
|
167
|
-
echo -e " ${CYAN}${BOLD}
|
|
168
|
-
echo -e " ${DIM}$found${NC}"
|
|
167
|
+
echo -e " ${CYAN}${BOLD}You already have a database.${NC} ${DIM}$found${NC}"
|
|
169
168
|
echo ""
|
|
170
|
-
|
|
171
|
-
echo ""
|
|
172
|
-
pick_option "Reuse it this universe gets its own database inside it. The cluster is NOT part of the stack: destroying the universe leaves it running" \
|
|
173
|
-
"Create one for this universe part of the stack, built and destroyed with it (~\$15/month)"
|
|
169
|
+
pick_option "Use it" "Create a new one ~\$15/month"
|
|
174
170
|
if [ "$PICKED" = "0" ]; then
|
|
175
171
|
node -e 'const fs=require("fs");const[f,c]=process.argv.slice(1);let s=fs.readFileSync(f,"utf8");s=s.replace(/^#\s*(existing_pg_cluster_name\s*=.*)$/m,"$1");fs.writeFileSync(f,s)' "$tfv" "$found"
|
|
176
172
|
ok "Reusing $found"
|
|
@@ -206,6 +202,13 @@ cmd_deploy() {
|
|
|
206
202
|
fi
|
|
207
203
|
ok "terraform.tfvars is complete"
|
|
208
204
|
|
|
205
|
+
# SIZE IS NOT A ONE-WAY DOOR. small is the POC box, and the plan below is about to
|
|
206
|
+
# quote its monthly cost — the moment someone wonders whether they are committing to
|
|
207
|
+
# it. One line, here, rather than a discovery later.
|
|
208
|
+
local cur_size
|
|
209
|
+
cur_size=$(grep -E '^size[[:space:]]*=' "$tfv" 2>/dev/null | sed -E 's/.*"([^"]+)".*/\1/')
|
|
210
|
+
[ -n "$cur_size" ] && info "Size: ${BOLD}${cur_size}${NC} ${DIM}(small · medium · large — change it in terraform.tfvars and deploy again whenever you outgrow it)${NC}"
|
|
211
|
+
|
|
209
212
|
# STRAIGHT INTO TERRAFORM. Its plan plus its own typed "yes" IS the decision gate
|
|
210
213
|
# for billable infrastructure; a [Y/n] in front of it was asking permission to ask
|
|
211
214
|
# permission. Answering "no" is terraform's "no".
|
package/package.json
CHANGED