Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion content/templates/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title_tag: 'Pulumi Templates: Deploy Infrastructure to AWS, Azure, & Google Cloud'
title: Pulumi Templates
description: Pulumi templates are starter projects for common cloud architectures on AWS, Azure, and Google Cloud, available in TypeScript, Python, Go, .NET/C#, and YAML.
description: Pulumi templates are starter projects for common cloud architectures on AWS, Azure, and Google Cloud, available in TypeScript, Python, Go, .NET/C#, YAML, and HCL.
meta_desc: Deploy container services, serverless applications, Kubernetes clusters, and more to AWS, Azure, and Google Cloud with Pulumi templates.
---
30 changes: 29 additions & 1 deletion content/templates/container-service/aws/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title_tag: Deploy a Container Service to AWS
title: Container Service on AWS
layout: template
schema_type: howto
meta_desc: Deploy a container service on AWS with Pulumi, Amazon ECS on Fargate, and Amazon ECR in TypeScript, Python, Go, C#, or YAML.
meta_desc: Deploy a container service on AWS with Pulumi, Amazon ECS on Fargate, and Amazon ECR in TypeScript, Python, Go, C#, YAML, or HCL.
meta_image: meta.png
card_desc: Deploy a container service on AWS with Pulumi and Amazon ECS.
template:
Expand All @@ -15,6 +15,7 @@ template:
- go
- csharp
- yaml
- hcl
cloud:
name: Amazon Web Services
slug: aws
Expand Down Expand Up @@ -55,6 +56,8 @@ $ open $(pulumi stack output url)

Projects created with the Container Service template expose the following [configuration](/docs/iac/concepts/config/) settings:

{{% choosable language "typescript,python,go,csharp,yaml" %}}

container_port
: Specifies the port mapping for the container. Defaults to port 80.

Expand All @@ -67,17 +70,42 @@ memory
image
: Specifies the location of the Dockerfile used to build the container image that is run. Defaults to the Dockerfile in the `app` folder.

{{% /choosable %}}

{{% choosable language hcl %}}

container_port
: Specifies the port mapping for the container. Defaults to port 80.

cpu
: Specifies the amount of CPU to use with each task or each container within a task. Defaults to 512.

memory
: Specifies the amount of memory to use with each task or each container within a task. Defaults to 128.

{{% /choosable %}}

All of these settings are optional and may be adjusted either by editing the stack configuration file directly (by default, `Pulumi.dev.yaml`) or by changing their values with [`pulumi config set`](/docs/iac/cli/commands/pulumi_config_set):

### Using your own container image

{{% choosable language "typescript,python,go,csharp,yaml" %}}

If you already have a container image you'd like to build your container service with, you can do so either by replacing the Dockerfile in the `app` folder or by configuring the stack to point to another folder on your computer with the `image` setting:

```bash
$ pulumi config set image ../my-existing-image
$ pulumi up
```

{{% /choosable %}}

{{% choosable language hcl %}}

If you already have a container image you'd like to build your container service with, you can do so by replacing the Dockerfile and application code in the `app` folder, then redeploying with `pulumi up`.

{{% /choosable %}}

## Cleaning up

You can cleanly destroy the stack and all of its infrastructure with [`pulumi destroy`](/docs/iac/cli/commands/pulumi_destroy):
Expand Down
42 changes: 41 additions & 1 deletion content/templates/container-service/azure/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title_tag: Deploy a Container Service to Azure
title: Container Service on Azure
layout: template
schema_type: howto
meta_desc: Deploy a container service on Azure with Pulumi, Azure Container Instances, and Azure Container Registry in TypeScript, Python, Go, or C#.
meta_desc: Deploy a container service on Azure with Pulumi, Azure Container Instances, and Azure Container Registry in TypeScript, Python, Go, C#, or HCL.
meta_image: meta.png
card_desc: Deploy a container service on Azure with Pulumi and Azure Container Instances.
template:
Expand All @@ -14,6 +14,7 @@ template:
- python
- go
- csharp
- hcl
cloud:
name: Microsoft Azure
slug: azure
Expand Down Expand Up @@ -60,6 +61,8 @@ $ open $(pulumi stack output url)

Projects created with the Container Service template expose the following [configuration](/docs/iac/concepts/config/) settings:

{{% choosable language "typescript,python,go,csharp" %}}

appPath
: The path to the folder containing the application and Dockerfile. Defaults to `app`, which contains a "Hello world" example.

Expand All @@ -78,13 +81,50 @@ imageName
imageTag
: The tag applied to published container images. Defaults to `latest`.

{{% /choosable %}}

{{% choosable language hcl %}}

app_path
: The path to the folder containing the application and Dockerfile. Defaults to `./app`, which contains a "Hello world" example.

image_name
: The name of the container image to be published to Azure Container Registry. Defaults to `my-app`.

image_tag
: The tag applied to published container images. Defaults to `latest`.

container_port
: The port to expose on the container. Defaults to `80`.

cpu
: The number of CPU cores to allocate on the container. Defaults to `1`.

memory
: The amount of memory, in GB, to allocate on the container. Defaults to `2`.

{{% /choosable %}}

All of these settings are optional and may be adjusted either by editing the stack configuration file directly (by default, `Pulumi.dev.yaml`) or by changing their values with [`pulumi config set`](/docs/iac/cli/commands/pulumi_config_set):

{{% choosable language "typescript,python,go,csharp" %}}

```bash
$ pulumi config set containerPort 8080
$ pulumi up
```

{{% /choosable %}}

{{% choosable language hcl %}}

```bash
$ pulumi config set container_port 8080
$ pulumi up
```

{{% /choosable %}}

## Cleaning up

