@ductape/cli 0.5.6 → 0.5.7
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/dist/index.js +2 -2
- package/dist/lib/cloud-connection.js +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -127,7 +127,7 @@ const codeTarget = (c) => c
|
|
|
127
127
|
.option('--product <tag>').option('--function <name>').option('--fn-version <version>').option('--env <slug>');
|
|
128
128
|
remote('step-up', 'start', 'Email yourself a six-digit code for one change (a person only)', codeTarget).action(op('stepup.start'));
|
|
129
129
|
remote('step-up', 'verify', 'Check the code and print a grant, good for ten minutes and for that one change; put it in an environment variable and pass its name with --grant-env', (c) => codeTarget(c).requiredOption('--code <code>', 'the six-digit code from your email')).action(op('stepup.verify'));
|
|
130
|
-
remote('plans', 'create', 'Create a plan from a JSON file; nothing is changed', (c) => c.requiredOption('--file <file>', 'Plan request JSON')).action(op('plans.create'));
|
|
130
|
+
remote('plans', 'create', 'Create a plan from a JSON file; nothing is changed', (c) => c.requiredOption('--file <file>', 'Plan request JSON (static egress uses runtime.vpcEgress on Cloud Run with optional provision: true or runtime.awsVpcEgress on Lambda or ECS Fargate)')).action(op('plans.create'));
|
|
131
131
|
remote('plans', 'approve <planId>', 'Approve a plan (a person only; refused for agents)', grantOption).action(op('plans.approve'));
|
|
132
132
|
remote('plans', 'list', 'List plans with where each stands: blocked, pending_approval, approved, ready, applied or expired', (c) => c.option('--product <tag>').option('--env <env>').option('--stage <stage>')).action(op('plans.list'));
|
|
133
133
|
remote('plans', 'get <planId>', 'Show one plan: what it would change, its warnings and the state of the cloud it was made from').action(op('plans.get'));
|
|
@@ -136,7 +136,7 @@ remote('deployments', 'list', 'List deployments (functions and services)', (c) =
|
|
|
136
136
|
remote('deployments', 'get <deploymentId>', 'Show one deployment').action(op('deployments.get'));
|
|
137
137
|
remote('deployments', 'journal <deploymentId>', 'Show a deployment\'s journal').action(op('deployments.journal'));
|
|
138
138
|
const planFromDeployment = (c) => c
|
|
139
|
-
.option('--runtime-file <file>', 'Runtime settings JSON that replace the deployment\'s own (cpu, memory, minInstances, maxInstances
|
|
139
|
+
.option('--runtime-file <file>', 'Runtime settings JSON that replace the deployment\'s own (cpu, memory, minInstances, maxInstances, or Cloud Run vpcEgress with network and subnet names)')
|
|
140
140
|
.option('--observed-file <file>', 'What the provider holds; only while the control plane does not read the provider itself');
|
|
141
141
|
remote('deployments', 'redeploy <deploymentId>', 'Plan running the deployment\'s current release again (retry a failed one); nothing changes until the plan is approved and applied', planFromDeployment).action(op('deployments.redeploy'));
|
|
142
142
|
remote('deployments', 'rollback <deploymentId>', 'Plan putting an earlier release back at full traffic (default: the last one that held all traffic)', (c) => planFromDeployment(c).option('--release-hash <hash>', 'A release this deployment has run')).action(op('deployments.rollback'));
|
|
@@ -309,6 +309,9 @@ export const GCP_DEPLOY_CREATES = [
|
|
|
309
309
|
];
|
|
310
310
|
export const GCP_DEPLOY_SAFETY = 'Ductape only adds resources it labels as its own (ductape_managed), never changes or reuses one it did not create, and never deletes anything, including what it created. Removing deployed resources is always your own action. Use a dedicated project if you can, so what Ductape adds is easy to see.';
|
|
311
311
|
export const GCP_DEPLOY_TROUBLESHOOTING = [
|
|
312
|
+
{ problem: 'Static egress creation fails with a Compute API or IAM error', fix: 'Enable compute.googleapis.com in the connected project. Grant the connection service account the Compute permissions named in the error, then retry the deployment. The journal records the outbound IPv4 once the network is ready.' },
|
|
313
|
+
{ problem: 'Cloud Run cannot attach the VPC subnet', fix: 'Check that the subnet belongs to the selected VPC and is in the deployment region and connected project. If Google Cloud reports an IAM denial, check the principal and permission named in the error.' },
|
|
314
|
+
{ problem: 'Cloud Run starts but Atlas connections time out or fail during TLS setup', fix: 'Check that Cloud NAT serves the selected subnet and uses a reserved IPv4. Verify the actual outbound IP from the revision and allowlist it as a /32 in Atlas. If the Ductape resolver returns 502, check the integrations logs for that request separately.' },
|
|
312
315
|
{ problem: '"<API> has not been used in project <PROJECT_ID> before or it is disabled"', fix: 'Enable that API (step 1), wait a minute or two for it to take effect, and try again.' },
|
|
313
316
|
{ problem: 'Validation lists missing permissions and the roles that grant them', fix: 'Grant exactly those roles to the Ductape service account on the project (step 3) and validate again. Role changes can take a minute to apply.' },
|
|
314
317
|
{ problem: '"caller does not have permission to act as service account ..." when a build or deploy starts', fix: 'Grant roles/iam.serviceAccountUser to the Ductape service account on the project. Cloud Build and Cloud Run run as a service account, and the Ductape account must be allowed to act as it.' },
|
|
@@ -595,7 +598,7 @@ export function connectionGuide(providerInput, purposeInput = 'resources') {
|
|
|
595
598
|
},
|
|
596
599
|
{
|
|
597
600
|
step: 4, who: 'you', title: 'Deploy the template into the resource group',
|
|
598
|
-
commands: ['az deployment group create --resource-group ductape-deploy --template-file ductape-deploy.json --query properties.outputs'],
|
|
601
|
+
commands: ['az deployment group create --resource-group ductape-deploy --template-file ductape-deploy.json --query properties.outputs', '# Static egress: add --parameters environmentName=ductape-env-nat provisionStaticEgress=true (creates a billable NAT gateway and static IP). To reuse a delegated NAT subnet, set infrastructureSubnetId instead.'],
|
|
599
602
|
notes: ['It creates a user assigned identity for your apps to run as, a container registry, a log workspace and a container apps environment, and lets the identity pull from the registry. Read it first. The role assignment in it needs you to hold Owner or User Access Administrator on the group.', 'The outputs give the registry name, environment name and identity id used in step 6.'],
|
|
600
603
|
},
|
|
601
604
|
{
|
package/package.json
CHANGED