Class Application
DEPRECATED: This resource manages applications in swarm cluster only, which is being deprecated and will be replaced by Kubernetes cluster.
This resource use an orchestration template to define and deploy a multi-container application. An application is created by using an orchestration template. Each application can contain one or more services.
NOTE: Application orchestration template must be a valid Docker Compose YAML template.
NOTE: At present, this resource only support swarm cluster.
Example Usage
using System.IO;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var app = new AliCloud.CS.Application("app", new AliCloud.CS.ApplicationArgs
{
ClusterName = "my-first-swarm",
Environment =
{
{ "EXTERNAL_URL", "123.123.123.123:8080" },
},
LatestImage = true,
Template = File.ReadAllText("wordpress.yml"),
Version = "1.2",
});
}
}
Inherited Members
Namespace: Pulumi.AliCloud.CS
Assembly: Pulumi.AliCloud.dll
Syntax
public class Application : CustomResource
Constructors
View SourceApplication(String, ApplicationArgs, CustomResourceOptions)
Create a Application resource with the given unique name, arguments, and options.
Declaration
public Application(string name, ApplicationArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ApplicationArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceBlueGreen
Wherther to use "Blue Green" method when release a new version. Default to false.
Declaration
public Output<bool?> BlueGreen { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
BlueGreenConfirm
Whether to confirm a "Blue Green" application. Default to false. It will be ignored when blue_green is false.
Declaration
public Output<bool?> BlueGreenConfirm { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
ClusterName
The swarm cluster's name.
Declaration
public Output<string> ClusterName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DefaultDomain
The application default domain and it can be used to configure routing service.
Declaration
public Output<string> DefaultDomain { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
The description of application.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Environment
A key/value map used to replace the variable parameter in the Compose template.
Declaration
public Output<ImmutableDictionary<string, object>> Environment { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
LatestImage
Whether to use latest docker image while each updating application. Default to false.
Declaration
public Output<bool?> LatestImage { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Name
The application name. It should be 1-64 characters long, and can contain numbers, English letters and hyphens, but cannot start with hyphens.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Services
List of services in the application. It contains several attributes to Block Nodes.
Declaration
public Output<ImmutableArray<ApplicationService>> Services { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<ApplicationService>> |
Template
The application deployment template and it must be Docker Compose format.
Declaration
public Output<string> Template { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Version
The application deploying version. Each updating, it must be different with current. Default to "1.0"
Declaration
public Output<string> Version { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, ApplicationState, CustomResourceOptions)
Get an existing Application resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Application Get(string name, Input<string> id, ApplicationState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| ApplicationState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Application |