Pulumi.yaml: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(8 intermediate revisions by the same user not shown)
Line 9: Line 9:
<font size=-1>
<font size=-1>
  [[#name|name]]: datadog-example
  [[#name|name]]: datadog-example
  runtime:
  [[#runtime|runtime]]:
   name: python
   name: python
   options:
   options:
     virtualenv: venv
     [[#virtualenv|virtualenv]]: venv
  description: An experimental Datadog Pulumi project.
  description: An experimental Datadog Pulumi project.
  [[#template|template]]:
  [[#template|template]]:
Line 26: Line 26:


<font color=darkkhaki>
<font color=darkkhaki>
What does this mean:
What does this mean, seems to be related to <code>[[Pulumi_Operations#new|pulumi new]]</code>:
<font size=-1>
<font size=-1>
  name: ${PROJECT}
  name: ${PROJECT}
Line 36: Line 36:
Required attribute that specifies the [[Pulumi_Concepts#Project_Name|project name]].
Required attribute that specifies the [[Pulumi_Concepts#Project_Name|project name]].
==<tt>runtime</tt>==
==<tt>runtime</tt>==
A required map that specifies the language runtime configuration to use for the program. Possible values for <code>name</code>: "python", "nodjs", "go" and "dotnet". Pulumi doesn’t depend on specific versions of these runtimes, and will simply use whatever version you have installed on your machine.
===Python Options===
====<tt>virtualenv</tt>====
A string that specifies the path to a virtual environment, relative to the project directory, to use when running the program. New Python projects created with <code>[[Pulumi_Operations#new|pulumi new]]</code> have this option set by default. If not specified, Pulumi will invoke <code>python3</code> command it finds in <code>PATH</code>, falling back to <code>python</code>. To use a virtual environment without the <code>virtualenv</code> option, run any <code>pulumi</code> commands from an activated virtual environment shell, or if using a tool like [[Pipenv]], prefix any <code>pulumi</code> commands with <code>pipenv run pulumi</code>.
Also see: {{Internal|Python_Pulumi#Manually_Initialize_Pulumi_Python_Virtual_Environment|Manually Initialize Pulumi Python Virtual Environment}}
==<tt>description</tt>==
==<tt>description</tt>==
==<tt>template</tt>==
==<tt>template</tt>==
This section of the configuration file is relevant when a new project is initialized with <code>[[Pulumi_Operations#new|pulumi new]]</code>. The initialization code processes the the configuration key listed under <code>template.config</code> and queries for values, interactively. Each configuration key can get a <code>description</code> which will be displayed during the configuration process, a <code>default</code> value and whether it is security sensitive or not, by setting <code>secret</code> to <code>true</code>.
This section of the configuration file is relevant when a new project is initialized with <code>[[Pulumi_Operations#new|pulumi new]]</code>. The initialization code processes the the configuration key listed under <code>template.config</code> and queries for values, interactively. Each configuration key can get a <code>description</code> which will be displayed during the configuration process, a <code>default</code> value and whether it is security sensitive or not, by setting <code>secret</code> to <code>true</code>.

Latest revision as of 23:37, 19 January 2022

External

Internal

Overview

Pulumi.yaml contains the project definition. The name must begin with a capital "P", and both "yaml" and "yaml" extensions are valid.

Example

name: datadog-example
runtime:
  name: python
  options:
    virtualenv: venv
description: An experimental Datadog Pulumi project.
template:
  description: Minimal structure for a Datadog automation infrastructure project.
    config:
      datadog:apiKey:
        description:
        secret: true
      datadog:appKey:
        description:
        secret: true

What does this mean, seems to be related to pulumi new:

name: ${PROJECT}
description: ${DESCRIPTION}

Elements

name

Required attribute that specifies the project name.

runtime

A required map that specifies the language runtime configuration to use for the program. Possible values for name: "python", "nodjs", "go" and "dotnet". Pulumi doesn’t depend on specific versions of these runtimes, and will simply use whatever version you have installed on your machine.

Python Options

virtualenv

A string that specifies the path to a virtual environment, relative to the project directory, to use when running the program. New Python projects created with pulumi new have this option set by default. If not specified, Pulumi will invoke python3 command it finds in PATH, falling back to python. To use a virtual environment without the virtualenv option, run any pulumi commands from an activated virtual environment shell, or if using a tool like Pipenv, prefix any pulumi commands with pipenv run pulumi.

Also see:

Manually Initialize Pulumi Python Virtual Environment

description

template

This section of the configuration file is relevant when a new project is initialized with pulumi new. The initialization code processes the the configuration key listed under template.config and queries for values, interactively. Each configuration key can get a description which will be displayed during the configuration process, a default value and whether it is security sensitive or not, by setting secret to true.