# CloudFormation Templates

## Configure CloudFormation in Fylamynt

* Navigate to **Settings** > **Resources** > **CloudFormation**
* Click **Manage Resource** to create and configure a new integration instance
* Click on **Add New**

Details needed to set up **CloudFormation instance** in **Fylamynt**:

| **Parameters** | **Description**                         | **Required** |
| -------------- | --------------------------------------- | ------------ |
| Template Id    | Unique human readable name for resource | True         |
| Repo Id        | Github repo id                          | True         |
| Ref            | Github commit ref, (ie: main/master)    | False        |
| File Path      | Absolute filepath of template file      | True         |

**Note:**

Here Repo Id is a drop down and values populate from the **Git Resources**, please click [here](https://docs.fylamynt.com/resources/github-repos) to learn more about Git resources

Follow the steps listed below to get the desired parameters to enter in **Fylamynt**

* Template Id parameter is the unique human readable name for resource, any string could be provided, Since this is unique identifier 2 resources can not have the same template id
* Login to your **Github Account**
* Open your Repository

![](https://2168485084-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MXYvxfYq9m2JdKqaCdk%2F-MbIdMxQVjwhDElJ12X8%2F-MbIdwL93fOLhcvYbzIA%2Fimage.png?alt=media\&token=bfde6729-1e6d-40d4-b770-558f1408ed07)

* In above picture after username attribute is Repo Id (ie: \<username>/\<repoId>), copy the repo id
* Here parameter Ref is any branch or any commit, (**Note:** If not provided default branch would be used)
* Here File Path parameter is the absolute path of template json file (with respect to root of the Repo), In below image as can be seen the aws\_ec2.json is the template file, hence file path would be **mydir/aws\_ec2.json**

![](https://2168485084-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MXYvxfYq9m2JdKqaCdk%2F-MbIdMxQVjwhDElJ12X8%2F-MbIdzAM7goqHiV7BllM%2Fimage.png?alt=media\&token=86257240-271f-4fdb-873f-dc9cec7b9e74)

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

You can add these actions in Fylamynt workflow builder, as part of your workflow.

1. [CloudFormation Run Template](#cloudformation-run-template)

### CloudFormation Run Template

Integration node to run CloudFormation Run Template

#### **Input**

| **Parameter Name** | **Description**                                   | **Required** |
| ------------------ | ------------------------------------------------- | ------------ |
| Select Alias       | AWS assume role alias                             | True         |
| Select Template    | Template Id of configured cloudformation resource | True         |
| Parameters         | Parameters for your CF template                   | False        |

**Note:** Make parameters dynamic for user, a template JSON file may or may not contain the parameters, but if template file does not contain the parameters then this should be provided at runtime or run would fail

#### **Output**

| **Parameter Name** | **Type** | **Description**                     |
| ------------------ | -------- | ----------------------------------- |
| execution\_status  | String   | Status of run (ie: S\_OK / E\_FAIL) |
| stack\_id          | String   | Newly created ID of stack           |

#### Action Example

![](https://2168485084-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MXYvxfYq9m2JdKqaCdk%2F-MbIdMxQVjwhDElJ12X8%2F-MbIe1fDkWN9LMk0L-wy%2Fimage.png?alt=media\&token=11ccca88-a9e6-4ed3-a21f-d7611c4dc87e)
