1. Packages
  2. Qovery
  3. API Docs
  4. Deployment
Qovery v0.28.8 published on Sunday, Mar 3, 2024 by dirien

qovery.Deployment

Explore with Pulumi AI

qovery logo
Qovery v0.28.8 published on Sunday, Mar 3, 2024 by dirien

    # qovery.Deployment (Resource)

    Provides a Qovery deployment resource. This is used to trigger a service deployment at demand.

    Example

    import * as pulumi from "@pulumi/pulumi";
    import * as qovery from "@ediri/qovery";
    
    const myDeployment = new qovery.Deployment("myDeployment", {
        environmentId: qovery_environment.my_environment.id,
        desiredState: "RUNNING",
        version: "random_uuid_to_force_retrigger_terraform_apply",
    }, {
        dependsOn: [
            qovery_application.my_application,
            qovery_database.my_database,
            qovery_container.my_container,
        ],
    });
    
    import pulumi
    import ediri_qovery as qovery
    
    my_deployment = qovery.Deployment("myDeployment",
        environment_id=qovery_environment["my_environment"]["id"],
        desired_state="RUNNING",
        version="random_uuid_to_force_retrigger_terraform_apply",
        opts=pulumi.ResourceOptions(depends_on=[
                qovery_application["my_application"],
                qovery_database["my_database"],
                qovery_container["my_container"],
            ]))
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Qovery = ediri.Qovery;
    
    return await Deployment.RunAsync(() => 
    {
        var myDeployment = new Qovery.Deployment("myDeployment", new()
        {
            EnvironmentId = qovery_environment.My_environment.Id,
            DesiredState = "RUNNING",
            Version = "random_uuid_to_force_retrigger_terraform_apply",
        }, new CustomResourceOptions
        {
            DependsOn = new[]
            {
                qovery_application.My_application,
                qovery_database.My_database,
                qovery_container.My_container,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/dirien/pulumi-qovery/sdk/go/qovery"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := qovery.NewDeployment(ctx, "myDeployment", &qovery.DeploymentArgs{
    			EnvironmentId: pulumi.Any(qovery_environment.My_environment.Id),
    			DesiredState:  pulumi.String("RUNNING"),
    			Version:       pulumi.String("random_uuid_to_force_retrigger_terraform_apply"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			qovery_application.My_application,
    			qovery_database.My_database,
    			qovery_container.My_container,
    		}))
    		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.qovery.Deployment;
    import com.pulumi.qovery.DeploymentArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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 myDeployment = new Deployment("myDeployment", DeploymentArgs.builder()        
                .environmentId(qovery_environment.my_environment().id())
                .desiredState("RUNNING")
                .version("random_uuid_to_force_retrigger_terraform_apply")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(                
                        qovery_application.my_application(),
                        qovery_database.my_database(),
                        qovery_container.my_container())
                    .build());
    
        }
    }
    
    resources:
      myDeployment:
        type: qovery:Deployment
        properties:
          # Required
          environmentId: ${qovery_environment.my_environment.id}
          desiredState: RUNNING
          version: random_uuid_to_force_retrigger_terraform_apply
        options:
          dependson:
            - ${qovery_application.my_application}
            - ${qovery_database.my_database}
            - ${qovery_container.my_container}
    

    Create Deployment Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Deployment(name: string, args: DeploymentArgs, opts?: CustomResourceOptions);
    @overload
    def Deployment(resource_name: str,
                   args: DeploymentArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def Deployment(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   desired_state: Optional[str] = None,
                   environment_id: Optional[str] = None,
                   version: Optional[str] = None)
    func NewDeployment(ctx *Context, name string, args DeploymentArgs, opts ...ResourceOption) (*Deployment, error)
    public Deployment(string name, DeploymentArgs args, CustomResourceOptions? opts = null)
    public Deployment(String name, DeploymentArgs args)
    public Deployment(String name, DeploymentArgs args, CustomResourceOptions options)
    
    type: qovery:Deployment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DeploymentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DeploymentArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DeploymentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DeploymentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DeploymentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var deploymentResource = new Qovery.Deployment("deploymentResource", new()
    {
        DesiredState = "string",
        EnvironmentId = "string",
        Version = "string",
    });
    
    example, err := qovery.NewDeployment(ctx, "deploymentResource", &qovery.DeploymentArgs{
    	DesiredState:  pulumi.String("string"),
    	EnvironmentId: pulumi.String("string"),
    	Version:       pulumi.String("string"),
    })
    
    var deploymentResource = new Deployment("deploymentResource", DeploymentArgs.builder()        
        .desiredState("string")
        .environmentId("string")
        .version("string")
        .build());
    
    deployment_resource = qovery.Deployment("deploymentResource",
        desired_state="string",
        environment_id="string",
        version="string")
    
    const deploymentResource = new qovery.Deployment("deploymentResource", {
        desiredState: "string",
        environmentId: "string",
        version: "string",
    });
    
    type: qovery:Deployment
    properties:
        desiredState: string
        environmentId: string
        version: string
    

    Deployment Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Deployment resource accepts the following input properties:

    DesiredState string
    Desired state of the deployment. - Can be: RESTARTED, RUNNING, STOPPED.
    EnvironmentId string
    Id of the environment.
    Version string
    Version to force trigger a deployment when desired_state doesn't change (e.g redeploy a deployment having the 'RUNNING' state)
    DesiredState string
    Desired state of the deployment. - Can be: RESTARTED, RUNNING, STOPPED.
    EnvironmentId string
    Id of the environment.
    Version string
    Version to force trigger a deployment when desired_state doesn't change (e.g redeploy a deployment having the 'RUNNING' state)
    desiredState String
    Desired state of the deployment. - Can be: RESTARTED, RUNNING, STOPPED.
    environmentId String
    Id of the environment.
    version String
    Version to force trigger a deployment when desired_state doesn't change (e.g redeploy a deployment having the 'RUNNING' state)
    desiredState string
    Desired state of the deployment. - Can be: RESTARTED, RUNNING, STOPPED.
    environmentId string
    Id of the environment.
    version string
    Version to force trigger a deployment when desired_state doesn't change (e.g redeploy a deployment having the 'RUNNING' state)
    desired_state str
    Desired state of the deployment. - Can be: RESTARTED, RUNNING, STOPPED.
    environment_id str
    Id of the environment.
    version str
    Version to force trigger a deployment when desired_state doesn't change (e.g redeploy a deployment having the 'RUNNING' state)
    desiredState String
    Desired state of the deployment. - Can be: RESTARTED, RUNNING, STOPPED.
    environmentId String
    Id of the environment.
    version String
    Version to force trigger a deployment when desired_state doesn't change (e.g redeploy a deployment having the 'RUNNING' state)

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Deployment resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Deployment Resource

    Get an existing Deployment 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?: DeploymentState, opts?: CustomResourceOptions): Deployment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            desired_state: Optional[str] = None,
            environment_id: Optional[str] = None,
            version: Optional[str] = None) -> Deployment
    func GetDeployment(ctx *Context, name string, id IDInput, state *DeploymentState, opts ...ResourceOption) (*Deployment, error)
    public static Deployment Get(string name, Input<string> id, DeploymentState? state, CustomResourceOptions? opts = null)
    public static Deployment get(String name, Output<String> id, DeploymentState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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:
    DesiredState string
    Desired state of the deployment. - Can be: RESTARTED, RUNNING, STOPPED.
    EnvironmentId string
    Id of the environment.
    Version string
    Version to force trigger a deployment when desired_state doesn't change (e.g redeploy a deployment having the 'RUNNING' state)
    DesiredState string
    Desired state of the deployment. - Can be: RESTARTED, RUNNING, STOPPED.
    EnvironmentId string
    Id of the environment.
    Version string
    Version to force trigger a deployment when desired_state doesn't change (e.g redeploy a deployment having the 'RUNNING' state)
    desiredState String
    Desired state of the deployment. - Can be: RESTARTED, RUNNING, STOPPED.
    environmentId String
    Id of the environment.
    version String
    Version to force trigger a deployment when desired_state doesn't change (e.g redeploy a deployment having the 'RUNNING' state)
    desiredState string
    Desired state of the deployment. - Can be: RESTARTED, RUNNING, STOPPED.
    environmentId string
    Id of the environment.
    version string
    Version to force trigger a deployment when desired_state doesn't change (e.g redeploy a deployment having the 'RUNNING' state)
    desired_state str
    Desired state of the deployment. - Can be: RESTARTED, RUNNING, STOPPED.
    environment_id str
    Id of the environment.
    version str
    Version to force trigger a deployment when desired_state doesn't change (e.g redeploy a deployment having the 'RUNNING' state)
    desiredState String
    Desired state of the deployment. - Can be: RESTARTED, RUNNING, STOPPED.
    environmentId String
    Id of the environment.
    version String
    Version to force trigger a deployment when desired_state doesn't change (e.g redeploy a deployment having the 'RUNNING' state)

    Package Details

    Repository
    qovery dirien/pulumi-qovery
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the qovery Terraform Provider.
    qovery logo
    Qovery v0.28.8 published on Sunday, Mar 3, 2024 by dirien