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",
});
}
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
app = alicloud.cs.Application("app",
cluster_name="my-first-swarm",
environment={
"EXTERNAL_URL": "123.123.123.123:8080",
},
latest_image=True,
template=(lambda path: open(path).read())("wordpress.yml"),
version="1.2")import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as fs from "fs";
const app = new alicloud.cs.Application("app", {
clusterName: "my-first-swarm",
environment: {
EXTERNAL_URL: "123.123.123.123:8080",
},
latestImage: true,
template: fs.readFileSync("wordpress.yml", "utf-8"),
version: "1.2",
});Create a Application Resource
new Application(name: string, args: ApplicationArgs, opts?: CustomResourceOptions);def Application(resource_name, opts=None, blue_green=None, blue_green_confirm=None, cluster_name=None, description=None, environment=None, latest_image=None, name=None, template=None, version=None, __props__=None);func NewApplication(ctx *Context, name string, args ApplicationArgs, opts ...ResourceOption) (*Application, error)public Application(string name, ApplicationArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ApplicationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ApplicationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApplicationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Application Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Application resource accepts the following input properties:
- Cluster
Name string The swarm cluster’s name.
- Template string
The application deployment template and it must be Docker Compose format.
- Blue
Green bool Wherther to use “Blue Green” method when release a new version. Default to false.
- Blue
Green boolConfirm Whether to confirm a “Blue Green” application. Default to false. It will be ignored when
blue_greenis false.- Description string
The description of application.
- Environment Dictionary<string, object>
A key/value map used to replace the variable parameter in the Compose template.
- Latest
Image bool Whether to use latest docker image while each updating application. Default to false.
- Name string
The application name. It should be 1-64 characters long, and can contain numbers, English letters and hyphens, but cannot start with hyphens.
- Version string
The application deploying version. Each updating, it must be different with current. Default to “1.0”
- Cluster
Name string The swarm cluster’s name.
- Template string
The application deployment template and it must be Docker Compose format.
- Blue
Green bool Wherther to use “Blue Green” method when release a new version. Default to false.
- Blue
Green boolConfirm Whether to confirm a “Blue Green” application. Default to false. It will be ignored when
blue_greenis false.- Description string
The description of application.
- Environment map[string]interface{}
A key/value map used to replace the variable parameter in the Compose template.
- Latest
Image bool Whether to use latest docker image while each updating application. Default to false.
- Name string
The application name. It should be 1-64 characters long, and can contain numbers, English letters and hyphens, but cannot start with hyphens.
- Version string
The application deploying version. Each updating, it must be different with current. Default to “1.0”
- cluster
Name string The swarm cluster’s name.
- template string
The application deployment template and it must be Docker Compose format.
- blue
Green boolean Wherther to use “Blue Green” method when release a new version. Default to false.
- blue
Green booleanConfirm Whether to confirm a “Blue Green” application. Default to false. It will be ignored when
blue_greenis false.- description string
The description of application.
- environment {[key: string]: any}
A key/value map used to replace the variable parameter in the Compose template.
- latest
Image boolean Whether to use latest docker image while each updating application. Default to false.
- name string
The application name. It should be 1-64 characters long, and can contain numbers, English letters and hyphens, but cannot start with hyphens.
- version string
The application deploying version. Each updating, it must be different with current. Default to “1.0”
- cluster_
name str The swarm cluster’s name.
- template str
The application deployment template and it must be Docker Compose format.
- blue_
green bool Wherther to use “Blue Green” method when release a new version. Default to false.
- blue_
green_ boolconfirm Whether to confirm a “Blue Green” application. Default to false. It will be ignored when
blue_greenis false.- description str
The description of application.
- environment Dict[str, Any]
A key/value map used to replace the variable parameter in the Compose template.
- latest_
image bool Whether to use latest docker image while each updating application. Default to false.
- name str
The application name. It should be 1-64 characters long, and can contain numbers, English letters and hyphens, but cannot start with hyphens.
- version str
The application deploying version. Each updating, it must be different with current. Default to “1.0”
Outputs
All input properties are implicitly available as output properties. Additionally, the Application resource produces the following output properties:
- Default
Domain string The application default domain and it can be used to configure routing service.
- Id string
- The provider-assigned unique ID for this managed resource.
- Services
List<Pulumi.
Ali Cloud. CS. Outputs. Application Service> List of services in the application. It contains several attributes to
Block Nodes.
- Default
Domain string The application default domain and it can be used to configure routing service.
- Id string
- The provider-assigned unique ID for this managed resource.
- Services
[]Application
Service List of services in the application. It contains several attributes to
Block Nodes.
- default
Domain string The application default domain and it can be used to configure routing service.
- id string
- The provider-assigned unique ID for this managed resource.
- services
Application
Service[] List of services in the application. It contains several attributes to
Block Nodes.
- default_
domain str The application default domain and it can be used to configure routing service.
- id str
- The provider-assigned unique ID for this managed resource.
- services
List[Application
Service] List of services in the application. It contains several attributes to
Block Nodes.
Look up an Existing Application Resource
Get an existing Application resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ApplicationState, opts?: CustomResourceOptions): Applicationstatic get(resource_name, id, opts=None, blue_green=None, blue_green_confirm=None, cluster_name=None, default_domain=None, description=None, environment=None, latest_image=None, name=None, services=None, template=None, version=None, __props__=None);func GetApplication(ctx *Context, name string, id IDInput, state *ApplicationState, opts ...ResourceOption) (*Application, error)public static Application Get(string name, Input<string> id, ApplicationState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Blue
Green bool Wherther to use “Blue Green” method when release a new version. Default to false.
- Blue
Green boolConfirm Whether to confirm a “Blue Green” application. Default to false. It will be ignored when
blue_greenis false.- Cluster
Name string The swarm cluster’s name.
- Default
Domain string The application default domain and it can be used to configure routing service.
- Description string
The description of application.
- Environment Dictionary<string, object>
A key/value map used to replace the variable parameter in the Compose template.
- Latest
Image bool Whether to use latest docker image while each updating application. Default to false.
- Name string
The application name. It should be 1-64 characters long, and can contain numbers, English letters and hyphens, but cannot start with hyphens.
- Services
List<Pulumi.
Ali Cloud. CS. Inputs. Application Service Args> List of services in the application. It contains several attributes to
Block Nodes.- Template string
The application deployment template and it must be Docker Compose format.
- Version string
The application deploying version. Each updating, it must be different with current. Default to “1.0”
- Blue
Green bool Wherther to use “Blue Green” method when release a new version. Default to false.
- Blue
Green boolConfirm Whether to confirm a “Blue Green” application. Default to false. It will be ignored when
blue_greenis false.- Cluster
Name string The swarm cluster’s name.
- Default
Domain string The application default domain and it can be used to configure routing service.
- Description string
The description of application.
- Environment map[string]interface{}
A key/value map used to replace the variable parameter in the Compose template.
- Latest
Image bool Whether to use latest docker image while each updating application. Default to false.
- Name string
The application name. It should be 1-64 characters long, and can contain numbers, English letters and hyphens, but cannot start with hyphens.
- Services
[]Application
Service List of services in the application. It contains several attributes to
Block Nodes.- Template string
The application deployment template and it must be Docker Compose format.
- Version string
The application deploying version. Each updating, it must be different with current. Default to “1.0”
- blue
Green boolean Wherther to use “Blue Green” method when release a new version. Default to false.
- blue
Green booleanConfirm Whether to confirm a “Blue Green” application. Default to false. It will be ignored when
blue_greenis false.- cluster
Name string The swarm cluster’s name.
- default
Domain string The application default domain and it can be used to configure routing service.
- description string
The description of application.
- environment {[key: string]: any}
A key/value map used to replace the variable parameter in the Compose template.
- latest
Image boolean Whether to use latest docker image while each updating application. Default to false.
- name string
The application name. It should be 1-64 characters long, and can contain numbers, English letters and hyphens, but cannot start with hyphens.
- services
Application
Service[] List of services in the application. It contains several attributes to
Block Nodes.- template string
The application deployment template and it must be Docker Compose format.
- version string
The application deploying version. Each updating, it must be different with current. Default to “1.0”
- blue_
green bool Wherther to use “Blue Green” method when release a new version. Default to false.
- blue_
green_ boolconfirm Whether to confirm a “Blue Green” application. Default to false. It will be ignored when
blue_greenis false.- cluster_
name str The swarm cluster’s name.
- default_
domain str The application default domain and it can be used to configure routing service.
- description str
The description of application.
- environment Dict[str, Any]
A key/value map used to replace the variable parameter in the Compose template.
- latest_
image bool Whether to use latest docker image while each updating application. Default to false.
- name str
The application name. It should be 1-64 characters long, and can contain numbers, English letters and hyphens, but cannot start with hyphens.
- services
List[Application
Service] List of services in the application. It contains several attributes to
Block Nodes.- template str
The application deployment template and it must be Docker Compose format.
- version str
The application deploying version. Each updating, it must be different with current. Default to “1.0”
Supporting Types
ApplicationService
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Id string
ID of the service.
- Name string
The application name. It should be 1-64 characters long, and can contain numbers, English letters and hyphens, but cannot start with hyphens.
- Status string
The current status of service.
- Version string
The application deploying version. Each updating, it must be different with current. Default to “1.0”
- Id string
ID of the service.
- Name string
The application name. It should be 1-64 characters long, and can contain numbers, English letters and hyphens, but cannot start with hyphens.
- Status string
The current status of service.
- Version string
The application deploying version. Each updating, it must be different with current. Default to “1.0”
- id string
ID of the service.
- name string
The application name. It should be 1-64 characters long, and can contain numbers, English letters and hyphens, but cannot start with hyphens.
- status string
The current status of service.
- version string
The application deploying version. Each updating, it must be different with current. Default to “1.0”
- id str
ID of the service.
- name str
The application name. It should be 1-64 characters long, and can contain numbers, English letters and hyphens, but cannot start with hyphens.
- status str
The current status of service.
- version str
The application deploying version. Each updating, it must be different with current. Default to “1.0”
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.