octopusdeploy.ProjectVersioningStrategy
Explore with Pulumi AI
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.octopusdeploy.ProjectGroup;
import com.pulumi.octopusdeploy.ProjectGroupArgs;
import com.pulumi.octopusdeploy.Project;
import com.pulumi.octopusdeploy.ProjectArgs;
import com.pulumi.octopusdeploy.DeploymentProcess;
import com.pulumi.octopusdeploy.DeploymentProcessArgs;
import com.pulumi.octopusdeploy.inputs.DeploymentProcessStepArgs;
import com.pulumi.octopusdeploy.ProjectVersioningStrategy;
import com.pulumi.octopusdeploy.ProjectVersioningStrategyArgs;
import com.pulumi.octopusdeploy.inputs.ProjectVersioningStrategyDonorPackageArgs;
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 tpProjectGroup = new ProjectGroup("tpProjectGroup", ProjectGroupArgs.builder()
.description("My DevOps projects group")
.build());
var tpProject = new Project("tpProject", ProjectArgs.builder()
.description("test project")
.lifecycleId("Lifecycles-1")
.projectGroupId(tpProjectGroup.id())
.build(), CustomResourceOptions.builder()
.dependsOn(tpProjectGroup)
.build());
var process = new DeploymentProcess("process", DeploymentProcessArgs.builder()
.projectId(tpProject.id())
.steps(DeploymentProcessStepArgs.builder()
.name("Hello World")
.targetRoles("hello-world")
.startTrigger("StartAfterPrevious")
.packageRequirement("LetOctopusDecide")
.condition("Success")
.runScriptActions(DeploymentProcessStepRunScriptActionArgs.builder()
.name("Hello World")
.isDisabled(false)
.isRequired(true)
.scriptBody("Write-Host 'hello world'")
.scriptSyntax("PowerShell")
.canBeUsedForProjectVersioning(true)
.sortOrder(1)
.packages(DeploymentProcessStepRunScriptActionPackageArgs.builder()
.name("Package")
.feedId("feeds-builtin")
.packageId("myExpressApp")
.acquisitionLocation("Server")
.extractDuringDeployment(true)
.build())
.build())
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(tpProject)
.build());
//#####
// NOTE: You can use either template or donor_package, not both
//#####
var usingTemplate = new ProjectVersioningStrategy("usingTemplate", ProjectVersioningStrategyArgs.builder()
.projectId(tpProject.id())
.spaceId(tpProject.spaceId())
.template("#{Octopus.Version.LastMajor}.#{Octopus.Version.NextMinor}-alpha")
.build(), CustomResourceOptions.builder()
.dependsOn(
tpProjectGroup,
process)
.build());
var usingDonorPackage = new ProjectVersioningStrategy("usingDonorPackage", ProjectVersioningStrategyArgs.builder()
.projectId(tpProject.id())
.spaceId(tpProject.spaceId())
.donorPackageStepId(process.steps().applyValue(steps -> steps[0].runScriptActions()[0].id()))
.donorPackage(ProjectVersioningStrategyDonorPackageArgs.builder()
.deployment_action("Hello World")
.package_reference("Package")
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(
tpProjectGroup,
process)
.build());
}
}
resources:
tpProjectGroup:
type: octopusdeploy:ProjectGroup
properties:
description: My DevOps projects group
tpProject:
type: octopusdeploy:Project
properties:
description: test project
lifecycleId: Lifecycles-1
projectGroupId: ${tpProjectGroup.id}
options:
dependsOn:
- ${tpProjectGroup}
process:
type: octopusdeploy:DeploymentProcess
properties:
projectId: ${tpProject.id}
steps:
- name: Hello World
targetRoles:
- hello-world
startTrigger: StartAfterPrevious
packageRequirement: LetOctopusDecide
condition: Success
runScriptActions:
- name: Hello World
isDisabled: false
isRequired: true
scriptBody: Write-Host 'hello world'
scriptSyntax: PowerShell
canBeUsedForProjectVersioning: true
sortOrder: 1
packages:
- name: Package
feedId: feeds-builtin
packageId: myExpressApp
acquisitionLocation: Server
extractDuringDeployment: true
options:
dependsOn:
- ${tpProject}
######
# NOTE: You can use either template or donor_package, not both
######
usingTemplate:
type: octopusdeploy:ProjectVersioningStrategy
properties:
projectId: ${tpProject.id}
spaceId: ${tpProject.spaceId}
# See https://octopus.com/docs/releases/release-versioning for variable syntax
template: '#{Octopus.Version.LastMajor}.#{Octopus.Version.NextMinor}-alpha'
options:
dependsOn:
- ${tpProjectGroup}
- ${process}
usingDonorPackage:
type: octopusdeploy:ProjectVersioningStrategy
properties:
projectId: ${tpProject.id}
spaceId: ${tpProject.spaceId}
donorPackageStepId: ${process.steps[0].runScriptActions[0].id}
donorPackage:
deployment_action: Hello World
package_reference: Package
options:
dependsOn:
- ${tpProjectGroup}
- ${process}
Create ProjectVersioningStrategy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ProjectVersioningStrategy(name: string, args: ProjectVersioningStrategyArgs, opts?: CustomResourceOptions);
@overload
def ProjectVersioningStrategy(resource_name: str,
args: ProjectVersioningStrategyInitArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ProjectVersioningStrategy(resource_name: str,
opts: Optional[ResourceOptions] = None,
project_id: Optional[str] = None,
donor_package: Optional[ProjectVersioningStrategyDonorPackageArgs] = None,
donor_package_step_id: Optional[str] = None,
space_id: Optional[str] = None,
template: Optional[str] = None)
func NewProjectVersioningStrategy(ctx *Context, name string, args ProjectVersioningStrategyArgs, opts ...ResourceOption) (*ProjectVersioningStrategy, error)
public ProjectVersioningStrategy(string name, ProjectVersioningStrategyArgs args, CustomResourceOptions? opts = null)
public ProjectVersioningStrategy(String name, ProjectVersioningStrategyArgs args)
public ProjectVersioningStrategy(String name, ProjectVersioningStrategyArgs args, CustomResourceOptions options)
type: octopusdeploy:ProjectVersioningStrategy
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 ProjectVersioningStrategyArgs
- 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 ProjectVersioningStrategyInitArgs
- 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 ProjectVersioningStrategyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectVersioningStrategyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProjectVersioningStrategyArgs
- 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 projectVersioningStrategyResource = new Octopusdeploy.ProjectVersioningStrategy("projectVersioningStrategyResource", new()
{
ProjectId = "string",
DonorPackage = new Octopusdeploy.Inputs.ProjectVersioningStrategyDonorPackageArgs
{
DeploymentAction = "string",
PackageReference = "string",
},
DonorPackageStepId = "string",
SpaceId = "string",
Template = "string",
});
example, err := octopusdeploy.NewProjectVersioningStrategy(ctx, "projectVersioningStrategyResource", &octopusdeploy.ProjectVersioningStrategyArgs{
ProjectId: pulumi.String("string"),
DonorPackage: &octopusdeploy.ProjectVersioningStrategyDonorPackageArgs{
DeploymentAction: pulumi.String("string"),
PackageReference: pulumi.String("string"),
},
DonorPackageStepId: pulumi.String("string"),
SpaceId: pulumi.String("string"),
Template: pulumi.String("string"),
})
var projectVersioningStrategyResource = new ProjectVersioningStrategy("projectVersioningStrategyResource", ProjectVersioningStrategyArgs.builder()
.projectId("string")
.donorPackage(ProjectVersioningStrategyDonorPackageArgs.builder()
.deploymentAction("string")
.packageReference("string")
.build())
.donorPackageStepId("string")
.spaceId("string")
.template("string")
.build());
project_versioning_strategy_resource = octopusdeploy.ProjectVersioningStrategy("projectVersioningStrategyResource",
project_id="string",
donor_package={
"deployment_action": "string",
"package_reference": "string",
},
donor_package_step_id="string",
space_id="string",
template="string")
const projectVersioningStrategyResource = new octopusdeploy.ProjectVersioningStrategy("projectVersioningStrategyResource", {
projectId: "string",
donorPackage: {
deploymentAction: "string",
packageReference: "string",
},
donorPackageStepId: "string",
spaceId: "string",
template: "string",
});
type: octopusdeploy:ProjectVersioningStrategy
properties:
donorPackage:
deploymentAction: string
packageReference: string
donorPackageStepId: string
projectId: string
spaceId: string
template: string
ProjectVersioningStrategy 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 ProjectVersioningStrategy resource accepts the following input properties:
- Project
Id string - The associated project ID.
- Donor
Package ProjectVersioning Strategy Donor Package - Donor Packages.
- Donor
Package stringStep Id - The associated donor package step ID.
- Space
Id string - Space ID of the associated project.
- Template string
- Project
Id string - The associated project ID.
- Donor
Package ProjectVersioning Strategy Donor Package Args - Donor Packages.
- Donor
Package stringStep Id - The associated donor package step ID.
- Space
Id string - Space ID of the associated project.
- Template string
- project
Id String - The associated project ID.
- donor
Package ProjectVersioning Strategy Donor Package - Donor Packages.
- donor
Package StringStep Id - The associated donor package step ID.
- space
Id String - Space ID of the associated project.
- template String
- project
Id string - The associated project ID.
- donor
Package ProjectVersioning Strategy Donor Package - Donor Packages.
- donor
Package stringStep Id - The associated donor package step ID.
- space
Id string - Space ID of the associated project.
- template string
- project_
id str - The associated project ID.
- donor_
package ProjectVersioning Strategy Donor Package Args - Donor Packages.
- donor_
package_ strstep_ id - The associated donor package step ID.
- space_
id str - Space ID of the associated project.
- template str
- project
Id String - The associated project ID.
- donor
Package Property Map - Donor Packages.
- donor
Package StringStep Id - The associated donor package step ID.
- space
Id String - Space ID of the associated project.
- template String
Outputs
All input properties are implicitly available as output properties. Additionally, the ProjectVersioningStrategy 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 ProjectVersioningStrategy Resource
Get an existing ProjectVersioningStrategy 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?: ProjectVersioningStrategyState, opts?: CustomResourceOptions): ProjectVersioningStrategy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
donor_package: Optional[ProjectVersioningStrategyDonorPackageArgs] = None,
donor_package_step_id: Optional[str] = None,
project_id: Optional[str] = None,
space_id: Optional[str] = None,
template: Optional[str] = None) -> ProjectVersioningStrategy
func GetProjectVersioningStrategy(ctx *Context, name string, id IDInput, state *ProjectVersioningStrategyState, opts ...ResourceOption) (*ProjectVersioningStrategy, error)
public static ProjectVersioningStrategy Get(string name, Input<string> id, ProjectVersioningStrategyState? state, CustomResourceOptions? opts = null)
public static ProjectVersioningStrategy get(String name, Output<String> id, ProjectVersioningStrategyState state, CustomResourceOptions options)
resources: _: type: octopusdeploy:ProjectVersioningStrategy 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.
- Donor
Package ProjectVersioning Strategy Donor Package - Donor Packages.
- Donor
Package stringStep Id - The associated donor package step ID.
- Project
Id string - The associated project ID.
- Space
Id string - Space ID of the associated project.
- Template string
- Donor
Package ProjectVersioning Strategy Donor Package Args - Donor Packages.
- Donor
Package stringStep Id - The associated donor package step ID.
- Project
Id string - The associated project ID.
- Space
Id string - Space ID of the associated project.
- Template string
- donor
Package ProjectVersioning Strategy Donor Package - Donor Packages.
- donor
Package StringStep Id - The associated donor package step ID.
- project
Id String - The associated project ID.
- space
Id String - Space ID of the associated project.
- template String
- donor
Package ProjectVersioning Strategy Donor Package - Donor Packages.
- donor
Package stringStep Id - The associated donor package step ID.
- project
Id string - The associated project ID.
- space
Id string - Space ID of the associated project.
- template string
- donor_
package ProjectVersioning Strategy Donor Package Args - Donor Packages.
- donor_
package_ strstep_ id - The associated donor package step ID.
- project_
id str - The associated project ID.
- space_
id str - Space ID of the associated project.
- template str
- donor
Package Property Map - Donor Packages.
- donor
Package StringStep Id - The associated donor package step ID.
- project
Id String - The associated project ID.
- space
Id String - Space ID of the associated project.
- template String
Supporting Types
ProjectVersioningStrategyDonorPackage, ProjectVersioningStrategyDonorPackageArgs
- Deployment
Action string - Deployment action.
- Package
Reference string - Package reference.
- Deployment
Action string - Deployment action.
- Package
Reference string - Package reference.
- deployment
Action String - Deployment action.
- package
Reference String - Package reference.
- deployment
Action string - Deployment action.
- package
Reference string - Package reference.
- deployment_
action str - Deployment action.
- package_
reference str - Package reference.
- deployment
Action String - Deployment action.
- package
Reference String - Package reference.
Package Details
- Repository
- octopusdeploy octopusdeploylabs/terraform-provider-octopusdeploy
- License
- Notes
- This Pulumi package is based on the
octopusdeploy
Terraform Provider.