diff --git a/examples/go/main.go b/examples/go/main.go index e294f81..f7bd6c7 100644 --- a/examples/go/main.go +++ b/examples/go/main.go @@ -7,8 +7,8 @@ import ( func main() { pulumi.Run(func(ctx *pulumi.Context) error { - instanceResourceModel, err := compose.NewInstanceResourceModel(ctx, "instanceResourceModel", &compose.InstanceResourceModelArgs{ - Client: &compose.ClientModelArgs{ + aemInstance, err := compose.NewInstance(ctx, "aem_instance", &compose.InstanceArgs{ + Client: &compose.ClientArgs{ Type: pulumi.String("ssh"), Settings: pulumi.StringMap{ "host": pulumi.String("x.x.x.x"), @@ -28,7 +28,7 @@ func main() { return err } ctx.Export("output", pulumi.Map{ - "aemInstances": instanceResourceModel.Instances, + "aemInstances": aemInstance.Instances, }) return nil }) diff --git a/examples/go_aws_ssh/main.go b/examples/go_aws_ssh/main.go index 39f456d..6ac3b05 100644 --- a/examples/go_aws_ssh/main.go +++ b/examples/go_aws_ssh/main.go @@ -111,8 +111,8 @@ func main() { return err } - instanceResourceModel, err := compose.NewInstanceResourceModel(ctx, "aem_single", &compose.InstanceResourceModelArgs{ - Client: compose.ClientModelArgs{ + aemInstance, err := compose.NewInstance(ctx, "aem_instance", &compose.InstanceArgs{ + Client: compose.ClientArgs{ Type: pulumi.String("ssh"), Settings: pulumi.StringMap{ "host": instance.PublicIp, @@ -124,7 +124,7 @@ func main() { "private_key": pulumi.String(privateKey), }, }, - System: compose.SystemModelArgs{ + System: compose.SystemArgs{ Data_dir: pulumi.String(composeDir), Bootstrap: compose.InstanceScriptArgs{ Inline: pulumi.StringArray{ @@ -140,7 +140,7 @@ func main() { }, }, }, - Compose: compose.ComposeModelArgs{ + Compose: compose.ComposeArgs{ Config: pulumi.String(configYML), Create: compose.InstanceScriptArgs{ Inline: pulumi.StringArray{ @@ -165,7 +165,7 @@ func main() { ctx.Export("output", pulumi.Map{ "instanceIp": instance.PublicIp, - "aemInstances": instanceResourceModel.Instances, + "aemInstances": aemInstance.Instances, }) return nil }) diff --git a/examples/go_aws_ssm/main.go b/examples/go_aws_ssm/main.go index 5003137..99ef730 100644 --- a/examples/go_aws_ssm/main.go +++ b/examples/go_aws_ssm/main.go @@ -99,14 +99,14 @@ sudo dnf install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/late return err } - instanceResourceModel, err := compose.NewInstanceResourceModel(ctx, "aem_single", &compose.InstanceResourceModelArgs{ - Client: compose.ClientModelArgs{ + aemInstance, err := compose.NewInstance(ctx, "aem_instance", &compose.InstanceArgs{ + Client: compose.ClientArgs{ Type: pulumi.String("aws-ssm"), Settings: pulumi.StringMap{ "instance_id": instance.ID(), }, }, - System: compose.SystemModelArgs{ + System: compose.SystemArgs{ Data_dir: pulumi.String(composeDir), Bootstrap: compose.InstanceScriptArgs{ Inline: pulumi.StringArray{ @@ -121,7 +121,7 @@ sudo dnf install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/late }, }, }, - Compose: compose.ComposeModelArgs{ + Compose: compose.ComposeArgs{ Create: compose.InstanceScriptArgs{ Inline: pulumi.StringArray{ pulumi.Sprintf("mkdir -p '%s/aem/home/lib'", composeDir), @@ -145,7 +145,7 @@ sudo dnf install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/late ctx.Export("output", pulumi.Map{ "instanceIp": instance.PublicIp, - "aemInstances": instanceResourceModel.Instances, + "aemInstances": aemInstance.Instances, }) return nil }) diff --git a/examples/go_bare_metal/main.go b/examples/go_bare_metal/main.go index cd1c48e..f761538 100644 --- a/examples/go_bare_metal/main.go +++ b/examples/go_bare_metal/main.go @@ -11,8 +11,8 @@ var privateKey string func main() { pulumi.Run(func(ctx *pulumi.Context) error { - instanceResourceModel, err := compose.NewInstanceResourceModel(ctx, "aem_single", &compose.InstanceResourceModelArgs{ - Client: compose.ClientModelArgs{ + aemInstance, err := compose.NewInstance(ctx, "aem_instance", &compose.InstanceArgs{ + Client: compose.ClientArgs{ Type: pulumi.String("ssh"), Settings: pulumi.StringMap{ "host": pulumi.String("x.x.x.x"), @@ -33,7 +33,7 @@ func main() { } ctx.Export("output", pulumi.Map{ - "aemInstances": instanceResourceModel.Instances, + "aemInstances": aemInstance.Instances, }) return nil }) diff --git a/examples/nodejs/index.ts b/examples/nodejs/index.ts index 0d904a1..dab3403 100644 --- a/examples/nodejs/index.ts +++ b/examples/nodejs/index.ts @@ -1,7 +1,7 @@ import * as pulumi from "@pulumi/pulumi"; -import * as aem from "@pulumi/aem"; +import * as aem from "@wttech/aem"; -const instanceResourceModel = new aem.compose.InstanceResourceModel("instanceResourceModel", { +const aemInstance = new aem.compose.Instance("aem_instance", { client: { type: "ssh", settings: { @@ -19,5 +19,5 @@ const instanceResourceModel = new aem.compose.InstanceResourceModel("instanceRes }, }); export const output = { - aemInstances: instanceResourceModel.instances, + aemInstances: aemInstance.instances, }; diff --git a/examples/nodejs/package.json b/examples/nodejs/package.json index 4c8e480..ce41aa7 100644 --- a/examples/nodejs/package.json +++ b/examples/nodejs/package.json @@ -6,6 +6,6 @@ "dependencies": { "typescript": "^4.0.0", "@pulumi/pulumi": "^3.0.0", - "@pulumi/aem": "0.0.1-alpha.1709303771+8ae75eae.dirty" + "@wttech/aem": "0.0.1-alpha.1699945013+97b0e04c" } } \ No newline at end of file diff --git a/examples/nodejs_aws_ssh/index.ts b/examples/nodejs_aws_ssh/index.ts index 633c3d1..93b5cc7 100644 --- a/examples/nodejs_aws_ssh/index.ts +++ b/examples/nodejs_aws_ssh/index.ts @@ -75,7 +75,7 @@ const volumeAttachment = new aws.ec2.VolumeAttachment("aem_single_data", { instanceId: instance.id, }); -const instanceResourceModel = new aem.compose.InstanceResourceModel("aem_single", { +const aemInstance = new aem.compose.Instance("aem_instance", { client: { type: "ssh", settings: { @@ -126,5 +126,5 @@ const instanceResourceModel = new aem.compose.InstanceResourceModel("aem_single" export const output = { instanceIp: instance.publicIp, - aemInstances: instanceResourceModel.instances, + aemInstances: aemInstance.instances, }; diff --git a/examples/nodejs_aws_ssm/index.ts b/examples/nodejs_aws_ssm/index.ts index e850e93..17805cb 100644 --- a/examples/nodejs_aws_ssm/index.ts +++ b/examples/nodejs_aws_ssm/index.ts @@ -68,7 +68,7 @@ const volumeAttachment = new aws.ec2.VolumeAttachment("aem_single_data", { instanceId: instance.id, }); -const instanceResourceModel = new aem.compose.InstanceResourceModel("aem_single", { +const aemInstance = new aem.compose.Instance("aem_instance", { client: { type: "aws-ssm", settings: { @@ -111,5 +111,5 @@ const instanceResourceModel = new aem.compose.InstanceResourceModel("aem_single" export const output = { instanceIp: instance.publicIp, - aemInstances: instanceResourceModel.instances, + aemInstances: aemInstance.instances, }; diff --git a/examples/nodejs_bare_metal/index.ts b/examples/nodejs_bare_metal/index.ts index 98e62c6..7582fc9 100644 --- a/examples/nodejs_bare_metal/index.ts +++ b/examples/nodejs_bare_metal/index.ts @@ -3,7 +3,7 @@ import * as fs from "fs"; const privateKey = fs.readFileSync("ec2-key.cer", "utf8"); -const instanceResourceModel = new aem.compose.InstanceResourceModel("aem_single", { +const aemInstance = new aem.compose.Instance("aem_instance", { client: { type: "ssh", settings: { @@ -22,5 +22,5 @@ const instanceResourceModel = new aem.compose.InstanceResourceModel("aem_single" }); export const output = { - aemInstances: instanceResourceModel.instances, + aemInstances: aemInstance.instances, }; diff --git a/examples/yaml/Pulumi.yaml b/examples/yaml/Pulumi.yaml index ebba86a..ca03d14 100644 --- a/examples/yaml/Pulumi.yaml +++ b/examples/yaml/Pulumi.yaml @@ -6,8 +6,8 @@ plugins: path: ../../bin resources: - instanceResourceModel: - type: aem:compose:InstanceResourceModel + aemInstance: + type: aem:compose:Instance properties: client: type: "ssh" @@ -23,4 +23,4 @@ resources: outputs: output: - aemInstances: ${instanceResourceModel.instances} + aemInstances: ${aemInstance.instances} diff --git a/provider/instance_client.go b/provider/instance_client.go index c977460..3bc7857 100644 --- a/provider/instance_client.go +++ b/provider/instance_client.go @@ -13,7 +13,7 @@ const ( ServiceName = "aem" ) -type InstanceClient ClientContext[InstanceResourceModelArgs] +type InstanceClient ClientContext[InstanceArgs] func (ic *InstanceClient) Close() error { return ic.cl.Disconnect() diff --git a/provider/instance_resource.go b/provider/instance_resource.go index 279d4ec..49676dc 100644 --- a/provider/instance_resource.go +++ b/provider/instance_resource.go @@ -19,15 +19,15 @@ type InstanceResource struct { clientManager *client.ClientManager } -func (r *InstanceResource) Create(ctx p.Context, model InstanceResourceModelArgs) (*InstanceStatus, error) { +func (r *InstanceResource) Create(ctx p.Context, model InstanceArgs) (*InstanceStatus, error) { return r.createOrUpdate(ctx, model, true) } -func (r *InstanceResource) Update(ctx p.Context, model InstanceResourceModelArgs) (*InstanceStatus, error) { +func (r *InstanceResource) Update(ctx p.Context, model InstanceArgs) (*InstanceStatus, error) { return r.createOrUpdate(ctx, model, false) } -func (r *InstanceResource) createOrUpdate(ctx p.Context, model InstanceResourceModelArgs, create bool) (*InstanceStatus, error) { +func (r *InstanceResource) createOrUpdate(ctx p.Context, model InstanceArgs, create bool) (*InstanceStatus, error) { ctx.Log(diag.Info, "Started setting up AEM instance resource") ic, err := r.client(ctx, model, cast.ToDuration(model.Client.ActionTimeout)) @@ -90,7 +90,7 @@ func (r *InstanceResource) createOrUpdate(ctx p.Context, model InstanceResourceM return &status, nil } -func (r *InstanceResource) Delete(ctx p.Context, model InstanceResourceModelArgs) error { +func (r *InstanceResource) Delete(ctx p.Context, model InstanceArgs) error { ctx.Log(diag.Info, "Started deleting AEM instance resource") ic, err := r.client(ctx, model, cast.ToDuration(model.Client.StateTimeout)) @@ -119,7 +119,7 @@ func (r *InstanceResource) Delete(ctx p.Context, model InstanceResourceModelArgs return nil } -func (r *InstanceResource) client(ctx p.Context, model InstanceResourceModelArgs, timeout time.Duration) (*InstanceClient, error) { +func (r *InstanceResource) client(ctx p.Context, model InstanceArgs, timeout time.Duration) (*InstanceClient, error) { typeName := model.Client.Type ctx.Logf(diag.Info, "Connecting to AEM instance machine using %s", typeName) @@ -144,7 +144,7 @@ func (r *InstanceResource) client(ctx p.Context, model InstanceResourceModelArgs return &InstanceClient{cl, ctx, model}, nil } -func (r *InstanceResource) clientSettings(model InstanceResourceModelArgs) map[string]string { +func (r *InstanceResource) clientSettings(model InstanceArgs) map[string]string { settings := model.Client.Settings credentials := model.Client.Credentials diff --git a/provider/provider.go b/provider/provider.go index 788d5d1..ad94a47 100644 --- a/provider/provider.go +++ b/provider/provider.go @@ -15,7 +15,7 @@ const Name string = "aem" func Provider() p.Provider { return infer.Provider(infer.Options{ Resources: []infer.InferredResource{ - infer.Resource[InstanceResourceModel, InstanceResourceModelArgs, InstanceResourceModelState](), + infer.Resource[Instance, InstanceArgs, InstanceState](), }, ModuleMap: map[tokens.ModuleName]tokens.ModuleName{ "provider": "compose", @@ -23,23 +23,23 @@ func Provider() p.Provider { }) } -type InstanceResourceModel struct{} +type Instance struct{} -type InstanceResourceModelArgs struct { - Client ClientModel `pulumi:"client"` +type InstanceArgs struct { + Client Client `pulumi:"client"` Files map[string]string `pulumi:"files,optional"` - System SystemModel `pulumi:"system,optional"` - Compose ComposeModel `pulumi:"compose,optional"` + System System `pulumi:"system,optional"` + Compose Compose `pulumi:"compose,optional"` } -func (m *InstanceResourceModelArgs) Annotate(a infer.Annotator) { +func (m *InstanceArgs) Annotate(a infer.Annotator) { a.Describe(&m.Client, "Connection settings used to access the machine on which the AEM instance will be running.") a.Describe(&m.Files, "Files or directories to be copied into the machine.") a.Describe(&m.System, "Operating system configuration for the machine on which AEM instance will be running.") a.Describe(&m.Compose, "AEM Compose CLI configuration. See documentation(https://github.com/wttech/aemc#configuration).") } -type ClientModel struct { +type Client struct { Type string `pulumi:"type"` Settings map[string]string `pulumi:"settings"` Credentials map[string]string `pulumi:"credentials,optional"` @@ -47,7 +47,7 @@ type ClientModel struct { StateTimeout string `pulumi:"state_timeout,optional"` } -func (m *ClientModel) Annotate(a infer.Annotator) { +func (m *Client) Annotate(a infer.Annotator) { a.Describe(&m.Type, "Type of connection to use to connect to the machine on which AEM instance will be running.") a.Describe(&m.Settings, "Settings for the connection type") a.Describe(&m.Credentials, "Credentials for the connection type") @@ -55,7 +55,7 @@ func (m *ClientModel) Annotate(a infer.Annotator) { a.Describe(&m.StateTimeout, "Used when reading the AEM instance state when determining the plan.") } -type SystemModel struct { +type System struct { DataDir string `pulumi:"data_dir,optional"` WorkDir string `pulumi:"work_dir,optional"` Env map[string]string `pulumi:"env,optional"` @@ -64,7 +64,7 @@ type SystemModel struct { Bootstrap InstanceScript `pulumi:"bootstrap,optional"` } -func (m *SystemModel) Annotate(a infer.Annotator) { +func (m *System) Annotate(a infer.Annotator) { a.Describe(&m.DataDir, "Remote root path in which AEM Compose files and unpacked AEM instances will be stored.") a.Describe(&m.WorkDir, "Remote root path where provider-related files will be stored.") a.Describe(&m.Env, "Environment variables for AEM instances.") @@ -73,7 +73,7 @@ func (m *SystemModel) Annotate(a infer.Annotator) { a.Describe(&m.Bootstrap, "Script executed once upon instance connection, often for mounting on VM data volumes from attached disks (e.g., AWS EBS, Azure Disk Storage). This script runs only once, even during instance recreation, as changes are typically persistent and system-wide. If re-execution is needed, it is recommended to set up a new machine.") } -type ComposeModel struct { +type Compose struct { Download bool `pulumi:"download,optional"` Version string `pulumi:"version,optional"` Config string `pulumi:"config,optional"` @@ -82,7 +82,7 @@ type ComposeModel struct { Delete InstanceScript `pulumi:"delete,optional"` } -func (m *ComposeModel) Annotate(a infer.Annotator) { +func (m *Compose) Annotate(a infer.Annotator) { a.Describe(&m.Download, "Toggle automatic AEM Compose CLI wrapper download. If set to false, assume the wrapper is present in the data directory.") a.Describe(&m.Version, "Version of AEM Compose tool to use on remote machine.") a.Describe(&m.Config, "Contents of the AEM Compose YML configuration file.") @@ -119,17 +119,17 @@ func (m *InstanceModel) Annotate(a infer.Annotator) { a.Describe(&m.RunModes, "A list of run modes for a specific AEM instance.") } -type InstanceResourceModelState struct { - InstanceResourceModelArgs +type InstanceState struct { + InstanceArgs Instances []InstanceModel `pulumi:"instances"` } -func (m *InstanceResourceModelState) Annotate(a infer.Annotator) { +func (m *InstanceState) Annotate(a infer.Annotator) { a.Describe(&m.Instances, "Current state of the configured AEM instances.") } -func (InstanceResourceModel) Create(ctx p.Context, name string, input InstanceResourceModelArgs, preview bool) (string, InstanceResourceModelState, error) { - state := InstanceResourceModelState{InstanceResourceModelArgs: input} +func (Instance) Create(ctx p.Context, name string, input InstanceArgs, preview bool) (string, InstanceState, error) { + state := InstanceState{InstanceArgs: input} if preview { return name, state, nil } @@ -156,12 +156,12 @@ func (InstanceResourceModel) Create(ctx p.Context, name string, input InstanceRe return name, state, nil } -func (InstanceResourceModel) Update(ctx p.Context, id string, oldState InstanceResourceModelState, input InstanceResourceModelArgs, preview bool) (InstanceResourceModelState, error) { +func (Instance) Update(ctx p.Context, id string, oldState InstanceState, input InstanceArgs, preview bool) (InstanceState, error) { if preview { return oldState, nil } - state := InstanceResourceModelState{InstanceResourceModelArgs: input} + state := InstanceState{InstanceArgs: input} instanceResource := NewInstanceResource() status, err := instanceResource.Update(ctx, input) if err != nil { @@ -184,16 +184,16 @@ func (InstanceResourceModel) Update(ctx p.Context, id string, oldState InstanceR return state, nil } -func (InstanceResourceModel) Delete(ctx p.Context, id string, props InstanceResourceModelState) error { +func (Instance) Delete(ctx p.Context, id string, props InstanceState) error { instanceResource := NewInstanceResource() - if err := instanceResource.Delete(ctx, props.InstanceResourceModelArgs); err != nil { + if err := instanceResource.Delete(ctx, props.InstanceArgs); err != nil { return err } return nil } -func (InstanceResourceModel) Check(ctx p.Context, name string, oldInputs, newInputs resource.PropertyMap) (InstanceResourceModelArgs, []p.CheckFailure, error) { +func (Instance) Check(ctx p.Context, name string, oldInputs, newInputs resource.PropertyMap) (InstanceArgs, []p.CheckFailure, error) { inputs := determineInputs(newInputs, "client") setDefaultValue(inputs, "credentials", resource.NewObjectProperty(resource.PropertyMap{})) setDefaultValue(inputs, "action_timeout", resource.NewStringProperty("10m")) @@ -217,7 +217,7 @@ func (InstanceResourceModel) Check(ctx p.Context, name string, oldInputs, newInp setDefaultInlineScripts(inputs, "configure", instance.LaunchScriptInline) setDefaultInlineScripts(inputs, "delete", instance.DeleteScriptInline) - return infer.DefaultCheck[InstanceResourceModelArgs](newInputs) + return infer.DefaultCheck[InstanceArgs](newInputs) } func determineInputs(allInputs resource.PropertyMap, key resource.PropertyKey) resource.PropertyMap { diff --git a/sdk/go/aem/compose/init.go b/sdk/go/aem/compose/init.go index 0558d7b..ebf1059 100644 --- a/sdk/go/aem/compose/init.go +++ b/sdk/go/aem/compose/init.go @@ -21,8 +21,8 @@ func (m *module) Version() semver.Version { func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) { switch typ { - case "aem:compose:InstanceResourceModel": - r = &InstanceResourceModel{} + case "aem:compose:Instance": + r = &Instance{} default: return nil, fmt.Errorf("unknown resource type: %s", typ) } diff --git a/sdk/go/aem/compose/instance.go b/sdk/go/aem/compose/instance.go new file mode 100644 index 0000000..909ba66 --- /dev/null +++ b/sdk/go/aem/compose/instance.go @@ -0,0 +1,160 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package compose + +import ( + "context" + "reflect" + + "errors" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/wttech/pulumi-aem-native/sdk/go/aem/internal" +) + +type Instance struct { + pulumi.CustomResourceState + + // Connection settings used to access the machine on which the AEM instance will be running. + Client ClientOutput `pulumi:"client"` + // AEM Compose CLI configuration. See documentation(https://github.com/wttech/aemc#configuration). + Compose ComposePtrOutput `pulumi:"compose"` + // Files or directories to be copied into the machine. + Files pulumi.StringMapOutput `pulumi:"files"` + // Current state of the configured AEM instances. + Instances InstanceModelArrayOutput `pulumi:"instances"` + // Operating system configuration for the machine on which AEM instance will be running. + System SystemPtrOutput `pulumi:"system"` +} + +// NewInstance registers a new resource with the given unique name, arguments, and options. +func NewInstance(ctx *pulumi.Context, + name string, args *InstanceArgs, opts ...pulumi.ResourceOption) (*Instance, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.Client == nil { + return nil, errors.New("invalid value for required argument 'Client'") + } + opts = internal.PkgResourceDefaultOpts(opts) + var resource Instance + err := ctx.RegisterResource("aem:compose:Instance", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetInstance gets an existing Instance resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetInstance(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *InstanceState, opts ...pulumi.ResourceOption) (*Instance, error) { + var resource Instance + err := ctx.ReadResource("aem:compose:Instance", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering Instance resources. +type instanceState struct { +} + +type InstanceState struct { +} + +func (InstanceState) ElementType() reflect.Type { + return reflect.TypeOf((*instanceState)(nil)).Elem() +} + +type instanceArgs struct { + // Connection settings used to access the machine on which the AEM instance will be running. + Client Client `pulumi:"client"` + // AEM Compose CLI configuration. See documentation(https://github.com/wttech/aemc#configuration). + Compose *Compose `pulumi:"compose"` + // Files or directories to be copied into the machine. + Files map[string]string `pulumi:"files"` + // Operating system configuration for the machine on which AEM instance will be running. + System *System `pulumi:"system"` +} + +// The set of arguments for constructing a Instance resource. +type InstanceArgs struct { + // Connection settings used to access the machine on which the AEM instance will be running. + Client ClientInput + // AEM Compose CLI configuration. See documentation(https://github.com/wttech/aemc#configuration). + Compose ComposePtrInput + // Files or directories to be copied into the machine. + Files pulumi.StringMapInput + // Operating system configuration for the machine on which AEM instance will be running. + System SystemPtrInput +} + +func (InstanceArgs) ElementType() reflect.Type { + return reflect.TypeOf((*instanceArgs)(nil)).Elem() +} + +type InstanceInput interface { + pulumi.Input + + ToInstanceOutput() InstanceOutput + ToInstanceOutputWithContext(ctx context.Context) InstanceOutput +} + +func (*Instance) ElementType() reflect.Type { + return reflect.TypeOf((**Instance)(nil)).Elem() +} + +func (i *Instance) ToInstanceOutput() InstanceOutput { + return i.ToInstanceOutputWithContext(context.Background()) +} + +func (i *Instance) ToInstanceOutputWithContext(ctx context.Context) InstanceOutput { + return pulumi.ToOutputWithContext(ctx, i).(InstanceOutput) +} + +type InstanceOutput struct{ *pulumi.OutputState } + +func (InstanceOutput) ElementType() reflect.Type { + return reflect.TypeOf((**Instance)(nil)).Elem() +} + +func (o InstanceOutput) ToInstanceOutput() InstanceOutput { + return o +} + +func (o InstanceOutput) ToInstanceOutputWithContext(ctx context.Context) InstanceOutput { + return o +} + +// Connection settings used to access the machine on which the AEM instance will be running. +func (o InstanceOutput) Client() ClientOutput { + return o.ApplyT(func(v *Instance) ClientOutput { return v.Client }).(ClientOutput) +} + +// AEM Compose CLI configuration. See documentation(https://github.com/wttech/aemc#configuration). +func (o InstanceOutput) Compose() ComposePtrOutput { + return o.ApplyT(func(v *Instance) ComposePtrOutput { return v.Compose }).(ComposePtrOutput) +} + +// Files or directories to be copied into the machine. +func (o InstanceOutput) Files() pulumi.StringMapOutput { + return o.ApplyT(func(v *Instance) pulumi.StringMapOutput { return v.Files }).(pulumi.StringMapOutput) +} + +// Current state of the configured AEM instances. +func (o InstanceOutput) Instances() InstanceModelArrayOutput { + return o.ApplyT(func(v *Instance) InstanceModelArrayOutput { return v.Instances }).(InstanceModelArrayOutput) +} + +// Operating system configuration for the machine on which AEM instance will be running. +func (o InstanceOutput) System() SystemPtrOutput { + return o.ApplyT(func(v *Instance) SystemPtrOutput { return v.System }).(SystemPtrOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*InstanceInput)(nil)).Elem(), &Instance{}) + pulumi.RegisterOutputType(InstanceOutput{}) +} diff --git a/sdk/go/aem/compose/instanceResourceModel.go b/sdk/go/aem/compose/instanceResourceModel.go deleted file mode 100644 index 09cee89..0000000 --- a/sdk/go/aem/compose/instanceResourceModel.go +++ /dev/null @@ -1,160 +0,0 @@ -// Code generated by pulumi-language-go DO NOT EDIT. -// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** - -package compose - -import ( - "context" - "reflect" - - "errors" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/wttech/pulumi-aem-native/sdk/go/aem/internal" -) - -type InstanceResourceModel struct { - pulumi.CustomResourceState - - // Connection settings used to access the machine on which the AEM instance will be running. - Client ClientModelOutput `pulumi:"client"` - // AEM Compose CLI configuration. See documentation(https://github.com/wttech/aemc#configuration). - Compose ComposeModelPtrOutput `pulumi:"compose"` - // Files or directories to be copied into the machine. - Files pulumi.StringMapOutput `pulumi:"files"` - // Current state of the configured AEM instances. - Instances InstanceModelArrayOutput `pulumi:"instances"` - // Operating system configuration for the machine on which AEM instance will be running. - System SystemModelPtrOutput `pulumi:"system"` -} - -// NewInstanceResourceModel registers a new resource with the given unique name, arguments, and options. -func NewInstanceResourceModel(ctx *pulumi.Context, - name string, args *InstanceResourceModelArgs, opts ...pulumi.ResourceOption) (*InstanceResourceModel, error) { - if args == nil { - return nil, errors.New("missing one or more required arguments") - } - - if args.Client == nil { - return nil, errors.New("invalid value for required argument 'Client'") - } - opts = internal.PkgResourceDefaultOpts(opts) - var resource InstanceResourceModel - err := ctx.RegisterResource("aem:compose:InstanceResourceModel", name, args, &resource, opts...) - if err != nil { - return nil, err - } - return &resource, nil -} - -// GetInstanceResourceModel gets an existing InstanceResourceModel resource's state with the given name, ID, and optional -// state properties that are used to uniquely qualify the lookup (nil if not required). -func GetInstanceResourceModel(ctx *pulumi.Context, - name string, id pulumi.IDInput, state *InstanceResourceModelState, opts ...pulumi.ResourceOption) (*InstanceResourceModel, error) { - var resource InstanceResourceModel - err := ctx.ReadResource("aem:compose:InstanceResourceModel", name, id, state, &resource, opts...) - if err != nil { - return nil, err - } - return &resource, nil -} - -// Input properties used for looking up and filtering InstanceResourceModel resources. -type instanceResourceModelState struct { -} - -type InstanceResourceModelState struct { -} - -func (InstanceResourceModelState) ElementType() reflect.Type { - return reflect.TypeOf((*instanceResourceModelState)(nil)).Elem() -} - -type instanceResourceModelArgs struct { - // Connection settings used to access the machine on which the AEM instance will be running. - Client ClientModel `pulumi:"client"` - // AEM Compose CLI configuration. See documentation(https://github.com/wttech/aemc#configuration). - Compose *ComposeModel `pulumi:"compose"` - // Files or directories to be copied into the machine. - Files map[string]string `pulumi:"files"` - // Operating system configuration for the machine on which AEM instance will be running. - System *SystemModel `pulumi:"system"` -} - -// The set of arguments for constructing a InstanceResourceModel resource. -type InstanceResourceModelArgs struct { - // Connection settings used to access the machine on which the AEM instance will be running. - Client ClientModelInput - // AEM Compose CLI configuration. See documentation(https://github.com/wttech/aemc#configuration). - Compose ComposeModelPtrInput - // Files or directories to be copied into the machine. - Files pulumi.StringMapInput - // Operating system configuration for the machine on which AEM instance will be running. - System SystemModelPtrInput -} - -func (InstanceResourceModelArgs) ElementType() reflect.Type { - return reflect.TypeOf((*instanceResourceModelArgs)(nil)).Elem() -} - -type InstanceResourceModelInput interface { - pulumi.Input - - ToInstanceResourceModelOutput() InstanceResourceModelOutput - ToInstanceResourceModelOutputWithContext(ctx context.Context) InstanceResourceModelOutput -} - -func (*InstanceResourceModel) ElementType() reflect.Type { - return reflect.TypeOf((**InstanceResourceModel)(nil)).Elem() -} - -func (i *InstanceResourceModel) ToInstanceResourceModelOutput() InstanceResourceModelOutput { - return i.ToInstanceResourceModelOutputWithContext(context.Background()) -} - -func (i *InstanceResourceModel) ToInstanceResourceModelOutputWithContext(ctx context.Context) InstanceResourceModelOutput { - return pulumi.ToOutputWithContext(ctx, i).(InstanceResourceModelOutput) -} - -type InstanceResourceModelOutput struct{ *pulumi.OutputState } - -func (InstanceResourceModelOutput) ElementType() reflect.Type { - return reflect.TypeOf((**InstanceResourceModel)(nil)).Elem() -} - -func (o InstanceResourceModelOutput) ToInstanceResourceModelOutput() InstanceResourceModelOutput { - return o -} - -func (o InstanceResourceModelOutput) ToInstanceResourceModelOutputWithContext(ctx context.Context) InstanceResourceModelOutput { - return o -} - -// Connection settings used to access the machine on which the AEM instance will be running. -func (o InstanceResourceModelOutput) Client() ClientModelOutput { - return o.ApplyT(func(v *InstanceResourceModel) ClientModelOutput { return v.Client }).(ClientModelOutput) -} - -// AEM Compose CLI configuration. See documentation(https://github.com/wttech/aemc#configuration). -func (o InstanceResourceModelOutput) Compose() ComposeModelPtrOutput { - return o.ApplyT(func(v *InstanceResourceModel) ComposeModelPtrOutput { return v.Compose }).(ComposeModelPtrOutput) -} - -// Files or directories to be copied into the machine. -func (o InstanceResourceModelOutput) Files() pulumi.StringMapOutput { - return o.ApplyT(func(v *InstanceResourceModel) pulumi.StringMapOutput { return v.Files }).(pulumi.StringMapOutput) -} - -// Current state of the configured AEM instances. -func (o InstanceResourceModelOutput) Instances() InstanceModelArrayOutput { - return o.ApplyT(func(v *InstanceResourceModel) InstanceModelArrayOutput { return v.Instances }).(InstanceModelArrayOutput) -} - -// Operating system configuration for the machine on which AEM instance will be running. -func (o InstanceResourceModelOutput) System() SystemModelPtrOutput { - return o.ApplyT(func(v *InstanceResourceModel) SystemModelPtrOutput { return v.System }).(SystemModelPtrOutput) -} - -func init() { - pulumi.RegisterInputType(reflect.TypeOf((*InstanceResourceModelInput)(nil)).Elem(), &InstanceResourceModel{}) - pulumi.RegisterOutputType(InstanceResourceModelOutput{}) -} diff --git a/sdk/go/aem/compose/pulumiTypes.go b/sdk/go/aem/compose/pulumiTypes.go index e4a3e50..b5ca19e 100644 --- a/sdk/go/aem/compose/pulumiTypes.go +++ b/sdk/go/aem/compose/pulumiTypes.go @@ -13,7 +13,7 @@ import ( var _ = internal.GetEnvOrDefault -type ClientModel struct { +type Client struct { // Used when trying to connect to the AEM instance machine (often right after creating it). Need to be enough long because various types of connections (like AWS SSM or SSH) may need some time to boot up the agent. Action_timeout *string `pulumi:"action_timeout"` // Credentials for the connection type @@ -26,18 +26,18 @@ type ClientModel struct { Type string `pulumi:"type"` } -// ClientModelInput is an input type that accepts ClientModelArgs and ClientModelOutput values. -// You can construct a concrete instance of `ClientModelInput` via: +// ClientInput is an input type that accepts ClientArgs and ClientOutput values. +// You can construct a concrete instance of `ClientInput` via: // -// ClientModelArgs{...} -type ClientModelInput interface { +// ClientArgs{...} +type ClientInput interface { pulumi.Input - ToClientModelOutput() ClientModelOutput - ToClientModelOutputWithContext(context.Context) ClientModelOutput + ToClientOutput() ClientOutput + ToClientOutputWithContext(context.Context) ClientOutput } -type ClientModelArgs struct { +type ClientArgs struct { // Used when trying to connect to the AEM instance machine (often right after creating it). Need to be enough long because various types of connections (like AWS SSM or SSH) may need some time to boot up the agent. Action_timeout pulumi.StringPtrInput `pulumi:"action_timeout"` // Credentials for the connection type @@ -50,58 +50,58 @@ type ClientModelArgs struct { Type pulumi.StringInput `pulumi:"type"` } -func (ClientModelArgs) ElementType() reflect.Type { - return reflect.TypeOf((*ClientModel)(nil)).Elem() +func (ClientArgs) ElementType() reflect.Type { + return reflect.TypeOf((*Client)(nil)).Elem() } -func (i ClientModelArgs) ToClientModelOutput() ClientModelOutput { - return i.ToClientModelOutputWithContext(context.Background()) +func (i ClientArgs) ToClientOutput() ClientOutput { + return i.ToClientOutputWithContext(context.Background()) } -func (i ClientModelArgs) ToClientModelOutputWithContext(ctx context.Context) ClientModelOutput { - return pulumi.ToOutputWithContext(ctx, i).(ClientModelOutput) +func (i ClientArgs) ToClientOutputWithContext(ctx context.Context) ClientOutput { + return pulumi.ToOutputWithContext(ctx, i).(ClientOutput) } -type ClientModelOutput struct{ *pulumi.OutputState } +type ClientOutput struct{ *pulumi.OutputState } -func (ClientModelOutput) ElementType() reflect.Type { - return reflect.TypeOf((*ClientModel)(nil)).Elem() +func (ClientOutput) ElementType() reflect.Type { + return reflect.TypeOf((*Client)(nil)).Elem() } -func (o ClientModelOutput) ToClientModelOutput() ClientModelOutput { +func (o ClientOutput) ToClientOutput() ClientOutput { return o } -func (o ClientModelOutput) ToClientModelOutputWithContext(ctx context.Context) ClientModelOutput { +func (o ClientOutput) ToClientOutputWithContext(ctx context.Context) ClientOutput { return o } // Used when trying to connect to the AEM instance machine (often right after creating it). Need to be enough long because various types of connections (like AWS SSM or SSH) may need some time to boot up the agent. -func (o ClientModelOutput) Action_timeout() pulumi.StringPtrOutput { - return o.ApplyT(func(v ClientModel) *string { return v.Action_timeout }).(pulumi.StringPtrOutput) +func (o ClientOutput) Action_timeout() pulumi.StringPtrOutput { + return o.ApplyT(func(v Client) *string { return v.Action_timeout }).(pulumi.StringPtrOutput) } // Credentials for the connection type -func (o ClientModelOutput) Credentials() pulumi.StringMapOutput { - return o.ApplyT(func(v ClientModel) map[string]string { return v.Credentials }).(pulumi.StringMapOutput) +func (o ClientOutput) Credentials() pulumi.StringMapOutput { + return o.ApplyT(func(v Client) map[string]string { return v.Credentials }).(pulumi.StringMapOutput) } // Settings for the connection type -func (o ClientModelOutput) Settings() pulumi.StringMapOutput { - return o.ApplyT(func(v ClientModel) map[string]string { return v.Settings }).(pulumi.StringMapOutput) +func (o ClientOutput) Settings() pulumi.StringMapOutput { + return o.ApplyT(func(v Client) map[string]string { return v.Settings }).(pulumi.StringMapOutput) } // Used when reading the AEM instance state when determining the plan. -func (o ClientModelOutput) State_timeout() pulumi.StringPtrOutput { - return o.ApplyT(func(v ClientModel) *string { return v.State_timeout }).(pulumi.StringPtrOutput) +func (o ClientOutput) State_timeout() pulumi.StringPtrOutput { + return o.ApplyT(func(v Client) *string { return v.State_timeout }).(pulumi.StringPtrOutput) } // Type of connection to use to connect to the machine on which AEM instance will be running. -func (o ClientModelOutput) Type() pulumi.StringOutput { - return o.ApplyT(func(v ClientModel) string { return v.Type }).(pulumi.StringOutput) +func (o ClientOutput) Type() pulumi.StringOutput { + return o.ApplyT(func(v Client) string { return v.Type }).(pulumi.StringOutput) } -type ComposeModel struct { +type Compose struct { // Contents of the AEM Compose YML configuration file. Config *string `pulumi:"config"` // Script(s) for configuring a launched instance. Must be idempotent as it is executed always when changed. Typically used for installing AEM service packs, setting up replication agents, etc. @@ -116,18 +116,18 @@ type ComposeModel struct { Version *string `pulumi:"version"` } -// ComposeModelInput is an input type that accepts ComposeModelArgs and ComposeModelOutput values. -// You can construct a concrete instance of `ComposeModelInput` via: +// ComposeInput is an input type that accepts ComposeArgs and ComposeOutput values. +// You can construct a concrete instance of `ComposeInput` via: // -// ComposeModelArgs{...} -type ComposeModelInput interface { +// ComposeArgs{...} +type ComposeInput interface { pulumi.Input - ToComposeModelOutput() ComposeModelOutput - ToComposeModelOutputWithContext(context.Context) ComposeModelOutput + ToComposeOutput() ComposeOutput + ToComposeOutputWithContext(context.Context) ComposeOutput } -type ComposeModelArgs struct { +type ComposeArgs struct { // Contents of the AEM Compose YML configuration file. Config pulumi.StringPtrInput `pulumi:"config"` // Script(s) for configuring a launched instance. Must be idempotent as it is executed always when changed. Typically used for installing AEM service packs, setting up replication agents, etc. @@ -142,140 +142,140 @@ type ComposeModelArgs struct { Version pulumi.StringPtrInput `pulumi:"version"` } -func (ComposeModelArgs) ElementType() reflect.Type { - return reflect.TypeOf((*ComposeModel)(nil)).Elem() +func (ComposeArgs) ElementType() reflect.Type { + return reflect.TypeOf((*Compose)(nil)).Elem() } -func (i ComposeModelArgs) ToComposeModelOutput() ComposeModelOutput { - return i.ToComposeModelOutputWithContext(context.Background()) +func (i ComposeArgs) ToComposeOutput() ComposeOutput { + return i.ToComposeOutputWithContext(context.Background()) } -func (i ComposeModelArgs) ToComposeModelOutputWithContext(ctx context.Context) ComposeModelOutput { - return pulumi.ToOutputWithContext(ctx, i).(ComposeModelOutput) +func (i ComposeArgs) ToComposeOutputWithContext(ctx context.Context) ComposeOutput { + return pulumi.ToOutputWithContext(ctx, i).(ComposeOutput) } -func (i ComposeModelArgs) ToComposeModelPtrOutput() ComposeModelPtrOutput { - return i.ToComposeModelPtrOutputWithContext(context.Background()) +func (i ComposeArgs) ToComposePtrOutput() ComposePtrOutput { + return i.ToComposePtrOutputWithContext(context.Background()) } -func (i ComposeModelArgs) ToComposeModelPtrOutputWithContext(ctx context.Context) ComposeModelPtrOutput { - return pulumi.ToOutputWithContext(ctx, i).(ComposeModelOutput).ToComposeModelPtrOutputWithContext(ctx) +func (i ComposeArgs) ToComposePtrOutputWithContext(ctx context.Context) ComposePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(ComposeOutput).ToComposePtrOutputWithContext(ctx) } -// ComposeModelPtrInput is an input type that accepts ComposeModelArgs, ComposeModelPtr and ComposeModelPtrOutput values. -// You can construct a concrete instance of `ComposeModelPtrInput` via: +// ComposePtrInput is an input type that accepts ComposeArgs, ComposePtr and ComposePtrOutput values. +// You can construct a concrete instance of `ComposePtrInput` via: // -// ComposeModelArgs{...} +// ComposeArgs{...} // // or: // // nil -type ComposeModelPtrInput interface { +type ComposePtrInput interface { pulumi.Input - ToComposeModelPtrOutput() ComposeModelPtrOutput - ToComposeModelPtrOutputWithContext(context.Context) ComposeModelPtrOutput + ToComposePtrOutput() ComposePtrOutput + ToComposePtrOutputWithContext(context.Context) ComposePtrOutput } -type composeModelPtrType ComposeModelArgs +type composePtrType ComposeArgs -func ComposeModelPtr(v *ComposeModelArgs) ComposeModelPtrInput { - return (*composeModelPtrType)(v) +func ComposePtr(v *ComposeArgs) ComposePtrInput { + return (*composePtrType)(v) } -func (*composeModelPtrType) ElementType() reflect.Type { - return reflect.TypeOf((**ComposeModel)(nil)).Elem() +func (*composePtrType) ElementType() reflect.Type { + return reflect.TypeOf((**Compose)(nil)).Elem() } -func (i *composeModelPtrType) ToComposeModelPtrOutput() ComposeModelPtrOutput { - return i.ToComposeModelPtrOutputWithContext(context.Background()) +func (i *composePtrType) ToComposePtrOutput() ComposePtrOutput { + return i.ToComposePtrOutputWithContext(context.Background()) } -func (i *composeModelPtrType) ToComposeModelPtrOutputWithContext(ctx context.Context) ComposeModelPtrOutput { - return pulumi.ToOutputWithContext(ctx, i).(ComposeModelPtrOutput) +func (i *composePtrType) ToComposePtrOutputWithContext(ctx context.Context) ComposePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(ComposePtrOutput) } -type ComposeModelOutput struct{ *pulumi.OutputState } +type ComposeOutput struct{ *pulumi.OutputState } -func (ComposeModelOutput) ElementType() reflect.Type { - return reflect.TypeOf((*ComposeModel)(nil)).Elem() +func (ComposeOutput) ElementType() reflect.Type { + return reflect.TypeOf((*Compose)(nil)).Elem() } -func (o ComposeModelOutput) ToComposeModelOutput() ComposeModelOutput { +func (o ComposeOutput) ToComposeOutput() ComposeOutput { return o } -func (o ComposeModelOutput) ToComposeModelOutputWithContext(ctx context.Context) ComposeModelOutput { +func (o ComposeOutput) ToComposeOutputWithContext(ctx context.Context) ComposeOutput { return o } -func (o ComposeModelOutput) ToComposeModelPtrOutput() ComposeModelPtrOutput { - return o.ToComposeModelPtrOutputWithContext(context.Background()) +func (o ComposeOutput) ToComposePtrOutput() ComposePtrOutput { + return o.ToComposePtrOutputWithContext(context.Background()) } -func (o ComposeModelOutput) ToComposeModelPtrOutputWithContext(ctx context.Context) ComposeModelPtrOutput { - return o.ApplyTWithContext(ctx, func(_ context.Context, v ComposeModel) *ComposeModel { +func (o ComposeOutput) ToComposePtrOutputWithContext(ctx context.Context) ComposePtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v Compose) *Compose { return &v - }).(ComposeModelPtrOutput) + }).(ComposePtrOutput) } // Contents of the AEM Compose YML configuration file. -func (o ComposeModelOutput) Config() pulumi.StringPtrOutput { - return o.ApplyT(func(v ComposeModel) *string { return v.Config }).(pulumi.StringPtrOutput) +func (o ComposeOutput) Config() pulumi.StringPtrOutput { + return o.ApplyT(func(v Compose) *string { return v.Config }).(pulumi.StringPtrOutput) } // Script(s) for configuring a launched instance. Must be idempotent as it is executed always when changed. Typically used for installing AEM service packs, setting up replication agents, etc. -func (o ComposeModelOutput) Configure() InstanceScriptPtrOutput { - return o.ApplyT(func(v ComposeModel) *InstanceScript { return v.Configure }).(InstanceScriptPtrOutput) +func (o ComposeOutput) Configure() InstanceScriptPtrOutput { + return o.ApplyT(func(v Compose) *InstanceScript { return v.Configure }).(InstanceScriptPtrOutput) } // Script(s) for creating an instance or restoring it from a backup. Typically customized to provide AEM library files (quickstart.jar, license.properties, service packs) from alternative sources (e.g., AWS S3, Azure Blob Storage). Instance recreation is forced if changed. -func (o ComposeModelOutput) Create() InstanceScriptPtrOutput { - return o.ApplyT(func(v ComposeModel) *InstanceScript { return v.Create }).(InstanceScriptPtrOutput) +func (o ComposeOutput) Create() InstanceScriptPtrOutput { + return o.ApplyT(func(v Compose) *InstanceScript { return v.Create }).(InstanceScriptPtrOutput) } // Script(s) for deleting a stopped instance. -func (o ComposeModelOutput) Delete() InstanceScriptPtrOutput { - return o.ApplyT(func(v ComposeModel) *InstanceScript { return v.Delete }).(InstanceScriptPtrOutput) +func (o ComposeOutput) Delete() InstanceScriptPtrOutput { + return o.ApplyT(func(v Compose) *InstanceScript { return v.Delete }).(InstanceScriptPtrOutput) } // Toggle automatic AEM Compose CLI wrapper download. If set to false, assume the wrapper is present in the data directory. -func (o ComposeModelOutput) Download() pulumi.BoolPtrOutput { - return o.ApplyT(func(v ComposeModel) *bool { return v.Download }).(pulumi.BoolPtrOutput) +func (o ComposeOutput) Download() pulumi.BoolPtrOutput { + return o.ApplyT(func(v Compose) *bool { return v.Download }).(pulumi.BoolPtrOutput) } // Version of AEM Compose tool to use on remote machine. -func (o ComposeModelOutput) Version() pulumi.StringPtrOutput { - return o.ApplyT(func(v ComposeModel) *string { return v.Version }).(pulumi.StringPtrOutput) +func (o ComposeOutput) Version() pulumi.StringPtrOutput { + return o.ApplyT(func(v Compose) *string { return v.Version }).(pulumi.StringPtrOutput) } -type ComposeModelPtrOutput struct{ *pulumi.OutputState } +type ComposePtrOutput struct{ *pulumi.OutputState } -func (ComposeModelPtrOutput) ElementType() reflect.Type { - return reflect.TypeOf((**ComposeModel)(nil)).Elem() +func (ComposePtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**Compose)(nil)).Elem() } -func (o ComposeModelPtrOutput) ToComposeModelPtrOutput() ComposeModelPtrOutput { +func (o ComposePtrOutput) ToComposePtrOutput() ComposePtrOutput { return o } -func (o ComposeModelPtrOutput) ToComposeModelPtrOutputWithContext(ctx context.Context) ComposeModelPtrOutput { +func (o ComposePtrOutput) ToComposePtrOutputWithContext(ctx context.Context) ComposePtrOutput { return o } -func (o ComposeModelPtrOutput) Elem() ComposeModelOutput { - return o.ApplyT(func(v *ComposeModel) ComposeModel { +func (o ComposePtrOutput) Elem() ComposeOutput { + return o.ApplyT(func(v *Compose) Compose { if v != nil { return *v } - var ret ComposeModel + var ret Compose return ret - }).(ComposeModelOutput) + }).(ComposeOutput) } // Contents of the AEM Compose YML configuration file. -func (o ComposeModelPtrOutput) Config() pulumi.StringPtrOutput { - return o.ApplyT(func(v *ComposeModel) *string { +func (o ComposePtrOutput) Config() pulumi.StringPtrOutput { + return o.ApplyT(func(v *Compose) *string { if v == nil { return nil } @@ -284,8 +284,8 @@ func (o ComposeModelPtrOutput) Config() pulumi.StringPtrOutput { } // Script(s) for configuring a launched instance. Must be idempotent as it is executed always when changed. Typically used for installing AEM service packs, setting up replication agents, etc. -func (o ComposeModelPtrOutput) Configure() InstanceScriptPtrOutput { - return o.ApplyT(func(v *ComposeModel) *InstanceScript { +func (o ComposePtrOutput) Configure() InstanceScriptPtrOutput { + return o.ApplyT(func(v *Compose) *InstanceScript { if v == nil { return nil } @@ -294,8 +294,8 @@ func (o ComposeModelPtrOutput) Configure() InstanceScriptPtrOutput { } // Script(s) for creating an instance or restoring it from a backup. Typically customized to provide AEM library files (quickstart.jar, license.properties, service packs) from alternative sources (e.g., AWS S3, Azure Blob Storage). Instance recreation is forced if changed. -func (o ComposeModelPtrOutput) Create() InstanceScriptPtrOutput { - return o.ApplyT(func(v *ComposeModel) *InstanceScript { +func (o ComposePtrOutput) Create() InstanceScriptPtrOutput { + return o.ApplyT(func(v *Compose) *InstanceScript { if v == nil { return nil } @@ -304,8 +304,8 @@ func (o ComposeModelPtrOutput) Create() InstanceScriptPtrOutput { } // Script(s) for deleting a stopped instance. -func (o ComposeModelPtrOutput) Delete() InstanceScriptPtrOutput { - return o.ApplyT(func(v *ComposeModel) *InstanceScript { +func (o ComposePtrOutput) Delete() InstanceScriptPtrOutput { + return o.ApplyT(func(v *Compose) *InstanceScript { if v == nil { return nil } @@ -314,8 +314,8 @@ func (o ComposeModelPtrOutput) Delete() InstanceScriptPtrOutput { } // Toggle automatic AEM Compose CLI wrapper download. If set to false, assume the wrapper is present in the data directory. -func (o ComposeModelPtrOutput) Download() pulumi.BoolPtrOutput { - return o.ApplyT(func(v *ComposeModel) *bool { +func (o ComposePtrOutput) Download() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *Compose) *bool { if v == nil { return nil } @@ -324,8 +324,8 @@ func (o ComposeModelPtrOutput) Download() pulumi.BoolPtrOutput { } // Version of AEM Compose tool to use on remote machine. -func (o ComposeModelPtrOutput) Version() pulumi.StringPtrOutput { - return o.ApplyT(func(v *ComposeModel) *string { +func (o ComposePtrOutput) Version() pulumi.StringPtrOutput { + return o.ApplyT(func(v *Compose) *string { if v == nil { return nil } @@ -568,7 +568,7 @@ func (o InstanceScriptPtrOutput) Script() pulumi.StringPtrOutput { }).(pulumi.StringPtrOutput) } -type SystemModel struct { +type System struct { // Script executed once upon instance connection, often for mounting on VM data volumes from attached disks (e.g., AWS EBS, Azure Disk Storage). This script runs only once, even during instance recreation, as changes are typically persistent and system-wide. If re-execution is needed, it is recommended to set up a new machine. Bootstrap *InstanceScript `pulumi:"bootstrap"` // Remote root path in which AEM Compose files and unpacked AEM instances will be stored. @@ -583,18 +583,18 @@ type SystemModel struct { Work_dir *string `pulumi:"work_dir"` } -// SystemModelInput is an input type that accepts SystemModelArgs and SystemModelOutput values. -// You can construct a concrete instance of `SystemModelInput` via: +// SystemInput is an input type that accepts SystemArgs and SystemOutput values. +// You can construct a concrete instance of `SystemInput` via: // -// SystemModelArgs{...} -type SystemModelInput interface { +// SystemArgs{...} +type SystemInput interface { pulumi.Input - ToSystemModelOutput() SystemModelOutput - ToSystemModelOutputWithContext(context.Context) SystemModelOutput + ToSystemOutput() SystemOutput + ToSystemOutputWithContext(context.Context) SystemOutput } -type SystemModelArgs struct { +type SystemArgs struct { // Script executed once upon instance connection, often for mounting on VM data volumes from attached disks (e.g., AWS EBS, Azure Disk Storage). This script runs only once, even during instance recreation, as changes are typically persistent and system-wide. If re-execution is needed, it is recommended to set up a new machine. Bootstrap InstanceScriptPtrInput `pulumi:"bootstrap"` // Remote root path in which AEM Compose files and unpacked AEM instances will be stored. @@ -609,140 +609,140 @@ type SystemModelArgs struct { Work_dir pulumi.StringPtrInput `pulumi:"work_dir"` } -func (SystemModelArgs) ElementType() reflect.Type { - return reflect.TypeOf((*SystemModel)(nil)).Elem() +func (SystemArgs) ElementType() reflect.Type { + return reflect.TypeOf((*System)(nil)).Elem() } -func (i SystemModelArgs) ToSystemModelOutput() SystemModelOutput { - return i.ToSystemModelOutputWithContext(context.Background()) +func (i SystemArgs) ToSystemOutput() SystemOutput { + return i.ToSystemOutputWithContext(context.Background()) } -func (i SystemModelArgs) ToSystemModelOutputWithContext(ctx context.Context) SystemModelOutput { - return pulumi.ToOutputWithContext(ctx, i).(SystemModelOutput) +func (i SystemArgs) ToSystemOutputWithContext(ctx context.Context) SystemOutput { + return pulumi.ToOutputWithContext(ctx, i).(SystemOutput) } -func (i SystemModelArgs) ToSystemModelPtrOutput() SystemModelPtrOutput { - return i.ToSystemModelPtrOutputWithContext(context.Background()) +func (i SystemArgs) ToSystemPtrOutput() SystemPtrOutput { + return i.ToSystemPtrOutputWithContext(context.Background()) } -func (i SystemModelArgs) ToSystemModelPtrOutputWithContext(ctx context.Context) SystemModelPtrOutput { - return pulumi.ToOutputWithContext(ctx, i).(SystemModelOutput).ToSystemModelPtrOutputWithContext(ctx) +func (i SystemArgs) ToSystemPtrOutputWithContext(ctx context.Context) SystemPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(SystemOutput).ToSystemPtrOutputWithContext(ctx) } -// SystemModelPtrInput is an input type that accepts SystemModelArgs, SystemModelPtr and SystemModelPtrOutput values. -// You can construct a concrete instance of `SystemModelPtrInput` via: +// SystemPtrInput is an input type that accepts SystemArgs, SystemPtr and SystemPtrOutput values. +// You can construct a concrete instance of `SystemPtrInput` via: // -// SystemModelArgs{...} +// SystemArgs{...} // // or: // // nil -type SystemModelPtrInput interface { +type SystemPtrInput interface { pulumi.Input - ToSystemModelPtrOutput() SystemModelPtrOutput - ToSystemModelPtrOutputWithContext(context.Context) SystemModelPtrOutput + ToSystemPtrOutput() SystemPtrOutput + ToSystemPtrOutputWithContext(context.Context) SystemPtrOutput } -type systemModelPtrType SystemModelArgs +type systemPtrType SystemArgs -func SystemModelPtr(v *SystemModelArgs) SystemModelPtrInput { - return (*systemModelPtrType)(v) +func SystemPtr(v *SystemArgs) SystemPtrInput { + return (*systemPtrType)(v) } -func (*systemModelPtrType) ElementType() reflect.Type { - return reflect.TypeOf((**SystemModel)(nil)).Elem() +func (*systemPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**System)(nil)).Elem() } -func (i *systemModelPtrType) ToSystemModelPtrOutput() SystemModelPtrOutput { - return i.ToSystemModelPtrOutputWithContext(context.Background()) +func (i *systemPtrType) ToSystemPtrOutput() SystemPtrOutput { + return i.ToSystemPtrOutputWithContext(context.Background()) } -func (i *systemModelPtrType) ToSystemModelPtrOutputWithContext(ctx context.Context) SystemModelPtrOutput { - return pulumi.ToOutputWithContext(ctx, i).(SystemModelPtrOutput) +func (i *systemPtrType) ToSystemPtrOutputWithContext(ctx context.Context) SystemPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(SystemPtrOutput) } -type SystemModelOutput struct{ *pulumi.OutputState } +type SystemOutput struct{ *pulumi.OutputState } -func (SystemModelOutput) ElementType() reflect.Type { - return reflect.TypeOf((*SystemModel)(nil)).Elem() +func (SystemOutput) ElementType() reflect.Type { + return reflect.TypeOf((*System)(nil)).Elem() } -func (o SystemModelOutput) ToSystemModelOutput() SystemModelOutput { +func (o SystemOutput) ToSystemOutput() SystemOutput { return o } -func (o SystemModelOutput) ToSystemModelOutputWithContext(ctx context.Context) SystemModelOutput { +func (o SystemOutput) ToSystemOutputWithContext(ctx context.Context) SystemOutput { return o } -func (o SystemModelOutput) ToSystemModelPtrOutput() SystemModelPtrOutput { - return o.ToSystemModelPtrOutputWithContext(context.Background()) +func (o SystemOutput) ToSystemPtrOutput() SystemPtrOutput { + return o.ToSystemPtrOutputWithContext(context.Background()) } -func (o SystemModelOutput) ToSystemModelPtrOutputWithContext(ctx context.Context) SystemModelPtrOutput { - return o.ApplyTWithContext(ctx, func(_ context.Context, v SystemModel) *SystemModel { +func (o SystemOutput) ToSystemPtrOutputWithContext(ctx context.Context) SystemPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v System) *System { return &v - }).(SystemModelPtrOutput) + }).(SystemPtrOutput) } // Script executed once upon instance connection, often for mounting on VM data volumes from attached disks (e.g., AWS EBS, Azure Disk Storage). This script runs only once, even during instance recreation, as changes are typically persistent and system-wide. If re-execution is needed, it is recommended to set up a new machine. -func (o SystemModelOutput) Bootstrap() InstanceScriptPtrOutput { - return o.ApplyT(func(v SystemModel) *InstanceScript { return v.Bootstrap }).(InstanceScriptPtrOutput) +func (o SystemOutput) Bootstrap() InstanceScriptPtrOutput { + return o.ApplyT(func(v System) *InstanceScript { return v.Bootstrap }).(InstanceScriptPtrOutput) } // Remote root path in which AEM Compose files and unpacked AEM instances will be stored. -func (o SystemModelOutput) Data_dir() pulumi.StringPtrOutput { - return o.ApplyT(func(v SystemModel) *string { return v.Data_dir }).(pulumi.StringPtrOutput) +func (o SystemOutput) Data_dir() pulumi.StringPtrOutput { + return o.ApplyT(func(v System) *string { return v.Data_dir }).(pulumi.StringPtrOutput) } // Environment variables for AEM instances. -func (o SystemModelOutput) Env() pulumi.StringMapOutput { - return o.ApplyT(func(v SystemModel) map[string]string { return v.Env }).(pulumi.StringMapOutput) +func (o SystemOutput) Env() pulumi.StringMapOutput { + return o.ApplyT(func(v System) map[string]string { return v.Env }).(pulumi.StringMapOutput) } // Contents of the AEM system service definition file (systemd). -func (o SystemModelOutput) Service_config() pulumi.StringPtrOutput { - return o.ApplyT(func(v SystemModel) *string { return v.Service_config }).(pulumi.StringPtrOutput) +func (o SystemOutput) Service_config() pulumi.StringPtrOutput { + return o.ApplyT(func(v System) *string { return v.Service_config }).(pulumi.StringPtrOutput) } // System user under which AEM instance will be running. By default, the same as the user used to connect to the machine. -func (o SystemModelOutput) User() pulumi.StringPtrOutput { - return o.ApplyT(func(v SystemModel) *string { return v.User }).(pulumi.StringPtrOutput) +func (o SystemOutput) User() pulumi.StringPtrOutput { + return o.ApplyT(func(v System) *string { return v.User }).(pulumi.StringPtrOutput) } // Remote root path where provider-related files will be stored. -func (o SystemModelOutput) Work_dir() pulumi.StringPtrOutput { - return o.ApplyT(func(v SystemModel) *string { return v.Work_dir }).(pulumi.StringPtrOutput) +func (o SystemOutput) Work_dir() pulumi.StringPtrOutput { + return o.ApplyT(func(v System) *string { return v.Work_dir }).(pulumi.StringPtrOutput) } -type SystemModelPtrOutput struct{ *pulumi.OutputState } +type SystemPtrOutput struct{ *pulumi.OutputState } -func (SystemModelPtrOutput) ElementType() reflect.Type { - return reflect.TypeOf((**SystemModel)(nil)).Elem() +func (SystemPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**System)(nil)).Elem() } -func (o SystemModelPtrOutput) ToSystemModelPtrOutput() SystemModelPtrOutput { +func (o SystemPtrOutput) ToSystemPtrOutput() SystemPtrOutput { return o } -func (o SystemModelPtrOutput) ToSystemModelPtrOutputWithContext(ctx context.Context) SystemModelPtrOutput { +func (o SystemPtrOutput) ToSystemPtrOutputWithContext(ctx context.Context) SystemPtrOutput { return o } -func (o SystemModelPtrOutput) Elem() SystemModelOutput { - return o.ApplyT(func(v *SystemModel) SystemModel { +func (o SystemPtrOutput) Elem() SystemOutput { + return o.ApplyT(func(v *System) System { if v != nil { return *v } - var ret SystemModel + var ret System return ret - }).(SystemModelOutput) + }).(SystemOutput) } // Script executed once upon instance connection, often for mounting on VM data volumes from attached disks (e.g., AWS EBS, Azure Disk Storage). This script runs only once, even during instance recreation, as changes are typically persistent and system-wide. If re-execution is needed, it is recommended to set up a new machine. -func (o SystemModelPtrOutput) Bootstrap() InstanceScriptPtrOutput { - return o.ApplyT(func(v *SystemModel) *InstanceScript { +func (o SystemPtrOutput) Bootstrap() InstanceScriptPtrOutput { + return o.ApplyT(func(v *System) *InstanceScript { if v == nil { return nil } @@ -751,8 +751,8 @@ func (o SystemModelPtrOutput) Bootstrap() InstanceScriptPtrOutput { } // Remote root path in which AEM Compose files and unpacked AEM instances will be stored. -func (o SystemModelPtrOutput) Data_dir() pulumi.StringPtrOutput { - return o.ApplyT(func(v *SystemModel) *string { +func (o SystemPtrOutput) Data_dir() pulumi.StringPtrOutput { + return o.ApplyT(func(v *System) *string { if v == nil { return nil } @@ -761,8 +761,8 @@ func (o SystemModelPtrOutput) Data_dir() pulumi.StringPtrOutput { } // Environment variables for AEM instances. -func (o SystemModelPtrOutput) Env() pulumi.StringMapOutput { - return o.ApplyT(func(v *SystemModel) map[string]string { +func (o SystemPtrOutput) Env() pulumi.StringMapOutput { + return o.ApplyT(func(v *System) map[string]string { if v == nil { return nil } @@ -771,8 +771,8 @@ func (o SystemModelPtrOutput) Env() pulumi.StringMapOutput { } // Contents of the AEM system service definition file (systemd). -func (o SystemModelPtrOutput) Service_config() pulumi.StringPtrOutput { - return o.ApplyT(func(v *SystemModel) *string { +func (o SystemPtrOutput) Service_config() pulumi.StringPtrOutput { + return o.ApplyT(func(v *System) *string { if v == nil { return nil } @@ -781,8 +781,8 @@ func (o SystemModelPtrOutput) Service_config() pulumi.StringPtrOutput { } // System user under which AEM instance will be running. By default, the same as the user used to connect to the machine. -func (o SystemModelPtrOutput) User() pulumi.StringPtrOutput { - return o.ApplyT(func(v *SystemModel) *string { +func (o SystemPtrOutput) User() pulumi.StringPtrOutput { + return o.ApplyT(func(v *System) *string { if v == nil { return nil } @@ -791,8 +791,8 @@ func (o SystemModelPtrOutput) User() pulumi.StringPtrOutput { } // Remote root path where provider-related files will be stored. -func (o SystemModelPtrOutput) Work_dir() pulumi.StringPtrOutput { - return o.ApplyT(func(v *SystemModel) *string { +func (o SystemPtrOutput) Work_dir() pulumi.StringPtrOutput { + return o.ApplyT(func(v *System) *string { if v == nil { return nil } @@ -801,20 +801,20 @@ func (o SystemModelPtrOutput) Work_dir() pulumi.StringPtrOutput { } func init() { - pulumi.RegisterInputType(reflect.TypeOf((*ClientModelInput)(nil)).Elem(), ClientModelArgs{}) - pulumi.RegisterInputType(reflect.TypeOf((*ComposeModelInput)(nil)).Elem(), ComposeModelArgs{}) - pulumi.RegisterInputType(reflect.TypeOf((*ComposeModelPtrInput)(nil)).Elem(), ComposeModelArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*ClientInput)(nil)).Elem(), ClientArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*ComposeInput)(nil)).Elem(), ComposeArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*ComposePtrInput)(nil)).Elem(), ComposeArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*InstanceScriptInput)(nil)).Elem(), InstanceScriptArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*InstanceScriptPtrInput)(nil)).Elem(), InstanceScriptArgs{}) - pulumi.RegisterInputType(reflect.TypeOf((*SystemModelInput)(nil)).Elem(), SystemModelArgs{}) - pulumi.RegisterInputType(reflect.TypeOf((*SystemModelPtrInput)(nil)).Elem(), SystemModelArgs{}) - pulumi.RegisterOutputType(ClientModelOutput{}) - pulumi.RegisterOutputType(ComposeModelOutput{}) - pulumi.RegisterOutputType(ComposeModelPtrOutput{}) + pulumi.RegisterInputType(reflect.TypeOf((*SystemInput)(nil)).Elem(), SystemArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*SystemPtrInput)(nil)).Elem(), SystemArgs{}) + pulumi.RegisterOutputType(ClientOutput{}) + pulumi.RegisterOutputType(ComposeOutput{}) + pulumi.RegisterOutputType(ComposePtrOutput{}) pulumi.RegisterOutputType(InstanceModelOutput{}) pulumi.RegisterOutputType(InstanceModelArrayOutput{}) pulumi.RegisterOutputType(InstanceScriptOutput{}) pulumi.RegisterOutputType(InstanceScriptPtrOutput{}) - pulumi.RegisterOutputType(SystemModelOutput{}) - pulumi.RegisterOutputType(SystemModelPtrOutput{}) + pulumi.RegisterOutputType(SystemOutput{}) + pulumi.RegisterOutputType(SystemPtrOutput{}) } diff --git a/sdk/nodejs/compose/index.ts b/sdk/nodejs/compose/index.ts index 08d1eb1..5b4ee60 100644 --- a/sdk/nodejs/compose/index.ts +++ b/sdk/nodejs/compose/index.ts @@ -5,18 +5,18 @@ import * as pulumi from "@pulumi/pulumi"; import * as utilities from "../utilities"; // Export members: -export { InstanceResourceModelArgs } from "./instanceResourceModel"; -export type InstanceResourceModel = import("./instanceResourceModel").InstanceResourceModel; -export const InstanceResourceModel: typeof import("./instanceResourceModel").InstanceResourceModel = null as any; -utilities.lazyLoad(exports, ["InstanceResourceModel"], () => require("./instanceResourceModel")); +export { InstanceArgs } from "./instance"; +export type Instance = import("./instance").Instance; +export const Instance: typeof import("./instance").Instance = null as any; +utilities.lazyLoad(exports, ["Instance"], () => require("./instance")); const _module = { version: utilities.getVersion(), construct: (name: string, type: string, urn: string): pulumi.Resource => { switch (type) { - case "aem:compose:InstanceResourceModel": - return new InstanceResourceModel(name, undefined, { urn }) + case "aem:compose:Instance": + return new Instance(name, undefined, { urn }) default: throw new Error(`unknown resource type ${type}`); } diff --git a/sdk/nodejs/compose/instanceResourceModel.ts b/sdk/nodejs/compose/instance.ts similarity index 74% rename from sdk/nodejs/compose/instanceResourceModel.ts rename to sdk/nodejs/compose/instance.ts index 32c3b07..0163340 100644 --- a/sdk/nodejs/compose/instanceResourceModel.ts +++ b/sdk/nodejs/compose/instance.ts @@ -6,41 +6,41 @@ import * as inputs from "../types/input"; import * as outputs from "../types/output"; import * as utilities from "../utilities"; -export class InstanceResourceModel extends pulumi.CustomResource { +export class Instance extends pulumi.CustomResource { /** - * Get an existing InstanceResourceModel resource's state with the given name, ID, and optional extra + * Get an existing Instance resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ - public static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): InstanceResourceModel { - return new InstanceResourceModel(name, undefined as any, { ...opts, id: id }); + public static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): Instance { + return new Instance(name, undefined as any, { ...opts, id: id }); } /** @internal */ - public static readonly __pulumiType = 'aem:compose:InstanceResourceModel'; + public static readonly __pulumiType = 'aem:compose:Instance'; /** - * Returns true if the given object is an instance of InstanceResourceModel. This is designed to work even + * Returns true if the given object is an instance of Instance. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ - public static isInstance(obj: any): obj is InstanceResourceModel { + public static isInstance(obj: any): obj is Instance { if (obj === undefined || obj === null) { return false; } - return obj['__pulumiType'] === InstanceResourceModel.__pulumiType; + return obj['__pulumiType'] === Instance.__pulumiType; } /** * Connection settings used to access the machine on which the AEM instance will be running. */ - public readonly client!: pulumi.Output; + public readonly client!: pulumi.Output; /** * AEM Compose CLI configuration. See documentation(https://github.com/wttech/aemc#configuration). */ - public readonly compose!: pulumi.Output; + public readonly compose!: pulumi.Output; /** * Files or directories to be copied into the machine. */ @@ -52,16 +52,16 @@ export class InstanceResourceModel extends pulumi.CustomResource { /** * Operating system configuration for the machine on which AEM instance will be running. */ - public readonly system!: pulumi.Output; + public readonly system!: pulumi.Output; /** - * Create a InstanceResourceModel resource with the given unique name, arguments, and options. + * Create a Instance resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ - constructor(name: string, args: InstanceResourceModelArgs, opts?: pulumi.CustomResourceOptions) { + constructor(name: string, args: InstanceArgs, opts?: pulumi.CustomResourceOptions) { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (!opts.id) { @@ -81,22 +81,22 @@ export class InstanceResourceModel extends pulumi.CustomResource { resourceInputs["system"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - super(InstanceResourceModel.__pulumiType, name, resourceInputs, opts); + super(Instance.__pulumiType, name, resourceInputs, opts); } } /** - * The set of arguments for constructing a InstanceResourceModel resource. + * The set of arguments for constructing a Instance resource. */ -export interface InstanceResourceModelArgs { +export interface InstanceArgs { /** * Connection settings used to access the machine on which the AEM instance will be running. */ - client: pulumi.Input; + client: pulumi.Input; /** * AEM Compose CLI configuration. See documentation(https://github.com/wttech/aemc#configuration). */ - compose?: pulumi.Input; + compose?: pulumi.Input; /** * Files or directories to be copied into the machine. */ @@ -104,5 +104,5 @@ export interface InstanceResourceModelArgs { /** * Operating system configuration for the machine on which AEM instance will be running. */ - system?: pulumi.Input; + system?: pulumi.Input; } diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json index eec6e1d..a0145ea 100644 --- a/sdk/nodejs/tsconfig.json +++ b/sdk/nodejs/tsconfig.json @@ -14,7 +14,7 @@ }, "files": [ "compose/index.ts", - "compose/instanceResourceModel.ts", + "compose/instance.ts", "index.ts", "provider.ts", "types/index.ts", diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index c863858..8c49205 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -6,7 +6,7 @@ import * as inputs from "../types/input"; import * as outputs from "../types/output"; export namespace compose { - export interface ClientModelArgs { + export interface ClientArgs { /** * Used when trying to connect to the AEM instance machine (often right after creating it). Need to be enough long because various types of connections (like AWS SSM or SSH) may need some time to boot up the agent. */ @@ -29,7 +29,7 @@ export namespace compose { type: pulumi.Input; } - export interface ComposeModelArgs { + export interface ComposeArgs { /** * Contents of the AEM Compose YML configuration file. */ @@ -67,7 +67,7 @@ export namespace compose { script?: pulumi.Input; } - export interface SystemModelArgs { + export interface SystemArgs { /** * Script executed once upon instance connection, often for mounting on VM data volumes from attached disks (e.g., AWS EBS, Azure Disk Storage). This script runs only once, even during instance recreation, as changes are typically persistent and system-wide. If re-execution is needed, it is recommended to set up a new machine. */ diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index a672d91..2b2610b 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -6,7 +6,7 @@ import * as inputs from "../types/input"; import * as outputs from "../types/output"; export namespace compose { - export interface ClientModel { + export interface Client { /** * Used when trying to connect to the AEM instance machine (often right after creating it). Need to be enough long because various types of connections (like AWS SSM or SSH) may need some time to boot up the agent. */ @@ -29,7 +29,7 @@ export namespace compose { type: string; } - export interface ComposeModel { + export interface Compose { /** * Contents of the AEM Compose YML configuration file. */ @@ -94,7 +94,7 @@ export namespace compose { script?: string; } - export interface SystemModel { + export interface System { /** * Script executed once upon instance connection, often for mounting on VM data volumes from attached disks (e.g., AWS EBS, Azure Disk Storage). This script runs only once, even during instance recreation, as changes are typically persistent and system-wide. If re-execution is needed, it is recommended to set up a new machine. */ diff --git a/tests/provider_test.go b/tests/provider_test.go index 2340c36..c951178 100644 --- a/tests/provider_test.go +++ b/tests/provider_test.go @@ -14,11 +14,11 @@ import ( aem "github.com/wttech/pulumi-aem-native/provider" ) -func TestInstanceResourceModelCheck(t *testing.T) { +func TestInstanceModelCheck(t *testing.T) { prov := provider() response, err := prov.Check(p.CheckRequest{ - Urn: urn("InstanceResourceModel"), + Urn: urn("Instance"), News: resource.PropertyMap{ "client": resource.NewObjectProperty(resource.PropertyMap{ "type": resource.NewStringProperty("mock"),