How to use the @pulumi/pulumi.mergeOptions function in @pulumi/pulumi

To help you get started, we’ve selected a few @pulumi/pulumi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pulumi / pulumi-awsx / nodejs / awsx / autoscaling / autoscaling.ts View on Github external
if (this.targetGroups.indexOf(targetGroup) < 0) {
            throw new Error("AutoScalingGroup must have been created with [args.targetGroup] to support scaling by request count.");
        }

        // loadbalancer-arnsuffix/targetgroup-arnsuffix is the format necessary to specify an
        // AppTargetGroup for a tracking policy.  See
        // https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_PredefinedMetricSpecification.html
        // for more details.
        const loadBalancerSuffix = targetGroup.loadBalancer.loadBalancer.arnSuffix;
        const targetGroupSuffix = targetGroup.targetGroup.arnSuffix;

        return targetTracking.createPredefinedMetricPolicy(name, this, {
            predefinedMetricType: "ALBRequestCountPerTarget",
            resourceLabel: pulumi.interpolate `${loadBalancerSuffix}/${targetGroupSuffix}`,
            ...args,
        }, pulumi.mergeOptions(opts, { dependsOn: targetGroup.getListenersAsync() }));
    }
github pulumi / pulumi-kubernetes / sdk / nodejs / apps / v1 / controllerRevision.ts View on Github external
inputs["data"] = args ? args.data : undefined;
            inputs["kind"] = "ControllerRevision";
            inputs["metadata"] = args ? args.metadata : undefined;
            inputs["revision"] = args ? args.revision : undefined;
        } else {
            inputs["apiVersion"] = undefined /*out*/;
            inputs["data"] = undefined /*out*/;
            inputs["kind"] = undefined /*out*/;
            inputs["metadata"] = undefined /*out*/;
            inputs["revision"] = undefined /*out*/;
        }
        if (!opts.version) {
            opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
        }
        const aliasOpts = { aliases: [{ type: "kubernetes:apps/v1beta1:ControllerRevision" }, { type: "kubernetes:apps/v1beta2:ControllerRevision" }] };
        opts = pulumi.mergeOptions(opts, aliasOpts);
        super(ControllerRevision.__pulumiType, name, inputs, opts);
    }
}
github pulumi / pulumi-kubernetes / sdk / nodejs / scheduling / v1beta1 / priorityClass.ts View on Github external
inputs["preemptionPolicy"] = args ? args.preemptionPolicy : undefined;
            inputs["value"] = args ? args.value : undefined;
        } else {
            inputs["apiVersion"] = undefined /*out*/;
            inputs["description"] = undefined /*out*/;
            inputs["globalDefault"] = undefined /*out*/;
            inputs["kind"] = undefined /*out*/;
            inputs["metadata"] = undefined /*out*/;
            inputs["preemptionPolicy"] = undefined /*out*/;
            inputs["value"] = undefined /*out*/;
        }
        if (!opts.version) {
            opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
        }
        const aliasOpts = { aliases: [{ type: "kubernetes:scheduling.k8s.io/v1:PriorityClass" }, { type: "kubernetes:scheduling.k8s.io/v1alpha1:PriorityClass" }] };
        opts = pulumi.mergeOptions(opts, aliasOpts);
        super(PriorityClass.__pulumiType, name, inputs, opts);
    }
}
github pulumi / pulumi-google-native / sdk / nodejs / essentialcontacts / v1 / folderContact.ts View on Github external
inputs["folderId"] = args ? args.folderId : undefined;
            inputs["languageTag"] = args ? args.languageTag : undefined;
            inputs["name"] = args ? args.name : undefined;
            inputs["notificationCategorySubscriptions"] = args ? args.notificationCategorySubscriptions : undefined;
            inputs["validateTime"] = args ? args.validateTime : undefined;
            inputs["validationState"] = args ? args.validationState : undefined;
        } else {
            inputs["email"] = undefined /*out*/;
            inputs["languageTag"] = undefined /*out*/;
            inputs["name"] = undefined /*out*/;
            inputs["notificationCategorySubscriptions"] = undefined /*out*/;
            inputs["validateTime"] = undefined /*out*/;
            inputs["validationState"] = undefined /*out*/;
        }
        if (!opts.version) {
            opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
        }
        super(FolderContact.__pulumiType, name, inputs, opts);
    }
}
github pulumi / pulumi-kubernetes / sdk / nodejs / apps / v1 / deployment.ts View on Github external
opts = opts || {};
        if (!opts.id) {
            inputs["apiVersion"] = "apps/v1";
            inputs["kind"] = "Deployment";
            inputs["metadata"] = args ? args.metadata : undefined;
            inputs["spec"] = args ? args.spec : undefined;
            inputs["status"] = undefined /*out*/;
        } else {
            inputs["apiVersion"] = undefined /*out*/;
            inputs["kind"] = undefined /*out*/;
            inputs["metadata"] = undefined /*out*/;
            inputs["spec"] = undefined /*out*/;
            inputs["status"] = undefined /*out*/;
        }
        if (!opts.version) {
            opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
        }
        const aliasOpts = { aliases: [{ type: "kubernetes:apps/v1beta1:Deployment" }, { type: "kubernetes:apps/v1beta2:Deployment" }, { type: "kubernetes:extensions/v1beta1:Deployment" }] };
        opts = pulumi.mergeOptions(opts, aliasOpts);
        super(Deployment.__pulumiType, name, inputs, opts);
    }
}
github pulumi / pulumi-google-native / sdk / nodejs / policysimulator / v1 / replay.ts View on Github external
throw new Error("Missing required property 'project'");
            }
            inputs["config"] = args ? args.config : undefined;
            inputs["location"] = args ? args.location : undefined;
            inputs["project"] = args ? args.project : undefined;
            inputs["name"] = undefined /*out*/;
            inputs["resultsSummary"] = undefined /*out*/;
            inputs["state"] = undefined /*out*/;
        } else {
            inputs["config"] = undefined /*out*/;
            inputs["name"] = undefined /*out*/;
            inputs["resultsSummary"] = undefined /*out*/;
            inputs["state"] = undefined /*out*/;
        }
        if (!opts.version) {
            opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
        }
        super(Replay.__pulumiType, name, inputs, opts);
    }
}
github pulumi / pulumi-kubernetes / sdk / nodejs / coordination / v1 / lease.ts View on Github external
if (!opts.id) {
            inputs["apiVersion"] = "coordination.k8s.io/v1";
            inputs["kind"] = "Lease";
            inputs["metadata"] = args ? args.metadata : undefined;
            inputs["spec"] = args ? args.spec : undefined;
        } else {
            inputs["apiVersion"] = undefined /*out*/;
            inputs["kind"] = undefined /*out*/;
            inputs["metadata"] = undefined /*out*/;
            inputs["spec"] = undefined /*out*/;
        }
        if (!opts.version) {
            opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
        }
        const aliasOpts = { aliases: [{ type: "kubernetes:coordination.k8s.io/v1beta1:Lease" }] };
        opts = pulumi.mergeOptions(opts, aliasOpts);
        super(Lease.__pulumiType, name, inputs, opts);
    }
}
github pulumi / pulumi-google-native / sdk / nodejs / dialogflow / v2 / googleCloudDialogflowV2Intent.ts View on Github external
inputs["messages"] = args ? args.messages : undefined;
            inputs["mlDisabled"] = args ? args.mlDisabled : undefined;
            inputs["name"] = args ? args.name : undefined;
            inputs["outputContexts"] = args ? args.outputContexts : undefined;
            inputs["parameters"] = args ? args.parameters : undefined;
            inputs["parent"] = args ? args.parent : undefined;
            inputs["parentFollowupIntentName"] = args ? args.parentFollowupIntentName : undefined;
            inputs["priority"] = args ? args.priority : undefined;
            inputs["resetContexts"] = args ? args.resetContexts : undefined;
            inputs["rootFollowupIntentName"] = args ? args.rootFollowupIntentName : undefined;
            inputs["trainingPhrases"] = args ? args.trainingPhrases : undefined;
            inputs["webhookState"] = args ? args.webhookState : undefined;
        } else {
        }
        if (!opts.version) {
            opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
        }
        super(GoogleCloudDialogflowV2Intent.__pulumiType, name, inputs, opts);
    }
}
github pulumi / pulumi-kubernetes / sdk / nodejs / apps / v1beta1 / controllerRevisionList.ts View on Github external
if (!opts.id) {
            if ((!args || args.items === undefined) && !opts.urn) {
                throw new Error("Missing required property 'items'");
            }
            inputs["apiVersion"] = "apps/v1beta1";
            inputs["items"] = args ? args.items : undefined;
            inputs["kind"] = "ControllerRevisionList";
            inputs["metadata"] = args ? args.metadata : undefined;
        } else {
            inputs["apiVersion"] = undefined /*out*/;
            inputs["items"] = undefined /*out*/;
            inputs["kind"] = undefined /*out*/;
            inputs["metadata"] = undefined /*out*/;
        }
        if (!opts.version) {
            opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
        }
        super(ControllerRevisionList.__pulumiType, name, inputs, opts);
    }
}
github pulumi / pulumi-google-native / sdk / nodejs / deploymentmanager / alpha / policy.ts View on Github external
if (!opts.id) {
            if ((!args || args.project === undefined) && !opts.urn) {
                throw new Error("Missing required property 'project'");
            }
            if ((!args || args.resource === undefined) && !opts.urn) {
                throw new Error("Missing required property 'resource'");
            }
            inputs["bindings"] = args ? args.bindings : undefined;
            inputs["etag"] = args ? args.etag : undefined;
            inputs["policy"] = args ? args.policy : undefined;
            inputs["project"] = args ? args.project : undefined;
            inputs["resource"] = args ? args.resource : undefined;
        } else {
        }
        if (!opts.version) {
            opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
        }
        super(Policy.__pulumiType, name, inputs, opts);
    }
}