published on Tuesday, Feb 17, 2026 by jfrog
published on Tuesday, Feb 17, 2026 by jfrog
Provides a lifecycle resource to manage the lifecycle configuration for a project or globally. The lifecycle defines the ordered stages through which software progresses. See JFrog documentation for more details.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as platform from "@pulumi/platform";
// First, create the lifecycle stages
const dev = new platform.LifecycleStage("dev", {
name: "dev",
category: "promote",
});
const qa = new platform.LifecycleStage("qa", {
name: "qa",
category: "promote",
});
// Global lifecycle
// Note: PROD, PR, and COMMIT are system-managed stages and should not be included in promote_stages
const global = new platform.Lifecycle("global", {promoteStages: [
dev.name,
qa.name,
]});
// Project-level lifecycle
// Note: Project-scoped stages must be prefixed with project_key
const projectDev = new platform.LifecycleStage("project_dev", {
name: "my-project-dev",
projectKey: "my-project",
category: "promote",
});
const projectStaging = new platform.LifecycleStage("project_staging", {
name: "my-project-staging",
projectKey: "my-project",
category: "promote",
});
const project = new platform.Lifecycle("project", {
projectKey: "my-project",
promoteStages: [
projectDev.name,
projectStaging.name,
],
});
import pulumi
import pulumi_platform as platform
# First, create the lifecycle stages
dev = platform.LifecycleStage("dev",
name="dev",
category="promote")
qa = platform.LifecycleStage("qa",
name="qa",
category="promote")
# Global lifecycle
# Note: PROD, PR, and COMMIT are system-managed stages and should not be included in promote_stages
global_ = platform.Lifecycle("global", promote_stages=[
dev.name,
qa.name,
])
# Project-level lifecycle
# Note: Project-scoped stages must be prefixed with project_key
project_dev = platform.LifecycleStage("project_dev",
name="my-project-dev",
project_key="my-project",
category="promote")
project_staging = platform.LifecycleStage("project_staging",
name="my-project-staging",
project_key="my-project",
category="promote")
project = platform.Lifecycle("project",
project_key="my-project",
promote_stages=[
project_dev.name,
project_staging.name,
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/platform/v2/platform"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// First, create the lifecycle stages
dev, err := platform.NewLifecycleStage(ctx, "dev", &platform.LifecycleStageArgs{
Name: pulumi.String("dev"),
Category: pulumi.String("promote"),
})
if err != nil {
return err
}
qa, err := platform.NewLifecycleStage(ctx, "qa", &platform.LifecycleStageArgs{
Name: pulumi.String("qa"),
Category: pulumi.String("promote"),
})
if err != nil {
return err
}
// Global lifecycle
// Note: PROD, PR, and COMMIT are system-managed stages and should not be included in promote_stages
_, err = platform.NewLifecycle(ctx, "global", &platform.LifecycleArgs{
PromoteStages: pulumi.StringArray{
dev.Name,
qa.Name,
},
})
if err != nil {
return err
}
// Project-level lifecycle
// Note: Project-scoped stages must be prefixed with project_key
projectDev, err := platform.NewLifecycleStage(ctx, "project_dev", &platform.LifecycleStageArgs{
Name: pulumi.String("my-project-dev"),
ProjectKey: pulumi.String("my-project"),
Category: pulumi.String("promote"),
})
if err != nil {
return err
}
projectStaging, err := platform.NewLifecycleStage(ctx, "project_staging", &platform.LifecycleStageArgs{
Name: pulumi.String("my-project-staging"),
ProjectKey: pulumi.String("my-project"),
Category: pulumi.String("promote"),
})
if err != nil {
return err
}
_, err = platform.NewLifecycle(ctx, "project", &platform.LifecycleArgs{
ProjectKey: pulumi.String("my-project"),
PromoteStages: pulumi.StringArray{
projectDev.Name,
projectStaging.Name,
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Platform = Pulumi.Platform;
return await Deployment.RunAsync(() =>
{
// First, create the lifecycle stages
var dev = new Platform.LifecycleStage("dev", new()
{
Name = "dev",
Category = "promote",
});
var qa = new Platform.LifecycleStage("qa", new()
{
Name = "qa",
Category = "promote",
});
// Global lifecycle
// Note: PROD, PR, and COMMIT are system-managed stages and should not be included in promote_stages
var @global = new Platform.Lifecycle("global", new()
{
PromoteStages = new[]
{
dev.Name,
qa.Name,
},
});
// Project-level lifecycle
// Note: Project-scoped stages must be prefixed with project_key
var projectDev = new Platform.LifecycleStage("project_dev", new()
{
Name = "my-project-dev",
ProjectKey = "my-project",
Category = "promote",
});
var projectStaging = new Platform.LifecycleStage("project_staging", new()
{
Name = "my-project-staging",
ProjectKey = "my-project",
Category = "promote",
});
var project = new Platform.Lifecycle("project", new()
{
ProjectKey = "my-project",
PromoteStages = new[]
{
projectDev.Name,
projectStaging.Name,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.platform.LifecycleStage;
import com.pulumi.platform.LifecycleStageArgs;
import com.pulumi.platform.Lifecycle;
import com.pulumi.platform.LifecycleArgs;
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) {
// First, create the lifecycle stages
var dev = new LifecycleStage("dev", LifecycleStageArgs.builder()
.name("dev")
.category("promote")
.build());
var qa = new LifecycleStage("qa", LifecycleStageArgs.builder()
.name("qa")
.category("promote")
.build());
// Global lifecycle
// Note: PROD, PR, and COMMIT are system-managed stages and should not be included in promote_stages
var global = new Lifecycle("global", LifecycleArgs.builder()
.promoteStages(
dev.name(),
qa.name())
.build());
// Project-level lifecycle
// Note: Project-scoped stages must be prefixed with project_key
var projectDev = new LifecycleStage("projectDev", LifecycleStageArgs.builder()
.name("my-project-dev")
.projectKey("my-project")
.category("promote")
.build());
var projectStaging = new LifecycleStage("projectStaging", LifecycleStageArgs.builder()
.name("my-project-staging")
.projectKey("my-project")
.category("promote")
.build());
var project = new Lifecycle("project", LifecycleArgs.builder()
.projectKey("my-project")
.promoteStages(
projectDev.name(),
projectStaging.name())
.build());
}
}
resources:
# First, create the lifecycle stages
dev:
type: platform:LifecycleStage
properties:
name: dev
category: promote
qa:
type: platform:LifecycleStage
properties:
name: qa
category: promote
# Global lifecycle
# Note: PROD, PR, and COMMIT are system-managed stages and should not be included in promote_stages
global:
type: platform:Lifecycle
properties:
promoteStages:
- ${dev.name}
- ${qa.name}
# Project-level lifecycle
# Note: Project-scoped stages must be prefixed with project_key
projectDev:
type: platform:LifecycleStage
name: project_dev
properties:
name: my-project-dev
projectKey: my-project
category: promote
projectStaging:
type: platform:LifecycleStage
name: project_staging
properties:
name: my-project-staging
projectKey: my-project
category: promote
project:
type: platform:Lifecycle
properties:
projectKey: my-project
promoteStages:
- ${projectDev.name}
- ${projectStaging.name}
Create Lifecycle Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Lifecycle(name: string, args: LifecycleArgs, opts?: CustomResourceOptions);@overload
def Lifecycle(resource_name: str,
args: LifecycleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Lifecycle(resource_name: str,
opts: Optional[ResourceOptions] = None,
promote_stages: Optional[Sequence[str]] = None,
project_key: Optional[str] = None)func NewLifecycle(ctx *Context, name string, args LifecycleArgs, opts ...ResourceOption) (*Lifecycle, error)public Lifecycle(string name, LifecycleArgs args, CustomResourceOptions? opts = null)
public Lifecycle(String name, LifecycleArgs args)
public Lifecycle(String name, LifecycleArgs args, CustomResourceOptions options)
type: platform:Lifecycle
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 LifecycleArgs
- 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 LifecycleArgs
- 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 LifecycleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LifecycleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LifecycleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var lifecycleResource = new Platform.Lifecycle("lifecycleResource", new()
{
PromoteStages = new[]
{
"string",
},
ProjectKey = "string",
});
example, err := platform.NewLifecycle(ctx, "lifecycleResource", &platform.LifecycleArgs{
PromoteStages: pulumi.StringArray{
pulumi.String("string"),
},
ProjectKey: pulumi.String("string"),
})
var lifecycleResource = new Lifecycle("lifecycleResource", LifecycleArgs.builder()
.promoteStages("string")
.projectKey("string")
.build());
lifecycle_resource = platform.Lifecycle("lifecycleResource",
promote_stages=["string"],
project_key="string")
const lifecycleResource = new platform.Lifecycle("lifecycleResource", {
promoteStages: ["string"],
projectKey: "string",
});
type: platform:Lifecycle
properties:
projectKey: string
promoteStages:
- string
Lifecycle Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Lifecycle resource accepts the following input properties:
- Promote
Stages List<string> - The new, ordered list of stage names that comprise the lifecycle. Global stages, such as PR, COMMIT, and PROD, cannot be modified and should not be included in the request.
- Project
Key string - The project key for which to manage the lifecycle. If not set, manages the global lifecycle.
- Promote
Stages []string - The new, ordered list of stage names that comprise the lifecycle. Global stages, such as PR, COMMIT, and PROD, cannot be modified and should not be included in the request.
- Project
Key string - The project key for which to manage the lifecycle. If not set, manages the global lifecycle.
- promote
Stages List<String> - The new, ordered list of stage names that comprise the lifecycle. Global stages, such as PR, COMMIT, and PROD, cannot be modified and should not be included in the request.
- project
Key String - The project key for which to manage the lifecycle. If not set, manages the global lifecycle.
- promote
Stages string[] - The new, ordered list of stage names that comprise the lifecycle. Global stages, such as PR, COMMIT, and PROD, cannot be modified and should not be included in the request.
- project
Key string - The project key for which to manage the lifecycle. If not set, manages the global lifecycle.
- promote_
stages Sequence[str] - The new, ordered list of stage names that comprise the lifecycle. Global stages, such as PR, COMMIT, and PROD, cannot be modified and should not be included in the request.
- project_
key str - The project key for which to manage the lifecycle. If not set, manages the global lifecycle.
- promote
Stages List<String> - The new, ordered list of stage names that comprise the lifecycle. Global stages, such as PR, COMMIT, and PROD, cannot be modified and should not be included in the request.
- project
Key String - The project key for which to manage the lifecycle. If not set, manages the global lifecycle.
Outputs
All input properties are implicitly available as output properties. Additionally, the Lifecycle resource produces the following output properties:
- Categories
List<Lifecycle
Category> - An ordered list of lifecycle categories and stages.
- Id string
- The provider-assigned unique ID for this managed resource.
- Release
Stage string - Name of the release stage (for example, PROD).
- Categories
[]Lifecycle
Category - An ordered list of lifecycle categories and stages.
- Id string
- The provider-assigned unique ID for this managed resource.
- Release
Stage string - Name of the release stage (for example, PROD).
- categories
List<Lifecycle
Category> - An ordered list of lifecycle categories and stages.
- id String
- The provider-assigned unique ID for this managed resource.
- release
Stage String - Name of the release stage (for example, PROD).
- categories
Lifecycle
Category[] - An ordered list of lifecycle categories and stages.
- id string
- The provider-assigned unique ID for this managed resource.
- release
Stage string - Name of the release stage (for example, PROD).
- categories
Sequence[Lifecycle
Category] - An ordered list of lifecycle categories and stages.
- id str
- The provider-assigned unique ID for this managed resource.
- release_
stage str - Name of the release stage (for example, PROD).
- categories List<Property Map>
- An ordered list of lifecycle categories and stages.
- id String
- The provider-assigned unique ID for this managed resource.
- release
Stage String - Name of the release stage (for example, PROD).
Look up Existing Lifecycle Resource
Get an existing Lifecycle 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?: LifecycleState, opts?: CustomResourceOptions): Lifecycle@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
categories: Optional[Sequence[LifecycleCategoryArgs]] = None,
project_key: Optional[str] = None,
promote_stages: Optional[Sequence[str]] = None,
release_stage: Optional[str] = None) -> Lifecyclefunc GetLifecycle(ctx *Context, name string, id IDInput, state *LifecycleState, opts ...ResourceOption) (*Lifecycle, error)public static Lifecycle Get(string name, Input<string> id, LifecycleState? state, CustomResourceOptions? opts = null)public static Lifecycle get(String name, Output<String> id, LifecycleState state, CustomResourceOptions options)resources: _: type: platform:Lifecycle get: id: ${id}- 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.
- Categories
List<Lifecycle
Category> - An ordered list of lifecycle categories and stages.
- Project
Key string - The project key for which to manage the lifecycle. If not set, manages the global lifecycle.
- Promote
Stages List<string> - The new, ordered list of stage names that comprise the lifecycle. Global stages, such as PR, COMMIT, and PROD, cannot be modified and should not be included in the request.
- Release
Stage string - Name of the release stage (for example, PROD).
- Categories
[]Lifecycle
Category Args - An ordered list of lifecycle categories and stages.
- Project
Key string - The project key for which to manage the lifecycle. If not set, manages the global lifecycle.
- Promote
Stages []string - The new, ordered list of stage names that comprise the lifecycle. Global stages, such as PR, COMMIT, and PROD, cannot be modified and should not be included in the request.
- Release
Stage string - Name of the release stage (for example, PROD).
- categories
List<Lifecycle
Category> - An ordered list of lifecycle categories and stages.
- project
Key String - The project key for which to manage the lifecycle. If not set, manages the global lifecycle.
- promote
Stages List<String> - The new, ordered list of stage names that comprise the lifecycle. Global stages, such as PR, COMMIT, and PROD, cannot be modified and should not be included in the request.
- release
Stage String - Name of the release stage (for example, PROD).
- categories
Lifecycle
Category[] - An ordered list of lifecycle categories and stages.
- project
Key string - The project key for which to manage the lifecycle. If not set, manages the global lifecycle.
- promote
Stages string[] - The new, ordered list of stage names that comprise the lifecycle. Global stages, such as PR, COMMIT, and PROD, cannot be modified and should not be included in the request.
- release
Stage string - Name of the release stage (for example, PROD).
- categories
Sequence[Lifecycle
Category Args] - An ordered list of lifecycle categories and stages.
- project_
key str - The project key for which to manage the lifecycle. If not set, manages the global lifecycle.
- promote_
stages Sequence[str] - The new, ordered list of stage names that comprise the lifecycle. Global stages, such as PR, COMMIT, and PROD, cannot be modified and should not be included in the request.
- release_
stage str - Name of the release stage (for example, PROD).
- categories List<Property Map>
- An ordered list of lifecycle categories and stages.
- project
Key String - The project key for which to manage the lifecycle. If not set, manages the global lifecycle.
- promote
Stages List<String> - The new, ordered list of stage names that comprise the lifecycle. Global stages, such as PR, COMMIT, and PROD, cannot be modified and should not be included in the request.
- release
Stage String - Name of the release stage (for example, PROD).
Supporting Types
LifecycleCategory, LifecycleCategoryArgs
- Category string
- The category name (code or promote).
- Stages
List<Lifecycle
Category Stage> - An ordered list of stages within a particular category.
- Category string
- The category name (code or promote).
- Stages
[]Lifecycle
Category Stage - An ordered list of stages within a particular category.
- category String
- The category name (code or promote).
- stages
List<Lifecycle
Category Stage> - An ordered list of stages within a particular category.
- category string
- The category name (code or promote).
- stages
Lifecycle
Category Stage[] - An ordered list of stages within a particular category.
- category str
- The category name (code or promote).
- stages
Sequence[Lifecycle
Category Stage] - An ordered list of stages within a particular category.
- category String
- The category name (code or promote).
- stages List<Property Map>
- An ordered list of stages within a particular category.
LifecycleCategoryStage, LifecycleCategoryStageArgs
Import
#!/bin/bash
Import a global lifecycle
$ pulumi import platform:index/lifecycle:Lifecycle global ""
Import a project-level lifecycle
$ pulumi import platform:index/lifecycle:Lifecycle project my-project
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- platform jfrog/terraform-provider-platform
- License
- Notes
- This Pulumi package is based on the
platformTerraform Provider.
published on Tuesday, Feb 17, 2026 by jfrog
