You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)
Issue details
It would be nice as part of the vscode extension to get some code snippets. For example having a snippet for component resources or dynamic resources would save time and make it easier on users. It would also help to guide them in best practices.
Example Typescript Component Resource Code Snippet
{
"Pulumi Component Resource": {
"prefix": "pulumi-component",
"body": [
"import * as pulumi from '@pulumi/pulumi';",
"",
"export interface ${1:ComponentResourceArgs} {",
" ${2:property1}?: pulumi.Input<string>;",
" ${3:property2}?: pulumi.Input<number>;",
"}",
"",
"export class ${4:MyComponentResource} extends pulumi.ComponentResource {",
" public readonly ${5:outputProperty}: pulumi.Output<string>;",
"",
" constructor(name: string, args: ${1:ComponentResourceArgs}, opts?: pulumi.CustomResourceOptions) {",
" super('${6:my:module:ComponentResource}', name, {}, opts);",
"",
" // Example of using the args to define resources",
" const exampleResource = new pulumi.resource.${7:SomeResource}('${8:exampleResource}', {",
" ${2:property1}: args.${2:property1},",
" }, { parent: this });",
"",
" // Example of exporting a property from the component",
" this.${5:outputProperty} = pulumi.output('${9:some-output-value}');",
"",
" this.registerOutputs({",
" ${5:outputProperty}: this.${5:outputProperty}",
" });",
" }",
"}"
],
"description": "Pulumi TypeScript Component Resource template"
}
}
Affected area/feature
The text was updated successfully, but these errors were encountered:
Hello!
Issue details
It would be nice as part of the vscode extension to get some code snippets. For example having a snippet for component resources or dynamic resources would save time and make it easier on users. It would also help to guide them in best practices.
Example Typescript Component Resource Code Snippet
Affected area/feature
The text was updated successfully, but these errors were encountered: