# Pulumi

## Overview <a href="#overview" id="overview"></a>

Pulumi is a modern infrastructure as code platform. It leverages existing programming languages—TypeScript, JavaScript, Python, Go, and .NET—and their native ecosystem to interact with cloud resources through the Pulumi SDK.

Users run multiple types of code (e.g. Terraform templates, Ansible playbooks, Python scripts) to automate their tasks. We built this integration, specifically to support the execution of Pulumi Programs.

## Use Cases <a href="#use-cases" id="use-cases"></a>

The integration between Fylamynt and Pulumi lets you:

* Execute **"Pulumi Up"** for the specified project and stack. Create the set of resources specified in the project.
* Execute **"Pulumi Stack Output"** for the specified project and stack. The output is in JSON format and can be pulled from specified **log\_bucket** and **log\_key** for further processing.
* Execute **"Pulumi Destroy"** for the specified project and stack, and removes the provisioned resources.

## Configure Pulumi in Fylamynt

* Navigate to **Settings > Integrations > Pulumi**
* Configure a new integration instance

Details needed to provide **Pulumi** integration with **Fylamynt.** Either **Access Token** or **Backend** (with a **Passphrase** protecting the content) can be specified:

<table data-header-hidden><thead><tr><th>Parameter</th><th width="325.3333333333333">Description</th><th>Required</th></tr></thead><tbody><tr><td><strong>Parameter</strong></td><td><strong>Description</strong></td><td><strong>Required</strong></td></tr><tr><td>Access Token</td><td>Access Token obtained from Pulumi Web console</td><td>If Backend is not specified</td></tr><tr><td>Backend</td><td>An S3 bucket that will store Pulumi config and state. The target account(s) for Pulumi operations should have read/write access to this bucket.</td><td>If Access Token is not specified</td></tr><tr><td>Passphrase</td><td>The passphrase for accessing the Pulumi config.</td><td>If backend is specified</td></tr><tr><td>Organization</td><td>Organization under which Pulumi projects should be run.</td><td>Optional. If specified, all workflows share the organization.</td></tr></tbody></table>

### Creating an Access Token

* Click on the *Settings* tab after logging into the Pulumi web console

![](/files/-MeWmylwsuV1ZbXrM7J_)

* Click on the *Access Tokens* menu item

![](/files/-MeWoM6i5mrzjXDKJzCB)

* Click on *Create token.* Give it a name, and click on *Create token*

![](/files/-MeWoXjUSQW_g-5taWuk)

* Copy the generated *Access Token* into the corresponding entry box in *Pulumi Settings*

![](/files/-MeWojFPCa-B_AbRIqgT)

## Integration Actions <a href="#integration-actions" id="integration-actions"></a>

We only support Pulumi Python projects with an AWS provider. Before using any Pulumi integration action, a project needs to be defined, either in the GitHub Repos resource, or the S3 Buckets resource. All actions are configured in the same way:

1. **pulumi\_up** - runs pulumi up for the specified project and stack. Creates the set of resources specified in the project.
2. **pulumi\_stack\_output** - runs pulumi stack output for the specified project and stack. The output is in JSON format and can be pulled from specified log\_bucket and log\_key for further processing.
3. **pulumi\_destroy** - runs pulumi destroy for the specified project and stack, and removes the provisioned resources.

**Input**

| **Parameter Name** | **Description**                                                                                                          | **Required**                            |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------ | --------------------------------------- |
| alias              | Target account alias for running the Pulumi action. It needs to have access to the Backend S3 bucket                     | True                                    |
| log\_bucket        | An S3 bucket for writing logs from the Pulumi command execution. The target account needs to have access to this bucket. | True                                    |
| stack              | The Pulumi stack used for the action. Pulumi support running the same project against different stacks.                  | True                                    |
| git\_repo          | A GitHub Repos resource with a Pulumi Python project with an AWS provider.                                               | If git repo was picked in Select Input  |
| s3\_bucket         | A S3 Buckets resource with a Pulumi Python project with an AWS provider                                                  | If s3 bucket was picked in Select Input |

**Output**

| **Parameter Name** | **Type** | **Description**                                   |
| ------------------ | -------- | ------------------------------------------------- |
| task\_arn          | string   | The task **ARN** for the asynchronous Pulumi task |
| task\_status       | string   | The task status when the action returns.          |
| log\_bucket        | string   | log\_bucket from the **Input** parameters         |
| log\_key           | string   | name of system created log file                   |

**Action Example**

![](/files/-MaZv7htjUmY9_dJYxWH)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fylamynt.com/integrations/pulumi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
