UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

174 lines 7.69 kB
"use strict"; // *** 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.Environment = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides an Elastic Beanstalk Environment Resource. Elastic Beanstalk allows * you to deploy and manage applications in the AWS cloud without worrying about * the infrastructure that runs those applications. * * Environments are often things such as `development`, `integration`, or * `production`. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const exampleApplication = new aws.elasticbeanstalk.Application("example", { * name: "tf-test-name", * description: "tf-test-desc", * }); * const example = new aws.elasticbeanstalk.Environment("example", { * name: "tf-test-name", * application: exampleApplication.name, * solutionStackName: "64bit Amazon Linux 2015.03 v2.0.3 running Go 1.4", * }); * ``` * * ## Option Settings * * Some options can be stack-specific, check [AWS Docs](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html) * for supported options and examples. * * The `setting` and `allSettings` mappings support the following format: * * * `namespace` - (Required) Unique namespace identifying the option's associated AWS resource * * `name` - (Required) Name of the configuration option * * `value` - (Required) Value for the configuration option * * `resource` - (Optional) resource name for [scheduled action](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html#command-options-general-autoscalingscheduledaction) * * ### Example With Options * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const tftest = new aws.elasticbeanstalk.Application("tftest", { * name: "tf-test-name", * description: "tf-test-desc", * }); * const tfenvtest = new aws.elasticbeanstalk.Environment("tfenvtest", { * name: "tf-test-name", * application: tftest.name, * solutionStackName: "64bit Amazon Linux 2015.03 v2.0.3 running Go 1.4", * settings: [ * { * namespace: "aws:ec2:vpc", * name: "VPCId", * value: "vpc-xxxxxxxx", * }, * { * namespace: "aws:ec2:vpc", * name: "Subnets", * value: "subnet-xxxxxxxx", * }, * ], * }); * ``` * * ## Import * * Using `pulumi import`, import Elastic Beanstalk Environments using the `id`. For example: * * ```sh * $ pulumi import aws:elasticbeanstalk/environment:Environment prodenv e-rpqsewtp2j * ``` */ class Environment extends pulumi.CustomResource { /** * Get an existing Environment 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 Environment(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Environment. 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'] === Environment.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["allSettings"] = state?.allSettings; resourceInputs["application"] = state?.application; resourceInputs["arn"] = state?.arn; resourceInputs["autoscalingGroups"] = state?.autoscalingGroups; resourceInputs["cname"] = state?.cname; resourceInputs["cnamePrefix"] = state?.cnamePrefix; resourceInputs["description"] = state?.description; resourceInputs["endpointUrl"] = state?.endpointUrl; resourceInputs["instances"] = state?.instances; resourceInputs["launchConfigurations"] = state?.launchConfigurations; resourceInputs["loadBalancers"] = state?.loadBalancers; resourceInputs["name"] = state?.name; resourceInputs["platformArn"] = state?.platformArn; resourceInputs["pollInterval"] = state?.pollInterval; resourceInputs["queues"] = state?.queues; resourceInputs["region"] = state?.region; resourceInputs["settings"] = state?.settings; resourceInputs["solutionStackName"] = state?.solutionStackName; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["templateName"] = state?.templateName; resourceInputs["tier"] = state?.tier; resourceInputs["triggers"] = state?.triggers; resourceInputs["version"] = state?.version; resourceInputs["waitForReadyTimeout"] = state?.waitForReadyTimeout; } else { const args = argsOrState; if (args?.application === undefined && !opts.urn) { throw new Error("Missing required property 'application'"); } resourceInputs["application"] = args?.application; resourceInputs["cnamePrefix"] = args?.cnamePrefix; resourceInputs["description"] = args?.description; resourceInputs["name"] = args?.name; resourceInputs["platformArn"] = args?.platformArn; resourceInputs["pollInterval"] = args?.pollInterval; resourceInputs["region"] = args?.region; resourceInputs["settings"] = args?.settings; resourceInputs["solutionStackName"] = args?.solutionStackName; resourceInputs["tags"] = args?.tags; resourceInputs["templateName"] = args?.templateName; resourceInputs["tier"] = args?.tier; resourceInputs["version"] = args?.version; resourceInputs["waitForReadyTimeout"] = args?.waitForReadyTimeout; resourceInputs["allSettings"] = undefined /*out*/; resourceInputs["arn"] = undefined /*out*/; resourceInputs["autoscalingGroups"] = undefined /*out*/; resourceInputs["cname"] = undefined /*out*/; resourceInputs["endpointUrl"] = undefined /*out*/; resourceInputs["instances"] = undefined /*out*/; resourceInputs["launchConfigurations"] = undefined /*out*/; resourceInputs["loadBalancers"] = undefined /*out*/; resourceInputs["queues"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; resourceInputs["triggers"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Environment.__pulumiType, name, resourceInputs, opts); } } exports.Environment = Environment; /** @internal */ Environment.__pulumiType = 'aws:elasticbeanstalk/environment:Environment'; //# sourceMappingURL=environment.js.map