Skip to content

Add template source docs #15040

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 33 additions & 13 deletions content/docs/pulumi-cloud/deployments/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,25 @@ Using a custom image may result in slower execution due to time spent pulling th

### SourceContext

The source context contains information about where the source code for your project is located. Currently, only git repos are supported as a source.

* **repoURL** (Optional[string]): The URL of the git repository where the source code is located. Must not be specified if a [GitHub block](#github) is present.
* **branch** (Optional[string]): The repository branch to use.
* **repoDir** (Optional[string]): The directory where Pulumi.yaml is located, if not in the project source root.
* **commit** (Optional[string]): The hash of the commit to deploy. If used, HEAD will be in detached mode. This is mutually exclusive with the branch setting. Either value must be specified.
* **gitAuth** (Optional[object]): The authentication information for the git repo. If not specified, the repo is assumed to be public. Only one type is supported at a time.
* **sshAuth** (Optional[object]): SSHAuth is the authentication information for the git repo
* **sshPrivateKey** (Secret): The private key to use
* **password** (Optional[Secret]): The password to use
* **basicAuth** (Optional[object]): Basic auth information
* **userName** (string): The username to use for authentication
* **password** (Secret): The password to use for authentication
The source context contains information about where the source code for your project is located. Currently, git repos and templates are supported as sources.

* **git** (Optional[object]): Git repository information. Must not be specified if a [GitHub block](#github) is present or if a template is specified.
* **repoURL** (Optional[string]): The URL of the git repository where the source code is located.
* **branch** (Optional[string]): The repository branch to use.
* **repoDir** (Optional[string]): The directory where Pulumi.yaml is located, if not in the project source root.
* **commit** (Optional[string]): The hash of the commit to deploy. If used, HEAD will be in detached mode. This is mutually exclusive with the branch setting. Either value must be specified.
* **gitAuth** (Optional[object]): The authentication information for the git repo. If not specified, the repo is assumed to be public. Only one type is supported at a time.
* **sshAuth** (Optional[object]): SSHAuth is the authentication information for the git repo
* **sshPrivateKey** (Secret): The private key to use
* **password** (Optional[Secret]): The password to use
* **basicAuth** (Optional[object]): Basic auth information
* **userName** (string): The username to use for authentication
* **password** (Secret): The password to use for authentication

* **template** (Optional[object]): Template information. Must not be specified if git information is present or if a [GitHub block](#github) is present.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment, the only thing that users can configure for the template mode is:

{
  "sourceType": "no-code"
}

This relies on the ProjectSettings for determining what template to use. In other words, templates are currently configured on the project level. I've cut https://github.com/pulumi/pulumi-service/issues/28437 to expose those same settings in the deployment settings as well as expose ProjectSettings to users (currently those are tightly tied to the NPW/NSW and its console-only APIs).

* **name** (string): The name of the template to use.
* **description** (Optional[string]): A description of the template.
* **config** (Optional[map[string]string]): Configuration values for the template.

Secret types should have the following structure:

Expand Down Expand Up @@ -185,6 +191,20 @@ Secret types should have the following structure:
}
```

##### Using a template

```json
{
"template": {
"name": "aws-typescript",
"description": "AWS TypeScript template",
"config": {
"aws:region": "us-west-2"
}
}
}
```

### OperationContext

The operation context describes any context required for Pulumi operations to execute such as pre-run commands and environment variables.
Expand Down
Loading