Pulumi Concepts: Difference between revisions
Line 6: | Line 6: | ||
Infrastructure [[#Resource|resources]] are declared in [[#Program|programs]]. Programs reside in a [[#Project|project]]. The programs are instantiated as [[#Stack|stacks]] in the infrastructure platform. A stack is an isolated and configurable instance of the program. | Infrastructure [[#Resource|resources]] are declared in [[#Program|programs]]. Programs reside in a [[#Project|project]]. The programs are instantiated as [[#Stack|stacks]] in the infrastructure platform. A stack is an isolated and configurable instance of the program. | ||
:[[File:Pulumi_Concepts.png|629px]] | ::::[[File:Pulumi_Concepts.png|629px]] | ||
=Program= | =Program= |
Revision as of 22:09, 7 January 2022
Internal
Overview
Pulumi is an Infrastructure as Code platform that allows using common programming languages, tools, and frameworks, to provision, update, and manage cloud infrastructure resources. Pulumi is one of the tools that can be used to manage generic Infrastructure as Code stacks.
Infrastructure resources are declared in programs. Programs reside in a project. The programs are instantiated as stacks in the infrastructure platform. A stack is an isolated and configurable instance of the program.
Program
A program describes how the cloud infrastructure should be composed. It can be written in Python, TypeScript or Go. Infrastructure is declared by defining resource objects whose properties correspond to the desire state of the infrastructure. It is recommended to group resource with common lifecycles together.
Supported Programming Languages
Organization
Project
Current Project
The current project is the project given by the nearest Pulumi.yaml file.
Resource
Stack
A stack is an isolated, independently configurable instance of a Pulumi program. Stacks are commonly used to denote different phases of development, such as "development", "staging" and "production", or feature branches. A project can have an arbitrary number of stacks. By default, Pulumi creates a new stack per project when pulumi new
is used.
Stack Name
A fully qualified stack name includes the organization and the project name: org-name/project-name/stack-name
.
Active Stack
Stack References
Stack Tags
Stacks have associated metadata as tags. Each tags has a name and a value. A set of built-in tags are automatically assigned and updated each time is updated). Tags are only supported with the Pulumi Service backend.
Stack Output
Stack outputs can be shared with other teams.
Destroying and Deleting a Stack
Destroying a stack means releasing and deleting resources associated with the stack.
Deleting a stack means removing all stack history from the backend and the stack configuration file Pulumi.<stack-name>.yaml
.
⚠️ Forcefully deleting a stack before destroying it may leave orphaned resources behind.
Stack Operations
Inputs and Outputs
See stack outputs.
State and Backends
Backend
Name
URL
Authentication and Identity
The backend decides what a user can and cannot see, for example organizations, based on user's OD group configuration. A user's OD group list, as known by the Pulumi backend, is given by pulumi whoami --verbose
.
Service Backend
Configuration
Template
Secrets
Pulumi.yaml
Built-in Tags
pulumi:project
pulumi:runtime
pulumi:description
gitHub:owner
gitHub:repo
vcs:owner
vcs:repo
vcs:kind
Pulumi vs Terraform
Also see: