ApplicationArgs

data class ApplicationArgs(val appSources: Output<List<ApplicationAppSourceArgs>>? = null, val autoBundleOnDeploy: Output<String>? = null, val awsFlowRubySettings: Output<String>? = null, val dataSourceArn: Output<String>? = null, val dataSourceDatabaseName: Output<String>? = null, val dataSourceType: Output<String>? = null, val description: Output<String>? = null, val documentRoot: Output<String>? = null, val domains: Output<List<String>>? = null, val enableSsl: Output<Boolean>? = null, val environments: Output<List<ApplicationEnvironmentArgs>>? = null, val name: Output<String>? = null, val railsEnv: Output<String>? = null, val shortName: Output<String>? = null, val sslConfigurations: Output<List<ApplicationSslConfigurationArgs>>? = null, val stackId: Output<String>? = null, val type: Output<String>? = null) : ConvertibleToJava<ApplicationArgs>

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as std from "@pulumi/std";
const foo_app = new aws.opsworks.Application("foo-app", {
name: "foobar application",
shortName: "foobar",
stackId: main.id,
type: "rails",
description: "This is a Rails application",
domains: [
"example.com",
"sub.example.com",
],
environments: [{
key: "key",
value: "value",
secure: false,
}],
appSources: [{
type: "git",
revision: "master",
url: "https://github.com/example.git",
}],
enableSsl: true,
sslConfigurations: [{
privateKey: std.file({
input: "./foobar.key",
}).then(invoke => invoke.result),
certificate: std.file({
input: "./foobar.crt",
}).then(invoke => invoke.result),
}],
documentRoot: "public",
autoBundleOnDeploy: "true",
railsEnv: "staging",
});
import pulumi
import pulumi_aws as aws
import pulumi_std as std
foo_app = aws.opsworks.Application("foo-app",
name="foobar application",
short_name="foobar",
stack_id=main["id"],
type="rails",
description="This is a Rails application",
domains=[
"example.com",
"sub.example.com",
],
environments=[{
"key": "key",
"value": "value",
"secure": False,
}],
app_sources=[{
"type": "git",
"revision": "master",
"url": "https://github.com/example.git",
}],
enable_ssl=True,
ssl_configurations=[{
"private_key": std.file(input="./foobar.key").result,
"certificate": std.file(input="./foobar.crt").result,
}],
document_root="public",
auto_bundle_on_deploy="true",
rails_env="staging")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var foo_app = new Aws.OpsWorks.Application("foo-app", new()
{
Name = "foobar application",
ShortName = "foobar",
StackId = main.Id,
Type = "rails",
Description = "This is a Rails application",
Domains = new[]
{
"example.com",
"sub.example.com",
},
Environments = new[]
{
new Aws.OpsWorks.Inputs.ApplicationEnvironmentArgs
{
Key = "key",
Value = "value",
Secure = false,
},
},
AppSources = new[]
{
new Aws.OpsWorks.Inputs.ApplicationAppSourceArgs
{
Type = "git",
Revision = "master",
Url = "https://github.com/example.git",
},
},
EnableSsl = true,
SslConfigurations = new[]
{
new Aws.OpsWorks.Inputs.ApplicationSslConfigurationArgs
{
PrivateKey = Std.File.Invoke(new()
{
Input = "./foobar.key",
}).Apply(invoke => invoke.Result),
Certificate = Std.File.Invoke(new()
{
Input = "./foobar.crt",
}).Apply(invoke => invoke.Result),
},
},
DocumentRoot = "public",
AutoBundleOnDeploy = "true",
RailsEnv = "staging",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opsworks"
"github.com/pulumi/pulumi-std/sdk/go/std"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
invokeFile, err := std.File(ctx, &std.FileArgs{
Input: "./foobar.key",
}, nil)
if err != nil {
return err
}
invokeFile1, err := std.File(ctx, &std.FileArgs{
Input: "./foobar.crt",
}, nil)
if err != nil {
return err
}
_, err = opsworks.NewApplication(ctx, "foo-app", &opsworks.ApplicationArgs{
Name: pulumi.String("foobar application"),
ShortName: pulumi.String("foobar"),
StackId: pulumi.Any(main.Id),
Type: pulumi.String("rails"),
Description: pulumi.String("This is a Rails application"),
Domains: pulumi.StringArray{
pulumi.String("example.com"),
pulumi.String("sub.example.com"),
},
Environments: opsworks.ApplicationEnvironmentArray{
&opsworks.ApplicationEnvironmentArgs{
Key: pulumi.String("key"),
Value: pulumi.String("value"),
Secure: pulumi.Bool(false),
},
},
AppSources: opsworks.ApplicationAppSourceArray{
&opsworks.ApplicationAppSourceArgs{
Type: pulumi.String("git"),
Revision: pulumi.String("master"),
Url: pulumi.String("https://github.com/example.git"),
},
},
EnableSsl: pulumi.Bool(true),
SslConfigurations: opsworks.ApplicationSslConfigurationArray{
&opsworks.ApplicationSslConfigurationArgs{
PrivateKey: pulumi.String(invokeFile.Result),
Certificate: pulumi.String(invokeFile1.Result),
},
},
DocumentRoot: pulumi.String("public"),
AutoBundleOnDeploy: pulumi.String("true"),
RailsEnv: pulumi.String("staging"),
})
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.opsworks.Application;
import com.pulumi.aws.opsworks.ApplicationArgs;
import com.pulumi.aws.opsworks.inputs.ApplicationEnvironmentArgs;
import com.pulumi.aws.opsworks.inputs.ApplicationAppSourceArgs;
import com.pulumi.aws.opsworks.inputs.ApplicationSslConfigurationArgs;
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 foo_app = new Application("foo-app", ApplicationArgs.builder()
.name("foobar application")
.shortName("foobar")
.stackId(main.id())
.type("rails")
.description("This is a Rails application")
.domains(
"example.com",
"sub.example.com")
.environments(ApplicationEnvironmentArgs.builder()
.key("key")
.value("value")
.secure(false)
.build())
.appSources(ApplicationAppSourceArgs.builder()
.type("git")
.revision("master")
.url("https://github.com/example.git")
.build())
.enableSsl(true)
.sslConfigurations(ApplicationSslConfigurationArgs.builder()
.privateKey(StdFunctions.file(FileArgs.builder()
.input("./foobar.key")
.build()).result())
.certificate(StdFunctions.file(FileArgs.builder()
.input("./foobar.crt")
.build()).result())
.build())
.documentRoot("public")
.autoBundleOnDeploy(true)
.railsEnv("staging")
.build());
}
}
resources:
foo-app:
type: aws:opsworks:Application
properties:
name: foobar application
shortName: foobar
stackId: ${main.id}
type: rails
description: This is a Rails application
domains:
- example.com
- sub.example.com
environments:
- key: key
value: value
secure: false
appSources:
- type: git
revision: master
url: https://github.com/example.git
enableSsl: true
sslConfigurations:
- privateKey:
fn::invoke:
function: std:file
arguments:
input: ./foobar.key
return: result
certificate:
fn::invoke:
function: std:file
arguments:
input: ./foobar.crt
return: result
documentRoot: public
autoBundleOnDeploy: true
railsEnv: staging

