@pulumi/harness
Version:
A Pulumi package for creating and managing Harness resources.
132 lines • 6.6 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.AzureGateway = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for creating an Azure Application Gateway
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as harness from "@pulumi/harness";
*
* const test = new harness.autostopping.AzureGateway("test", {
* name: "name",
* cloudConnectorId: "cloud_connector_id",
* hostName: "host_name",
* region: "eastus2",
* resourceGroup: "resource_group",
* subnetId: "/subscriptions/subscription_id/resourceGroups/resource_group/providers/Microsoft.Network/virtualNetworks/virtual_network/subnets/subnet_id",
* vpc: "/subscriptions/subscription_id/resourceGroups/resource_group/providers/Microsoft.Network/virtualNetworks/virtual_network",
* azureFuncRegion: "westus2",
* frontendIp: "/subscriptions/subscription_id/resourceGroups/resource_group/providers/Microsoft.Network/publicIPAddresses/publicip",
* skuSize: "sku2",
* deleteCloudResourcesOnDestroy: true,
* });
* const importTest = new harness.autostopping.AzureGateway("import_test", {
* name: "import_test",
* cloudConnectorId: "cloud_connector_id",
* hostName: "host_name",
* region: "westus2",
* resourceGroup: "test_resource_group",
* appGatewayId: "/subscriptions/subscription_id/resourceGroups/test_resource_group/providers/Microsoft.Network/applicationGateways/TestAppGateway",
* certificateId: "/subscriptions/subscription_id/resourceGroups/test_resource_group/providers/Microsoft.Network/applicationGateways/TestAppGateway/sslCertificates/certificate_name",
* azureFuncRegion: "westus2",
* vpc: "/subscriptions/subscription_id/resourceGroups/test_resource_group/providers/Microsoft.Network/virtualNetworks/test_resource_group_vnet",
* deleteCloudResourcesOnDestroy: false,
* });
* ```
*/
class AzureGateway extends pulumi.CustomResource {
/**
* Get an existing AzureGateway 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 AzureGateway(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of AzureGateway. 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'] === AzureGateway.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["appGatewayId"] = state?.appGatewayId;
resourceInputs["azureFuncRegion"] = state?.azureFuncRegion;
resourceInputs["certificateId"] = state?.certificateId;
resourceInputs["cloudConnectorId"] = state?.cloudConnectorId;
resourceInputs["deleteCloudResourcesOnDestroy"] = state?.deleteCloudResourcesOnDestroy;
resourceInputs["frontendIp"] = state?.frontendIp;
resourceInputs["hostName"] = state?.hostName;
resourceInputs["identifier"] = state?.identifier;
resourceInputs["name"] = state?.name;
resourceInputs["region"] = state?.region;
resourceInputs["resourceGroup"] = state?.resourceGroup;
resourceInputs["skuSize"] = state?.skuSize;
resourceInputs["subnetId"] = state?.subnetId;
resourceInputs["vpc"] = state?.vpc;
}
else {
const args = argsOrState;
if (args?.azureFuncRegion === undefined && !opts.urn) {
throw new Error("Missing required property 'azureFuncRegion'");
}
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?.resourceGroup === undefined && !opts.urn) {
throw new Error("Missing required property 'resourceGroup'");
}
if (args?.vpc === undefined && !opts.urn) {
throw new Error("Missing required property 'vpc'");
}
resourceInputs["appGatewayId"] = args?.appGatewayId;
resourceInputs["azureFuncRegion"] = args?.azureFuncRegion;
resourceInputs["certificateId"] = args?.certificateId;
resourceInputs["cloudConnectorId"] = args?.cloudConnectorId;
resourceInputs["deleteCloudResourcesOnDestroy"] = args?.deleteCloudResourcesOnDestroy;
resourceInputs["frontendIp"] = args?.frontendIp;
resourceInputs["hostName"] = args?.hostName;
resourceInputs["name"] = args?.name;
resourceInputs["region"] = args?.region;
resourceInputs["resourceGroup"] = args?.resourceGroup;
resourceInputs["skuSize"] = args?.skuSize;
resourceInputs["subnetId"] = args?.subnetId;
resourceInputs["vpc"] = args?.vpc;
resourceInputs["identifier"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(AzureGateway.__pulumiType, name, resourceInputs, opts);
}
}
exports.AzureGateway = AzureGateway;
/** @internal */
AzureGateway.__pulumiType = 'harness:autostopping/azureGateway:AzureGateway';
//# sourceMappingURL=azureGateway.js.map