Relax readonly requirement for generated nodejs resource args (#6980)
This commit is contained in:
parent
59992cff97
commit
b4323ea437
|
@ -22,7 +22,7 @@ export function argFunction(args?: ArgFunctionArgs, opts?: pulumi.InvokeOptions)
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ArgFunctionArgs {
|
export interface ArgFunctionArgs {
|
||||||
readonly name?: random.RandomPet;
|
name?: random.RandomPet;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ArgFunctionResult {
|
export interface ArgFunctionResult {
|
||||||
|
|
|
@ -64,6 +64,6 @@ export class Cat extends pulumi.CustomResource {
|
||||||
* The set of arguments for constructing a Cat resource.
|
* The set of arguments for constructing a Cat resource.
|
||||||
*/
|
*/
|
||||||
export interface CatArgs {
|
export interface CatArgs {
|
||||||
readonly age?: pulumi.Input<number>;
|
age?: pulumi.Input<number>;
|
||||||
readonly pet?: pulumi.Input<inputs.PetArgs>;
|
pet?: pulumi.Input<inputs.PetArgs>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,5 +69,5 @@ export class Component extends pulumi.CustomResource {
|
||||||
* The set of arguments for constructing a Component resource.
|
* The set of arguments for constructing a Component resource.
|
||||||
*/
|
*/
|
||||||
export interface ComponentArgs {
|
export interface ComponentArgs {
|
||||||
readonly metadata?: pulumi.Input<kubernetes.types.input.meta.v1.ObjectMetaArgs>;
|
metadata?: pulumi.Input<kubernetes.types.input.meta.v1.ObjectMetaArgs>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,9 +65,9 @@ export interface NurseryArgs {
|
||||||
/**
|
/**
|
||||||
* The sizes of trees available
|
* The sizes of trees available
|
||||||
*/
|
*/
|
||||||
readonly sizes?: pulumi.Input<{[key: string]: pulumi.Input<enums.tree.v1.TreeSize>}>;
|
sizes?: pulumi.Input<{[key: string]: pulumi.Input<enums.tree.v1.TreeSize>}>;
|
||||||
/**
|
/**
|
||||||
* The varieties available
|
* The varieties available
|
||||||
*/
|
*/
|
||||||
readonly varieties: pulumi.Input<pulumi.Input<enums.tree.v1.RubberTreeVariety>[]>;
|
varieties: pulumi.Input<pulumi.Input<enums.tree.v1.RubberTreeVariety>[]>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,16 +75,16 @@ export class RubberTree extends pulumi.CustomResource {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RubberTreeState {
|
export interface RubberTreeState {
|
||||||
readonly farm?: pulumi.Input<enums.tree.v1.Farm | string>;
|
farm?: pulumi.Input<enums.tree.v1.Farm | string>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The set of arguments for constructing a RubberTree resource.
|
* The set of arguments for constructing a RubberTree resource.
|
||||||
*/
|
*/
|
||||||
export interface RubberTreeArgs {
|
export interface RubberTreeArgs {
|
||||||
readonly container?: pulumi.Input<inputs.ContainerArgs>;
|
container?: pulumi.Input<inputs.ContainerArgs>;
|
||||||
readonly diameter: pulumi.Input<enums.tree.v1.Diameter>;
|
diameter: pulumi.Input<enums.tree.v1.Diameter>;
|
||||||
readonly farm?: pulumi.Input<enums.tree.v1.Farm | string>;
|
farm?: pulumi.Input<enums.tree.v1.Farm | string>;
|
||||||
readonly size?: pulumi.Input<enums.tree.v1.TreeSize>;
|
size?: pulumi.Input<enums.tree.v1.TreeSize>;
|
||||||
readonly type: pulumi.Input<enums.tree.v1.RubberTreeVariety>;
|
type: pulumi.Input<enums.tree.v1.RubberTreeVariety>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,13 +81,13 @@ export class Component extends pulumi.ComponentResource {
|
||||||
* The set of arguments for constructing a Component resource.
|
* The set of arguments for constructing a Component resource.
|
||||||
*/
|
*/
|
||||||
export interface ComponentArgs {
|
export interface ComponentArgs {
|
||||||
readonly a: boolean;
|
a: boolean;
|
||||||
readonly b?: boolean;
|
b?: boolean;
|
||||||
readonly bar?: inputs.Foo;
|
bar?: inputs.Foo;
|
||||||
readonly baz?: inputs.Foo[];
|
baz?: inputs.Foo[];
|
||||||
readonly c: number;
|
c: number;
|
||||||
readonly d?: number;
|
d?: number;
|
||||||
readonly e: string;
|
e: string;
|
||||||
readonly f?: string;
|
f?: string;
|
||||||
readonly foo?: pulumi.Input<inputs.FooArgs>;
|
foo?: pulumi.Input<inputs.FooArgs>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ export function argFunction(args?: ArgFunctionArgs, opts?: pulumi.InvokeOptions)
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ArgFunctionArgs {
|
export interface ArgFunctionArgs {
|
||||||
readonly arg1?: Resource;
|
arg1?: Resource;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ArgFunctionResult {
|
export interface ArgFunctionResult {
|
||||||
|
|
|
@ -49,5 +49,5 @@ export class OtherResource extends pulumi.ComponentResource {
|
||||||
* The set of arguments for constructing a OtherResource resource.
|
* The set of arguments for constructing a OtherResource resource.
|
||||||
*/
|
*/
|
||||||
export interface OtherResourceArgs {
|
export interface OtherResourceArgs {
|
||||||
readonly foo?: pulumi.Input<Resource>;
|
foo?: pulumi.Input<Resource>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,5 +59,5 @@ export class Resource extends pulumi.CustomResource {
|
||||||
* The set of arguments for constructing a Resource resource.
|
* The set of arguments for constructing a Resource resource.
|
||||||
*/
|
*/
|
||||||
export interface ResourceArgs {
|
export interface ResourceArgs {
|
||||||
readonly bar?: pulumi.Input<string>;
|
bar?: pulumi.Input<string>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -716,13 +716,13 @@ func (mod *modContext) genResource(w io.Writer, r *schema.Resource) error {
|
||||||
// Emit the state type for get methods.
|
// Emit the state type for get methods.
|
||||||
if r.StateInputs != nil {
|
if r.StateInputs != nil {
|
||||||
fmt.Fprintf(w, "\n")
|
fmt.Fprintf(w, "\n")
|
||||||
mod.genPlainType(w, stateType, r.StateInputs.Comment, r.StateInputs.Properties, true, true, true, 0)
|
mod.genPlainType(w, stateType, r.StateInputs.Comment, r.StateInputs.Properties, true, true, false, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Emit the argument type for construction.
|
// Emit the argument type for construction.
|
||||||
fmt.Fprintf(w, "\n")
|
fmt.Fprintf(w, "\n")
|
||||||
argsComment := fmt.Sprintf("The set of arguments for constructing a %s resource.", name)
|
argsComment := fmt.Sprintf("The set of arguments for constructing a %s resource.", name)
|
||||||
mod.genPlainType(w, argsType, argsComment, r.InputProperties, true, true, true, 0)
|
mod.genPlainType(w, argsType, argsComment, r.InputProperties, true, true, false, 0)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -793,7 +793,7 @@ func (mod *modContext) genFunction(w io.Writer, fun *schema.Function) {
|
||||||
// If there are argument and/or return types, emit them.
|
// If there are argument and/or return types, emit them.
|
||||||
if fun.Inputs != nil {
|
if fun.Inputs != nil {
|
||||||
fmt.Fprintf(w, "\n")
|
fmt.Fprintf(w, "\n")
|
||||||
mod.genPlainType(w, title(name)+"Args", fun.Inputs.Comment, fun.Inputs.Properties, true, false, true, 0)
|
mod.genPlainType(w, title(name)+"Args", fun.Inputs.Comment, fun.Inputs.Properties, true, false, false, 0)
|
||||||
}
|
}
|
||||||
if fun.Outputs != nil {
|
if fun.Outputs != nil {
|
||||||
fmt.Fprintf(w, "\n")
|
fmt.Fprintf(w, "\n")
|
||||||
|
|
Loading…
Reference in a new issue