package-usage

โดย pulumi

ติดตามว่าสแต็กใดในองค์กร Pulumi ที่ใช้แพ็กเกจเฉพาะและในเวอร์ชันใด ใช้สำหรับการตรวจสอบข้ามสแต็ก ระบุเวอร์ชันที่ล้าสมัยหรือไม่ได้รับการดูแล...

npx skills add https://github.com/pulumi/agent-skills --skill package-usage

API Reference

Query the Pulumi Cloud API with the pulumi api CLI subcommand. It authenticates with your existing Pulumi credentials and returns JSON.

Get the latest version of a package

pulumi api /api/registry/packages -F name={package_name} -F orgLogin={orgName}

Include orgLogin with the user's organization name. Omit -F name=... to list all packages visible to the organization (useful when the user has not named a specific package). The response contains a packages array. Each entry has a version field (the latest version), plus name, publisher, source, and packageStatus.

Get stack usage for a package

pulumi api /api/orgs/{orgName}/packages/usage -F packageName={package_name}

Replace {orgName} with the org name from context, PULUMI_ORG, or ask the user. packageName is required; query one package at a time.

Response fields:

  • packageName: The queried package
  • stacks: Array of {stackName, projectName, version, lastUpdate}
  • totalStacks: Total count

Workflow: Find outdated stacks

Use when the user wants to know which stacks are using an outdated version of a package.

  1. Get the latest version of the package
  2. Get stack usage for the package
  3. Compare each stack's version against the latest to identify outdated stacks
  4. Present results using the output format below

Output Format

Present results as a markdown table followed by a summary line:

| Project | Stack | Current Version | Latest Version | Status |
|---------|-------|-----------------|----------------|--------|
| my-app  | dev   | 6.40.0          | 6.52.0         | Outdated |
| my-app  | prod  | 6.52.0          | 6.52.0         | Up-to-date |

2 of 2 stacks checked. 1 outdated.

Out of scope: upgrading a specific stack

This skill identifies outdated stacks. It does not perform the upgrade itself. For actually bumping a package version in a project — editing package.json, requirements.txt, pyproject.toml, go.mod, or Pulumi.yaml, running pulumi preview, and reconciling the diff — hand off to the provider-upgrade skill.

Skills เพิ่มเติมจาก pulumi

pulumi-debug-failed-operation
pulumi
ดีบักการอัปเดตหรือพรีวิว Pulumi ที่ล้มเหลว: อ่านความล้มเหลวที่ Pulumi บันทึกไว้แล้ว ค้นหาสาเหตุที่ทำให้เกิด และแก้ไข โหลดสกิลนี้เมื่อผู้ใช้ขอให้…
provider-upgrade
pulumi
การอัปเกรดผู้ให้บริการคือการแปล ไม่ใช่คำขอเปลี่ยนแปลง
cloudformation-to-pulumi
pulumi
แปลง, ย้าย หรือนำเข้า AWS CloudFormation stacks หรือ templates ไปยัง Pulumi programs โหลดทักษะนี้เมื่อผู้ใช้ต้องการย้ายจาก CloudFormation ไปยัง…
pulumi-arm-to-pulumi
pulumi
แปลง ARM templates, Bicep หรือทรัพยากร Azure ที่มีอยู่เป็นโค้ดโครงสร้างพื้นฐานของ Pulumi รองรับการแปลง ARM template แบบสมบูรณ์เป็น Pulumi (TypeScript, Python, Go, C#, Java หรือ YAML) พร้อมรองรับพารามิเตอร์ ตัวแปร ลูป เงื่อนไข และเทมเพลตแบบซ้อน รองรับทั้ง azure-native (ครอบคลุม API เต็มรูปแบบ) และ azure (แบบคลาสสิก แบบย่อ) โดยเลือกผู้ให้บริการที่เหมาะสมให้กับแต่ละทรัพยากรโดยอัตโนมัติ นำเข้าทรัพยากร Azure ที่ปรับใช้แล้วเข้าสู่ Pulumi พร้อมการตรวจสอบความถูกต้องแบบ zero-diff...
pulumi-cdk-to-pulumi
pulumi
โหลดสกิลนี้เมื่อผู้ใช้ต้องการย้าย, แปลง, พอร์ต, แปลภาษา, หรือย้ายแอปพลิเคชัน AWS CDK (รวมถึง CDK stacks, constructs, หรือ...)
pulumi-migrate-from-discovered-stack
pulumi
ย้ายสแตก CloudFormation หรือ ARM ไปยังสแตก Pulumi โดยอ้างอิงจากสแตกที่ฟีเจอร์ Discovery ของ Pulumi Cloud ค้นพบและเปิดเผยผ่าน…
pulumi-automation-api
pulumi
การจัดเรียงการทำงานของโครงสร้างพื้นฐาน Pulumi แบบโปรแกรมเมติกข้ามหลายสแต็กและแอปพลิเคชัน รองรับทั้งสถาปัตยกรรมแหล่งที่มาในเครื่อง (โปรเจกต์ Pulumi ที่มีอยู่) และแหล่งที่มาแบบอินไลน์ (โปรแกรมที่ฝังตัว) ทำให้สามารถปรับใช้รูปแบบการปรับใช้ได้อย่างยืดหยุ่นตั้งแต่สถานการณ์ง่ายไปจนถึงซับซ้อนหลายสแต็ก จัดการการจัดเรียงหลายสแต็กด้วยลำดับการพึ่งพา การปรับใช้แบบอิสระแบบขนาน และการส่งผ่านเอาต์พุตข้ามสแต็กสำหรับการจัดเตรียมโครงสร้างพื้นฐานที่ประสานงานกัน ให้การทำงานแบบโปรแกรมเมติก...
pulumi-best-practices
pulumi
แนวทางปฏิบัติที่ดีที่สุดสำหรับการเขียนโค้ดโครงสร้างพื้นฐาน Pulumi ที่เชื่อถือได้และบำรุงรักษาได้ หลีกเลี่ยงการสร้างทรัพยากรภายใน callback ของ apply() ส่งผ่านอ็อบเจกต์ Output โดยตรงเป็นอินพุตเพื่อรักษาการติดตามการพึ่งพาและการมองเห็นในตัวอย่าง ใช้คลาส ComponentResource เพื่อจัดกลุ่มทรัพยากรที่เกี่ยวข้องเป็นหน่วยตรรกะที่นำกลับมาใช้ใหม่ได้พร้อมลำดับชั้น parent-child ที่เหมาะสมผ่าน parent: this เข้ารหัสความลับตั้งแต่เริ่มต้นด้วยแฟล็ก --secret หรือ config.requireSecret() เพื่อป้องกันการรั่วไหลของข้อมูลประจำตัวในไฟล์สถานะ...