EnvironmentArgs

data class EnvironmentArgs(val application: Output<String>? = null, val cnamePrefix: Output<String>? = null, val description: Output<String>? = null, val name: Output<String>? = null, val platformArn: Output<String>? = null, val pollInterval: Output<String>? = null, val settings: Output<List<EnvironmentSettingArgs>>? = null, val solutionStackName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val templateName: Output<String>? = null, val tier: Output<String>? = null, val version: Output<String>? = null, val waitForReadyTimeout: Output<String>? = null) : ConvertibleToJava<EnvironmentArgs>

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

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",
});
import pulumi
import pulumi_aws as aws
tftest = aws.elasticbeanstalk.Application("tftest",
name="tf-test-name",
description="tf-test-desc")
tfenvtest = aws.elasticbeanstalk.Environment("tfenvtest",
name="tf-test-name",
application=tftest.name,
solution_stack_name="64bit Amazon Linux 2015.03 v2.0.3 running Go 1.4")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var tftest = new Aws.ElasticBeanstalk.Application("tftest", new()
{
Name = "tf-test-name",
Description = "tf-test-desc",
});
var tfenvtest = new Aws.ElasticBeanstalk.Environment("tfenvtest", new()
{
Name = "tf-test-name",
Application = tftest.Name,
SolutionStackName = "64bit Amazon Linux 2015.03 v2.0.3 running Go 1.4",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticbeanstalk"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tftest, err := elasticbeanstalk.NewApplication(ctx, "tftest", &elasticbeanstalk.ApplicationArgs{
Name: pulumi.String("tf-test-name"),
Description: pulumi.String("tf-test-desc"),
})
if err != nil {
return err
}
_, err = elasticbeanstalk.NewEnvironment(ctx, "tfenvtest", &elasticbeanstalk.EnvironmentArgs{
Name: pulumi.String("tf-test-name"),
Application: tftest.Name,
SolutionStackName: pulumi.String("64bit Amazon Linux 2015.03 v2.0.3 running Go 1.4"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.elasticbeanstalk.Application;
import com.pulumi.aws.elasticbeanstalk.ApplicationArgs;
import com.pulumi.aws.elasticbeanstalk.Environment;
import com.pulumi.aws.elasticbeanstalk.EnvironmentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var tftest = new Application("tftest", ApplicationArgs.builder()
.name("tf-test-name")
.description("tf-test-desc")
.build());
var tfenvtest = new Environment("tfenvtest", EnvironmentArgs.builder()
.name("tf-test-name")
.application(tftest.name())
.solutionStackName("64bit Amazon Linux 2015.03 v2.0.3 running Go 1.4")
.build());
}
}
resources:
tftest:
type: aws:elasticbeanstalk:Application
properties:
name: tf-test-name
description: tf-test-desc
tfenvtest:
type: aws:elasticbeanstalk:Environment
properties:
name: tf-test-name
application: ${tftest.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 for supported options and examples. The setting and all_settings mappings support the following format:

  • namespace - unique namespace identifying the option's associated AWS resource

  • name - name of the configuration option

  • value - value for the configuration option

  • resource - (Optional) resource name for scheduled action

Example With Options

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 pulumi
import pulumi_aws as aws
tftest = aws.elasticbeanstalk.Application("tftest",
name="tf-test-name",
description="tf-test-desc")
tfenvtest = aws.elasticbeanstalk.Environment("tfenvtest",
name="tf-test-name",
application=tftest.name,
solution_stack_name="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",
},
])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var tftest = new Aws.ElasticBeanstalk.Application("tftest", new()
{
Name = "tf-test-name",
Description = "tf-test-desc",
});
var tfenvtest = new Aws.ElasticBeanstalk.Environment("tfenvtest", new()
{
Name = "tf-test-name",
Application = tftest.Name,
SolutionStackName = "64bit Amazon Linux 2015.03 v2.0.3 running Go 1.4",
Settings = new[]
{
new Aws.ElasticBeanstalk.Inputs.EnvironmentSettingArgs
{
Namespace = "aws:ec2:vpc",
Name = "VPCId",
Value = "vpc-xxxxxxxx",
},
new Aws.ElasticBeanstalk.Inputs.EnvironmentSettingArgs
{
Namespace = "aws:ec2:vpc",
Name = "Subnets",
Value = "subnet-xxxxxxxx",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticbeanstalk"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tftest, err := elasticbeanstalk.NewApplication(ctx, "tftest", &elasticbeanstalk.ApplicationArgs{
Name: pulumi.String("tf-test-name"),
Description: pulumi.String("tf-test-desc"),
})
if err != nil {
return err
}
_, err = elasticbeanstalk.NewEnvironment(ctx, "tfenvtest", &elasticbeanstalk.EnvironmentArgs{
Name: pulumi.String("tf-test-name"),
Application: tftest.Name,
SolutionStackName: pulumi.String("64bit Amazon Linux 2015.03 v2.0.3 running Go 1.4"),
Settings: elasticbeanstalk.EnvironmentSettingArray{
&elasticbeanstalk.EnvironmentSettingArgs{
Namespace: pulumi.String("aws:ec2:vpc"),
Name: pulumi.String("VPCId"),
Value: pulumi.String("vpc-xxxxxxxx"),
},
&elasticbeanstalk.EnvironmentSettingArgs{
Namespace: pulumi.String("aws:ec2:vpc"),
Name: pulumi.String("Subnets"),
Value: pulumi.String("subnet-xxxxxxxx"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.elasticbeanstalk.Application;
import com.pulumi.aws.elasticbeanstalk.ApplicationArgs;
import com.pulumi.aws.elasticbeanstalk.Environment;
import com.pulumi.aws.elasticbeanstalk.EnvironmentArgs;
import com.pulumi.aws.elasticbeanstalk.inputs.EnvironmentSettingArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var tftest = new Application("tftest", ApplicationArgs.builder()
.name("tf-test-name")
.description("tf-test-desc")
.build());
var tfenvtest = new Environment("tfenvtest", EnvironmentArgs.builder()
.name("tf-test-name")
.application(tftest.name())
.solutionStackName("64bit Amazon Linux 2015.03 v2.0.3 running Go 1.4")
.settings(
EnvironmentSettingArgs.builder()
.namespace("aws:ec2:vpc")
.name("VPCId")
.value("vpc-xxxxxxxx")
.build(),
EnvironmentSettingArgs.builder()
.namespace("aws:ec2:vpc")
.name("Subnets")
.value("subnet-xxxxxxxx")
.build())
.build());
}
}
resources:
tftest:
type: aws:elasticbeanstalk:Application
properties:
name: tf-test-name
description: tf-test-desc
tfenvtest:
type: aws:elasticbeanstalk:Environment
properties:
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:

$ pulumi import aws:elasticbeanstalk/environment:Environment prodenv e-rpqsewtp2j

Constructors

Link copied to clipboard
constructor(application: Output<String>? = null, cnamePrefix: Output<String>? = null, description: Output<String>? = null, name: Output<String>? = null, platformArn: Output<String>? = null, pollInterval: Output<String>? = null, settings: Output<List<EnvironmentSettingArgs>>? = null, solutionStackName: Output<String>? = null, tags: Output<Map<String, String>>? = null, templateName: Output<String>? = null, tier: Output<String>? = null, version: Output<String>? = null, waitForReadyTimeout: Output<String>? = null)

Properties

Link copied to clipboard
val application: Output<String>? = null

Name of the application that contains the version to be deployed

Link copied to clipboard
val cnamePrefix: Output<String>? = null

Prefix to use for the fully qualified DNS name of the Environment.

Link copied to clipboard
val description: Output<String>? = null

Short description of the Environment

Link copied to clipboard
val name: Output<String>? = null

A unique name for this Environment. This name is used in the application URL

Link copied to clipboard
val platformArn: Output<String>? = null

The ARN of the Elastic Beanstalk Platform to use in deployment

Link copied to clipboard
val pollInterval: Output<String>? = null

The time between polling the AWS API to check if changes have been applied. Use this to adjust the rate of API calls for any create or update action. Minimum 10s, maximum 180s. Omit this to use the default behavior, which is an exponential backoff

Link copied to clipboard
val settings: Output<List<EnvironmentSettingArgs>>? = null

Option settings to configure the new Environment. These override specific values that are set as defaults. The format is detailed below in Option Settings

Link copied to clipboard
val solutionStackName: Output<String>? = null

A solution stack to base your environment off of. Example stacks can be found in the Amazon API documentation

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A set of tags to apply to the Environment. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val templateName: Output<String>? = null

The name of the Elastic Beanstalk Configuration template to use in deployment

Link copied to clipboard
val tier: Output<String>? = null

Elastic Beanstalk Environment tier. Valid values are Worker or WebServer. If tier is left blank WebServer will be used.

Link copied to clipboard
val version: Output<String>? = null

The name of the Elastic Beanstalk Application Version to use in deployment.

Link copied to clipboard
val waitForReadyTimeout: Output<String>? = null

The maximum duration that this provider should wait for an Elastic Beanstalk Environment to be in a ready state before timing out.

Functions

Link copied to clipboard
open override fun toJava(): EnvironmentArgs