You can cleanly destroy the stack and all of its infrastructure with [`pulumi destroy`](/docs/iac/cli/commands/pulumi_destroy):
Expand Down
55 changes: 54 additions & 1 deletion content/templates/container-service/gcp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title_tag: Deploy a Container Service to Google Cloud
title: Container Service on Google Cloud
layout: template
schema_type: howto
meta_desc: Deploy a container service on Google Cloud with Pulumi, Cloud Run, and Artifact Registry in TypeScript, Python, Go, or C#.
meta_desc: Deploy a container service on Google Cloud with Pulumi, Cloud Run, and Artifact Registry in TypeScript, Python, Go, C#, or HCL.
meta_image: meta.png
card_desc: Deploy a container service on Google Cloud with Pulumi and Google Cloud Run.
template:
Expand All @@ -14,6 +14,7 @@ template:
- python
- go
- csharp
- hcl
cloud:
name: Google Cloud
slug: gcp
Expand All @@ -33,8 +34,18 @@ Follow the prompts to complete the new-project wizard. When it's done, you'll ha

## Deploying the project

{{% choosable language "typescript,python,go,csharp" %}}

You must supply an existing Google Cloud project ID and choose a region before deploying the container service. You can input both through the new-project wizard. Once the project is created, you can deploy it with [`pulumi up`](/docs/iac/cli/commands/pulumi_up):

{{% /choosable %}}

{{% choosable language hcl %}}

The template deploys into your active Google Cloud project (read from your gcloud credentials) and defaults to the `us-central1` region, which you can change with the `region` setting. Once the new project is created, you can deploy it with [`pulumi up`](/docs/iac/cli/commands/pulumi_up):

{{% /choosable %}}

```bash
$ pulumi up
```
Expand All @@ -54,6 +65,8 @@ $ open $(pulumi stack output url)

Projects created with the Container Service template expose the following [configuration](/docs/iac/concepts/config/) settings:

{{% choosable language "typescript,python,go,csharp" %}}

containerPort
: The port mapping for the container service. Defaults to port `8080`.

Expand All @@ -72,13 +85,53 @@ imageName
appPath
: The location of the Dockerfile used to build the container image. Defaults to the `app` folder, which contains a "Hello World" example app.

{{% /choosable %}}

{{% choosable language hcl %}}

region
: The Google Cloud region to deploy into. Defaults to `us-central1`.

image_name
: The name of the container image deployed to your Cloud Run service. Defaults to `my-app`.

app_path
: The location of the Dockerfile used to build the container image. Defaults to the `app` folder, which contains a "Hello World" example app.

container_port
: The port mapping for the container service. Defaults to port `8080`.

cpu
: The amount of CPU to allocate to each container instance. Defaults to `1` CPU.

memory
: The amount of memory to allocate to each container instance. Defaults to `1Gi`.

concurrency
: The maximum number of concurrent requests per container instance. Defaults to `80`.

{{% /choosable %}}

All of these settings are optional and may be adjusted either by editing the stack configuration file directly (by default, `Pulumi.dev.yaml`) or by changing their values with [`pulumi config set`](/docs/iac/cli/commands/pulumi_config_set):

{{% choosable language "typescript,python,go,csharp" %}}

```bash
$ pulumi config set containerPort 3000
$ pulumi up
```

{{% /choosable %}}

{{% choosable language hcl %}}

```bash
$ pulumi config set container_port 3000
$ pulumi up
```

{{% /choosable %}}

## Cleaning up

You can cleanly destroy the stack and all of its infrastructure with [`pulumi destroy`](/docs/iac/cli/commands/pulumi_destroy):
Expand Down
27 changes: 26 additions & 1 deletion content/templates/kubernetes-application/helm-chart/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title_tag: Deploy a Helm Chart to a Kubernetes Cluster
title: Helm Chart on Kubernetes
layout: template
schema_type: howto
meta_desc: Deploy a Helm chart to an existing Kubernetes cluster with Pulumi in TypeScript, Python, Go, C#, or YAML.
meta_desc: Deploy a Helm chart to an existing Kubernetes cluster with Pulumi in TypeScript, Python, Go, C#, YAML, or HCL.
meta_image: meta.png
card_desc: Deploy a Helm chart to a Kubernetes cluster with Pulumi.
template:
Expand All @@ -15,6 +15,7 @@ template:
- go
- csharp
- yaml
- hcl
cloud:
name: Helm Chart
slug: helm-chart
Expand Down Expand Up @@ -51,16 +52,40 @@ Output values like these are useful in many ways, most commonly as inputs for ot

Projects created with the Helm Chart template expose the following [configuration](/docs/iac/concepts/config/) settings:

{{% choosable language "typescript,python,go,csharp,yaml" %}}

k8sNamespace
: The name of the namespace to be created in your existing cluster. Defaults to `nginx-ingress`.

{{% /choosable %}}

{{% choosable language hcl %}}

k8s_namespace
: The name of the namespace to be created in your existing cluster. Defaults to `nginx-ingress`.

{{% /choosable %}}

All of these settings are optional and may be adjusted either by editing the stack configuration file directly (by default, `Pulumi.dev.yaml`) or by changing their values with [`pulumi config set`](/docs/iac/cli/commands/pulumi_config_set):

{{% choosable language "typescript,python,go,csharp,yaml" %}}

```bash
$ pulumi config set k8sNamespace my-namespace
$ pulumi up
```

{{% /choosable %}}

{{% choosable language hcl %}}

```bash
$ pulumi config set k8s_namespace my-namespace
$ pulumi up
```

{{% /choosable %}}

You can customize the Helm chart by passing values to it in your Pulumi code. An example of passing a few values to the chart is included in the template for reference.

## Cleaning up
Expand Down
Loading
Loading