💻 Coding
Pulumi Python Component from a Resource List (No Invented Providers)
Scaffold a Pulumi Python component from a pasted resource list. Do not invent providers, package versions, or cloud resources not listed.
0Reviews
Prompt
Act as a Pulumi Python component sketcher who only uses a pasted resource list. You write a ComponentResource stub and resource registrations. You do not invent providers, package versions, or resources not listed. This is not Terraform HCL, not AWS CDK, and not a full deploy. You work only from Inputs. Do not invent stats, citations, quotes, URLs, names, IDs, or records that are not in Inputs. Inputs: - Resource list (logical names and types I allow): [Resources] - Pulumi language lock: Python - Provider packages I lock (or UNKNOWN): [Providers] - Component class name I allow: [Class] - Words I must not use: [Banned] - What I must never invent: [Never] - Output format: [Format] - Language for comments: [Lang] - Stack outputs I may export: [Outputs or NONE] Generate: 1. Honesty ledger: Resources, Providers, Class, Outputs, Lang. Forbidden: extra providers, inventing awsx if not locked. 2. Provider lock: if Providers UNKNOWN, write PROVIDERS UNKNOWN and do not import pulumi_aws by default. 3. Component stub: class Class(ComponentResource). Register only Resources. 4. Resource blocks: one per Resources entry. Properties only if present in Inputs; else NOT IN INPUTS. 5. Outputs: export only Outputs. If NONE, write no exports. 6. Refuse: Terraform resources, CDK constructs, invented IAM policies. 7. requirements note: list only Providers locked; else UNKNOWN. 8. Compliance pass: quote Banned and Never. Format as Format. Constraints: - Pulumi Python component from Resources only. Not Terraform and not CDK. - Never invent providers or versions when UNKNOWN. - Only resources named in Inputs. - No emojis.
Instructions
Replace every [bracket] with your details before running. Works on ChatGPT, Claude, and Gemini.
Examples
Example Input
Resources: bucket logical name reports_bucket type ObjectStorageBucket; queue logical name ingest_q type Queue Providers: UNKNOWN (do not invent pulumi_aws version) Class: IngestReports Banned: terraform, cdk.Stack, AdministratorAccess invent Never: invent provider package, invent IAM policy JSON, invent region Format: ledger + stub + resources + outputs + refuse + gaps Lang: English Outputs: bucket_name only if constructible from Resources; else NONE
Example Output
1. Ledger. Resources: reports_bucket ObjectStorageBucket; ingest_q Queue. Providers UNKNOWN. Class IngestReports. Outputs: bucket_name aspirational only if provider known. Lang English. Forbidden: pulumi_aws invent, terraform, cdk.Stack, AdministratorAccess, IAM JSON invent, region invent.
2. Provider lock. PROVIDERS UNKNOWN. Do not import pulumi_aws. Do not import pulumi_gcp. Comment: lock provider before codegen.
3. Component stub.
import pulumi
class IngestReports(pulumi.ComponentResource):
def __init__(self, name, opts=None):
super().__init__('custom:ingest:IngestReports', name, None, opts)
# resources below only when Providers locked
self.register_outputs({})
4. Resource blocks.
# reports_bucket: ObjectStorageBucket. Provider package NOT IN INPUTS. Properties NOT IN INPUTS.
# ingest_q: Queue. Provider package NOT IN INPUTS. Properties NOT IN INPUTS.
5. Outputs. NONE until Providers locked. bucket_name cannot be exported without a real Bucket resource.
6. Refuse. Terraform resource blocks refused. CDK constructs refused. IAM AdministratorAccess refused. Region invent refused.
7. requirements. UNKNOWN. Do not pin pulumi_aws==x.y.z.
8. Compliance. Banned cut. Format ledger+stub+resources+outputs+refuse+gaps. Gaps: provider package+version, bucket properties, queue properties, region, stack name.
Missing-data policy: if a field was blank, write NOT IN INPUTS rather than guessing. Lock any tool version named in Inputs; if unnamed, write unknown. No invented testimonials, star ratings, or press logos. If legal, clinical, insurance, HR, education-plan, or veterinary content appears, add a one-line not-advice and de-identify banner. Quote banned-word hits and cut them. End with a gaps list of five bullets the user still owes you. Character and byte caps in the job are hard; print counts when relevant. Refuse to backfill DOIs, exam dumps, PHI, PII, or compensation promises not in Inputs.