Import

Using pulumi import, import Opsworks Application using the id. For example:

$ pulumi import aws:opsworks/application:Application test <id>

Constructors

Link copied to clipboard
constructor(appSources: Output<List<ApplicationAppSourceArgs>>? = null, autoBundleOnDeploy: Output<String>? = null, awsFlowRubySettings: Output<String>? = null, dataSourceArn: Output<String>? = null, dataSourceDatabaseName: Output<String>? = null, dataSourceType: Output<String>? = null, description: Output<String>? = null, documentRoot: Output<String>? = null, domains: Output<List<String>>? = null, enableSsl: Output<Boolean>? = null, environments: Output<List<ApplicationEnvironmentArgs>>? = null, name: Output<String>? = null, railsEnv: Output<String>? = null, shortName: Output<String>? = null, sslConfigurations: Output<List<ApplicationSslConfigurationArgs>>? = null, stackId: Output<String>? = null, type: Output<String>? = null)

Properties

Link copied to clipboard

SCM configuration of the app as described below.

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

Run bundle install when deploying for application of type rails.

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

Specify activity and workflow workers for your app using the aws-flow gem.

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

The data source's ARN.

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

The database name.

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

The data source's type one of AutoSelectOpsworksMysqlInstance, OpsworksMysqlInstance, or RdsDbInstance.

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

A description of the app.

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

Subfolder for the document root for application of type rails.

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

A list of virtual host alias.

Link copied to clipboard
val enableSsl: Output<Boolean>? = null

Whether to enable SSL for the app. This must be set in order to let ssl_configuration.private_key, ssl_configuration.certificate and ssl_configuration.chain take effect.

Link copied to clipboard

Object to define environment variables. Object is described below.

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

A human-readable name for the application.

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

The name of the Rails environment for application of type rails.

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

A short, machine-readable name for the application. This can only be defined on resource creation and ignored on resource update.

Link copied to clipboard

The SSL configuration of the app. Object is described below.

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

ID of the stack the application will belong to.

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

Opsworks application type. One of aws-flow-ruby, java, rails, php, nodejs, static or other.

Functions

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