Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
3.3 KiB
Markdown
Raw Permalink Normal View History

---
2023-06-02 21:41:36 -07:00
title_tag: "Automation API Concepts & Terminology"
meta_desc: This page contains an overview of core concepts when using Automation API.
title: Concepts
h1: Automation API concepts & terminology
weight: 2
2023-06-08 16:15:52 -07:00
meta_image: /images/docs/meta-images/docs-meta.png
menu:
usingpulumi:
parent: automation-api
aliases:
- /docs/guides/automation-api/concepts-terminology/
---
Automation API lets you define a Pulumi program as a function within your codebase rather than in a separate project and use methods to get and set configuration parameters programmatically.
The package can be used for a number of use cases:
- Driving pulumi deployments within CI/CD workflows
- Integration testing
- Multi-stage deployments such as blue-green deployment patterns
- Deployments involving application code like database migrations
- Building higher level tools, custom CLIs over Pulumi, etc.
- Using Pulumi behind a REST or GRPC API
- Debugging Pulumi programs (by using a single main entrypoint with "inline" programs)
## Workspace
To enable a broad range of runtime customization the API defines a `Workspace` interface. A `Workspace` is the execution context containing a single Pulumi project, a program, and multiple stacks. Workspaces are used to manage the execution environment, providing various utilities such as plugin installation, environment configuration (`$PULUMI_HOME`), and creation, deletion, and listing of Stacks.
### LocalWorkspace
Ced 2022 night before updates (#2169) * Update pull-request.yml (#71) * CED 2022 night before update (#81) * Add some docs for Automation API for Pulumi Deployments (#76) * Remove preview note from Pulumi YAML (#77) * Deployment marketing page (#67) * add preview sign-up page for Pulumi Deploy * add pulumi deployments signup page to navigation * use theme updates for icons * update meta description * Copy edits * add 'learn more' section to the bottom * center the learn list * Update copy in the three scenarios section * Add youtube video, buttons to jump to registration * update graphic * Revert "use theme updates for icons" - related theme PR is merged * Edit messaging about Automation API 10x stat * update learn more section, fix some height mismatches Co-authored-by: George Huang <george@pulumi.com> * Deployment docs (#70) * wip draft of Deployment docs setting up structure for others to collaborate * Increment weights * Update Continuous Delivery docs * Thorough redo until GET deployment * Add banner to Pulumi Service page & add slack * Update list deployments * Pass over logs docs * Config documentation (#2079) * Update go.mod * Update pull-request.yml (#71) * Empty commit to trigger a preview * wip (just pushing changes inbetween meetings throughout the day) * wip draft of Deployment docs setting up structure for others to collaborate * Increment weights * Thorough redo until GET deployment * Update Continuous Delivery docs * Update list deployments * Add banner to Pulumi Service page & add slack * Pass over logs docs * wip (just pushing changes inbetween meetings throughout the day) * Empty commit to trigger a preview * Update themes/default/content/docs/intro/pulumi-service/deployments.md Co-authored-by: susan evans <susan.ra.evans@gmail.com> * Update themes/default/content/docs/guides/continuous-delivery/github-app.md Co-authored-by: susan evans <susan.ra.evans@gmail.com> * Update themes/default/content/docs/guides/continuous-delivery/github-app.md Co-authored-by: susan evans <susan.ra.evans@gmail.com> * Addressing susan's feedback * add numbering to github app installation steps * Add cancel * Indent to fix lint-breaking issue * content updates * empty Signed-off-by: susanev <susan.ra.evans@gmail.com> * potentially final push? Signed-off-by: susanev <susan.ra.evans@gmail.com> Co-authored-by: Komal <komal@pulumi.com> Co-authored-by: George Huang <george@pulumi.com> Co-authored-by: Fraser Waters <fraser@pulumi.com> Co-authored-by: Frassle <Frassle@users.noreply.github.com> Co-authored-by: GH Action - Upstream Sync <action@github.com> Co-authored-by: Christian Nunciato <c@nunciato.org> Co-authored-by: susan evans <susan.ra.evans@gmail.com> * Pricing page update (#73) * Updates to pricing page * fix format Signed-off-by: susanev <susan.ra.evans@gmail.com> * edit Signed-off-by: susanev <susan.ra.evans@gmail.com> Co-authored-by: susanev <susan.ra.evans@gmail.com> * Update security whitepaper date * Updated CED page to remove registration and add 'join now' button (#79) Co-authored-by: Sarah Hughes <sarah@pulumi.com> Signed-off-by: susanev <susan.ra.evans@gmail.com> Co-authored-by: Justin Van Patten <jvp@justinvp.com> Co-authored-by: Ian Wahbe <ian@wahbe.com> Co-authored-by: Sarah Hughes <sarah@pulumi.com> Co-authored-by: George Huang <george@pulumi.com> Co-authored-by: meagancojocar <50200557+meagancojocar@users.noreply.github.com> Co-authored-by: Komal <komal@pulumi.com> Co-authored-by: Fraser Waters <fraser@pulumi.com> Co-authored-by: Frassle <Frassle@users.noreply.github.com> Co-authored-by: GH Action - Upstream Sync <action@github.com> Co-authored-by: Christian Nunciato <c@nunciato.org> Co-authored-by: susan evans <susan.ra.evans@gmail.com> Signed-off-by: susanev <susan.ra.evans@gmail.com> Co-authored-by: GH Action - Upstream Sync <action@github.com> Co-authored-by: Christian Nunciato <c@nunciato.org> Co-authored-by: Justin Van Patten <jvp@justinvp.com> Co-authored-by: Ian Wahbe <ian@wahbe.com> Co-authored-by: Sarah Hughes <sarah@pulumi.com> Co-authored-by: George Huang <george@pulumi.com> Co-authored-by: meagancojocar <50200557+meagancojocar@users.noreply.github.com> Co-authored-by: Komal <komal@pulumi.com> Co-authored-by: Fraser Waters <fraser@pulumi.com> Co-authored-by: Frassle <Frassle@users.noreply.github.com> Co-authored-by: susan evans <susan.ra.evans@gmail.com>
2022-11-01 21:17:17 -07:00
The `LocalWorkspace` class is the default implementation of `Workspace`. This implementation relies on `Pulumi.yaml` and `Pulumi.[stack].yaml` as the intermediate format for Project and Stack settings. Modifying `ProjectSettings` will alter the Workspace `Pulumi.yaml` file, and setting config on a Stack will modify the `Pulumi.[stack].yaml` file. This is identical to the behavior of Pulumi CLI driven workspaces.
### RemoteWorkspace
The `RemoteWorkspace` class represents a workspace for running Pulumi operations remotely via Pulumi Deployments where the program is located in a remote Git repository.
## Stack
The `Stack` class represents an isolated, independently configurable instance of a Pulumi program. `Stack` exposes methods for the full pulumi lifecycle (`up`/`preview`/`refresh`/`destroy`), as well as managing configuration. Multiple Stacks are commonly used to denote different phases of development (such as development, staging and production) or feature branches (such as feature-x-dev, jane-feature-x-dev). You can learn more about stacks in the [intro docs](/docs/concepts/stack/).
Ced 2022 night before updates (#2169) * Update pull-request.yml (#71) * CED 2022 night before update (#81) * Add some docs for Automation API for Pulumi Deployments (#76) * Remove preview note from Pulumi YAML (#77) * Deployment marketing page (#67) * add preview sign-up page for Pulumi Deploy * add pulumi deployments signup page to navigation * use theme updates for icons * update meta description * Copy edits * add 'learn more' section to the bottom * center the learn list * Update copy in the three scenarios section * Add youtube video, buttons to jump to registration * update graphic * Revert "use theme updates for icons" - related theme PR is merged * Edit messaging about Automation API 10x stat * update learn more section, fix some height mismatches Co-authored-by: George Huang <george@pulumi.com> * Deployment docs (#70) * wip draft of Deployment docs setting up structure for others to collaborate * Increment weights * Update Continuous Delivery docs * Thorough redo until GET deployment * Add banner to Pulumi Service page & add slack * Update list deployments * Pass over logs docs * Config documentation (#2079) * Update go.mod * Update pull-request.yml (#71) * Empty commit to trigger a preview * wip (just pushing changes inbetween meetings throughout the day) * wip draft of Deployment docs setting up structure for others to collaborate * Increment weights * Thorough redo until GET deployment * Update Continuous Delivery docs * Update list deployments * Add banner to Pulumi Service page & add slack * Pass over logs docs * wip (just pushing changes inbetween meetings throughout the day) * Empty commit to trigger a preview * Update themes/default/content/docs/intro/pulumi-service/deployments.md Co-authored-by: susan evans <susan.ra.evans@gmail.com> * Update themes/default/content/docs/guides/continuous-delivery/github-app.md Co-authored-by: susan evans <susan.ra.evans@gmail.com> * Update themes/default/content/docs/guides/continuous-delivery/github-app.md Co-authored-by: susan evans <susan.ra.evans@gmail.com> * Addressing susan's feedback * add numbering to github app installation steps * Add cancel * Indent to fix lint-breaking issue * content updates * empty Signed-off-by: susanev <susan.ra.evans@gmail.com> * potentially final push? Signed-off-by: susanev <susan.ra.evans@gmail.com> Co-authored-by: Komal <komal@pulumi.com> Co-authored-by: George Huang <george@pulumi.com> Co-authored-by: Fraser Waters <fraser@pulumi.com> Co-authored-by: Frassle <Frassle@users.noreply.github.com> Co-authored-by: GH Action - Upstream Sync <action@github.com> Co-authored-by: Christian Nunciato <c@nunciato.org> Co-authored-by: susan evans <susan.ra.evans@gmail.com> * Pricing page update (#73) * Updates to pricing page * fix format Signed-off-by: susanev <susan.ra.evans@gmail.com> * edit Signed-off-by: susanev <susan.ra.evans@gmail.com> Co-authored-by: susanev <susan.ra.evans@gmail.com> * Update security whitepaper date * Updated CED page to remove registration and add 'join now' button (#79) Co-authored-by: Sarah Hughes <sarah@pulumi.com> Signed-off-by: susanev <susan.ra.evans@gmail.com> Co-authored-by: Justin Van Patten <jvp@justinvp.com> Co-authored-by: Ian Wahbe <ian@wahbe.com> Co-authored-by: Sarah Hughes <sarah@pulumi.com> Co-authored-by: George Huang <george@pulumi.com> Co-authored-by: meagancojocar <50200557+meagancojocar@users.noreply.github.com> Co-authored-by: Komal <komal@pulumi.com> Co-authored-by: Fraser Waters <fraser@pulumi.com> Co-authored-by: Frassle <Frassle@users.noreply.github.com> Co-authored-by: GH Action - Upstream Sync <action@github.com> Co-authored-by: Christian Nunciato <c@nunciato.org> Co-authored-by: susan evans <susan.ra.evans@gmail.com> Signed-off-by: susanev <susan.ra.evans@gmail.com> Co-authored-by: GH Action - Upstream Sync <action@github.com> Co-authored-by: Christian Nunciato <c@nunciato.org> Co-authored-by: Justin Van Patten <jvp@justinvp.com> Co-authored-by: Ian Wahbe <ian@wahbe.com> Co-authored-by: Sarah Hughes <sarah@pulumi.com> Co-authored-by: George Huang <george@pulumi.com> Co-authored-by: meagancojocar <50200557+meagancojocar@users.noreply.github.com> Co-authored-by: Komal <komal@pulumi.com> Co-authored-by: Fraser Waters <fraser@pulumi.com> Co-authored-by: Frassle <Frassle@users.noreply.github.com> Co-authored-by: susan evans <susan.ra.evans@gmail.com>
2022-11-01 21:17:17 -07:00
## RemoteStack
The `RemoteStack` class represents an isolated, independently configurable instance of a Pulumi program. `RemoteStack` exposes methods for the full pulumi lifecycle (`up`/`preview`/`refresh`/`destroy`) for running these remotely from a remote workspace.
## Local Program
A local program is a traditional Pulumi CLI-driven program with its own directory, a `Pulumi.yaml` file, along with a file that defines the Pulumi program. Automation API can be used to drive these programs, as well as the CLI.
## Inline Program
2022-08-09 12:32:12 -07:00
Unlike traditional Pulumi programs, inline programs don't require a separate package on disk, with its own file and a `Pulumi.yaml`. Inline programs are functions that can be authored in the same file as your Automation API program or be imported from another package.