Deploy Single Device

Deploy Terraform config to one Junos device. Use when user says deploy one device, run targeted plan, or push config to a particular device alias.

juniper 7784315 1.2 KB Updated

File contents

Deploy Terraform config to a single target device safely.

Inputs

  • Terraform working directory
  • Device identifier (resource address or provider alias)
  • Optional custom plan filename

Steps

  1. Validate context
  • Confirm current working directory contains Terraform files.
  • Confirm provider endpoint and port are configured for the target alias.
  1. Resolve target
  • If user gives a hostname/alias, derive the Terraform resource address.
  • If ambiguous, list candidate resources and ask user to choose.
  1. Create targeted plan
terraform plan -target='<resource-address>' -out one-device.plan
  1. Apply targeted plan
terraform apply one-device.plan
  1. Verify post-apply
terraform state show '<resource-address>'
terraform plan
  1. Report
  • Summarize applied resource, endpoint used, and whether final full plan is clean.

Guardrails

  • Prefer saved plan files for targeted operations.
  • Do not use -auto-approve unless user explicitly asks.
  • If endpoint lookup/connectivity fails, stop and provide host/port remediation steps.

juniper/junos-terraform/tree/main/.github/skills/deploy-single-device commit 7784315c56

Frequently asked questions

npx skillmds@latest add juniper/deploy-single-device