com.pulumi.aws.opsworks.kotlin.ApplicationArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.opsworks.kotlin
import com.pulumi.aws.opsworks.ApplicationArgs.builder
import com.pulumi.aws.opsworks.kotlin.inputs.ApplicationAppSourceArgs
import com.pulumi.aws.opsworks.kotlin.inputs.ApplicationAppSourceArgsBuilder
import com.pulumi.aws.opsworks.kotlin.inputs.ApplicationEnvironmentArgs
import com.pulumi.aws.opsworks.kotlin.inputs.ApplicationEnvironmentArgsBuilder
import com.pulumi.aws.opsworks.kotlin.inputs.ApplicationSslConfigurationArgs
import com.pulumi.aws.opsworks.kotlin.inputs.ApplicationSslConfigurationArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Provides an OpsWorks application resource.
* ## Example Usage
*
* ```typescript
* 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",
* });
* ```
* ```python
* 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")
* ```
* ```csharp
* 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",
* });
* });
* ```
* ```go
* 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
* })
* }
* ```
* ```java
* 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());
* }
* }
* ```
* ```yaml
* 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:
* ```sh
* $ pulumi import aws:opsworks/application:Application test
* ```
* @property appSources SCM configuration of the app as described below.
* @property autoBundleOnDeploy Run bundle install when deploying for application of type `rails`.
* @property awsFlowRubySettings Specify activity and workflow workers for your app using the aws-flow gem.
* @property dataSourceArn The data source's ARN.
* @property dataSourceDatabaseName The database name.
* @property dataSourceType The data source's type one of `AutoSelectOpsworksMysqlInstance`, `OpsworksMysqlInstance`, or `RdsDbInstance`.
* @property description A description of the app.
* @property documentRoot Subfolder for the document root for application of type `rails`.
* @property domains A list of virtual host alias.
* @property enableSsl 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.
* @property environments Object to define environment variables. Object is described below.
* @property name A human-readable name for the application.
* @property railsEnv The name of the Rails environment for application of type `rails`.
* @property shortName A short, machine-readable name for the application. This can only be defined on resource creation and ignored on resource update.
* @property sslConfigurations The SSL configuration of the app. Object is described below.
* @property stackId ID of the stack the application will belong to.
* @property type Opsworks application type. One of `aws-flow-ruby`, `java`, `rails`, `php`, `nodejs`, `static` or `other`.
*/
public data class ApplicationArgs(
public val appSources: Output>? = null,
public val autoBundleOnDeploy: Output? = null,
public val awsFlowRubySettings: Output? = null,
public val dataSourceArn: Output? = null,
public val dataSourceDatabaseName: Output? = null,
public val dataSourceType: Output? = null,
public val description: Output? = null,
public val documentRoot: Output? = null,
public val domains: Output>? = null,
public val enableSsl: Output? = null,
public val environments: Output>? = null,
public val name: Output? = null,
public val railsEnv: Output? = null,
public val shortName: Output? = null,
public val sslConfigurations: Output>? = null,
public val stackId: Output? = null,
public val type: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.aws.opsworks.ApplicationArgs =
com.pulumi.aws.opsworks.ApplicationArgs.builder()
.appSources(
appSources?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.autoBundleOnDeploy(autoBundleOnDeploy?.applyValue({ args0 -> args0 }))
.awsFlowRubySettings(awsFlowRubySettings?.applyValue({ args0 -> args0 }))
.dataSourceArn(dataSourceArn?.applyValue({ args0 -> args0 }))
.dataSourceDatabaseName(dataSourceDatabaseName?.applyValue({ args0 -> args0 }))
.dataSourceType(dataSourceType?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.documentRoot(documentRoot?.applyValue({ args0 -> args0 }))
.domains(domains?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.enableSsl(enableSsl?.applyValue({ args0 -> args0 }))
.environments(
environments?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.name(name?.applyValue({ args0 -> args0 }))
.railsEnv(railsEnv?.applyValue({ args0 -> args0 }))
.shortName(shortName?.applyValue({ args0 -> args0 }))
.sslConfigurations(
sslConfigurations?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.stackId(stackId?.applyValue({ args0 -> args0 }))
.type(type?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ApplicationArgs].
*/
@PulumiTagMarker
public class ApplicationArgsBuilder internal constructor() {
private var appSources: Output>? = null
private var autoBundleOnDeploy: Output? = null
private var awsFlowRubySettings: Output? = null
private var dataSourceArn: Output? = null
private var dataSourceDatabaseName: Output? = null
private var dataSourceType: Output? = null
private var description: Output? = null
private var documentRoot: Output? = null
private var domains: Output>? = null
private var enableSsl: Output? = null
private var environments: Output>? = null
private var name: Output? = null
private var railsEnv: Output? = null
private var shortName: Output? = null
private var sslConfigurations: Output>? = null
private var stackId: Output? = null
private var type: Output? = null
/**
* @param value SCM configuration of the app as described below.
*/
@JvmName("hetvugjrlyrenynx")
public suspend fun appSources(`value`: Output>) {
this.appSources = value
}
@JvmName("gyhenvrprblykgpn")
public suspend fun appSources(vararg values: Output) {
this.appSources = Output.all(values.asList())
}
/**
* @param values SCM configuration of the app as described below.
*/
@JvmName("mvmunqljcqldxlva")
public suspend fun appSources(values: List