@pulumi/harness
Version:
A Pulumi package for creating and managing Harness resources.
119 lines • 5.08 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.AwsAlb = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for creating an AWS application load balancer
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as harness from "@pulumi/harness";
*
* const test = new harness.autostopping.AwsAlb("test", {
* name: "name",
* cloudConnectorId: "cloud_connector_id",
* hostName: "host_name",
* region: "region",
* vpc: "vpc",
* securityGroups: [
* "sg1",
* "sg2",
* ],
* route53HostedZoneId: "/hostedzone/zone_id",
* deleteCloudResourcesOnDestroy: true,
* });
* const harnessAlb = new harness.autostopping.AwsAlb("harness_alb", {
* name: "harness_alb",
* cloudConnectorId: "cloud_connector_id",
* hostName: "host.name",
* albArn: "arn:aws:elasticloadbalancing:region:aws_account_id:loadbalancer/app/harness_alb/id",
* region: "region",
* vpc: "vpc",
* securityGroups: ["sg-0"],
* route53HostedZoneId: "/hostedzone/zone_id",
* deleteCloudResourcesOnDestroy: false,
* });
* ```
*/
class AwsAlb extends pulumi.CustomResource {
/**
* Get an existing AwsAlb 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 state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new AwsAlb(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of AwsAlb. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === AwsAlb.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["albArn"] = state?.albArn;
resourceInputs["certificateId"] = state?.certificateId;
resourceInputs["cloudConnectorId"] = state?.cloudConnectorId;
resourceInputs["deleteCloudResourcesOnDestroy"] = state?.deleteCloudResourcesOnDestroy;
resourceInputs["hostName"] = state?.hostName;
resourceInputs["identifier"] = state?.identifier;
resourceInputs["name"] = state?.name;
resourceInputs["region"] = state?.region;
resourceInputs["route53HostedZoneId"] = state?.route53HostedZoneId;
resourceInputs["securityGroups"] = state?.securityGroups;
resourceInputs["vpc"] = state?.vpc;
}
else {
const args = argsOrState;
if (args?.cloudConnectorId === undefined && !opts.urn) {
throw new Error("Missing required property 'cloudConnectorId'");
}
if (args?.deleteCloudResourcesOnDestroy === undefined && !opts.urn) {
throw new Error("Missing required property 'deleteCloudResourcesOnDestroy'");
}
if (args?.hostName === undefined && !opts.urn) {
throw new Error("Missing required property 'hostName'");
}
if (args?.region === undefined && !opts.urn) {
throw new Error("Missing required property 'region'");
}
if (args?.vpc === undefined && !opts.urn) {
throw new Error("Missing required property 'vpc'");
}
resourceInputs["albArn"] = args?.albArn;
resourceInputs["certificateId"] = args?.certificateId;
resourceInputs["cloudConnectorId"] = args?.cloudConnectorId;
resourceInputs["deleteCloudResourcesOnDestroy"] = args?.deleteCloudResourcesOnDestroy;
resourceInputs["hostName"] = args?.hostName;
resourceInputs["name"] = args?.name;
resourceInputs["region"] = args?.region;
resourceInputs["route53HostedZoneId"] = args?.route53HostedZoneId;
resourceInputs["securityGroups"] = args?.securityGroups;
resourceInputs["vpc"] = args?.vpc;
resourceInputs["identifier"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(AwsAlb.__pulumiType, name, resourceInputs, opts);
}
}
exports.AwsAlb = AwsAlb;
/** @internal */
AwsAlb.__pulumiType = 'harness:autostopping/awsAlb:AwsAlb';
//# sourceMappingURL=awsAlb.js.map