Skip to content

Commit 39fdb51

Browse files
committed
revamp cfn docs
1 parent a5eba1f commit 39fdb51

File tree

1 file changed

+33
-29
lines changed

1 file changed

+33
-29
lines changed

src/content/docs/aws/services/cloudformation.md renamed to src/content/docs/aws/services/cloudformation.mdx

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
22
title: "CloudFormation"
3-
linkTitle: "CloudFormation"
43
description: Get started with Cloudformation on LocalStack
54
persistence: supported with limitations
65
tags: ["Free"]
76
---
87

8+
import { Tabs, TabItem } from '@astrojs/starlight/components';
9+
910
## Introduction
1011

1112
CloudFormation is a service provided by Amazon Web Services (AWS) that allows you to define and provision infrastructure as code.
@@ -14,7 +15,7 @@ With CloudFormation, you can use JSON or YAML templates to define your desired i
1415
You can specify resources, their configurations, dependencies, and relationships in these templates.
1516

1617
LocalStack supports CloudFormation, allowing you to use the CloudFormation APIs in your local environment to declaratively define your architecture on the AWS, including resources such as S3 Buckets, Lambda Functions, and much more.
17-
The [API coverage page]({{< ref "coverage_cloudformation" >}}) and [feature coverage](#feature-coverage) provides information on the extent of CloudFormation's integration with LocalStack.
18+
The [API coverage page]() and [feature coverage](#feature-coverage) provides information on the extent of CloudFormation's integration with LocalStack.
1819

1920
## Getting started
2021

@@ -29,15 +30,18 @@ CloudFormation stack is a collection of AWS resources that you can create, updat
2930
Stacks are defined using JSON or YAML templates.
3031
Use the following code snippet and save the content in either `cfn-quickstart-stack.yaml` or `cfn-quickstart-stack.json`, depending on your preferred format.
3132

32-
{{< tabpane >}}
33-
{{< tab header="YAML" lang="yaml" >}}
33+
<Tabs>
34+
<TabItem label="YAML">
35+
```yaml
3436
Resources:
3537
LocalBucket:
3638
Type: AWS::S3::Bucket
3739
Properties:
3840
BucketName: cfn-quickstart-bucket
39-
{{< /tab >}}
40-
{{< tab header="JSON" lang="json" >}}
41+
```
42+
</TabItem>
43+
<TabItem label="JSON">
44+
```json
4145
{
4246
"Resources": {
4347
"LocalBucket": {
@@ -48,45 +52,45 @@ Resources:
4852
}
4953
}
5054
}
51-
{{< /tab >}}
52-
{{< /tabpane >}}
55+
```
56+
</TabItem>
57+
</Tabs>
5358

5459
### Deploy the CloudFormation Stack
5560

5661
You can deploy the CloudFormation stack using the AWS CLI with the [`deploy`](https://docs.aws.amazon.com/cli/latest/reference/cloudformation/deploy/index.html) command.
5762
The `deploy` command creates and updates CloudFormation stacks.
5863
Run the following command to deploy the stack:
5964

60-
{{< command >}}
61-
$ awslocal cloudformation deploy \
65+
```bash
66+
awslocal cloudformation deploy \
6267
--stack-name cfn-quickstart-stack \
6368
--template-file "./cfn-quickstart-stack.yaml"
64-
{{< / command >}}
69+
```
6570

6671
You can verify that the stack was created successfully by listing the S3 buckets in your LocalStack container using the [`ListBucket` API](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-buckets.html).
6772
Run the following command to list the buckets:
6873

69-
{{< command >}}
70-
$ awslocal s3api list-buckets
71-
{{< / command >}}
74+
```bash
75+
awslocal s3api list-buckets
76+
```
7277

7378
### Delete the CloudFormation Stack
7479

7580
You can delete the CloudFormation stack using the [`delete-stack`](https://docs.aws.amazon.com/cli/latest/reference/cloudformation/delete-stack.html) command.
7681
Run the following command to delete the stack along with all the resources created by the stack:
7782

78-
{{< command >}}
79-
$ awslocal cloudformation delete-stack \
83+
```bash
84+
awslocal cloudformation delete-stack \
8085
--stack-name cfn-quickstart-stack
81-
{{< / command >}}
86+
```
8287

8388
## Local User-Interface
8489

8590
You can also utilize LocalStack's local CloudFormation user-interface to deploy and manage your CloudFormation stacks using public templates.
8691
You can access the user-interface at [`localhost:4566/_localstack/cloudformation/deploy`](http://localhost:4566/_localstack/cloudformation/deploy).
8792

88-
<img src="localstack-cloudformation-local-user-interface.png" alt="Local CloudFormation UI in LocalStack" title="Local CloudFormation UI in LocalStack" width="900" />
89-
<br><br>
93+
![Local CloudFormation UI in LocalStack](/images/aws/localstack-cloudformation-local-user-interface.png)
9094

9195
You can utilize the CloudFormation user interface to provide an existing CloudFormation template URL, input the necessary parameters, and initiate the deployment directly from your browser.
9296
Let's proceed with an example template to deploy a CloudFormation stack.
@@ -101,7 +105,7 @@ Upon submission, the stack deployment will be triggered, and a result message wi
101105
The LocalStack Web Application provides a Resource Browser for managing CloudFormation stacks to manage your AWS resources locally.
102106
You can access the Resource Browser by opening the LocalStack Web Application in your browser, navigating to the **Resources** section, and then clicking on **CloudFormation** under the **Management/Governance** section.
103107

104-
<img src="cloudformation-resource-browser.png" alt="CloudFormation Resource Browser" title="CloudFormation Resource Browser" width="900" />
108+
![CloudFormation Resource Browser](/images/aws/cloudformation-resource-browser.png)
105109

106110
The Resource Browser allows you to perform the following actions:
107111

@@ -115,16 +119,16 @@ The Resource Browser allows you to perform the following actions:
115119
The following code snippets and sample applications provide practical examples of how to use CloudFormation in LocalStack for various use cases:
116120

117121
- [Serverless Container-based APIs with Amazon ECS & API Gateway](https://github.com/localstack/serverless-api-ecs-apigateway-sample)
118-
- [Deploying containers on ECS clusters using ECR and Fargate]({{< ref "/tutorials/ecs-ecr-container-app" >}})
122+
- [Deploying containers on ECS clusters using ECR and Fargate]()
119123
- [Messaging Processing application with SQS, DynamoDB, and Fargate](https://github.com/localstack/sqs-fargate-ddb-cdk-go)
120124

121125
## Feature coverage
122126

123-
{{< callout "tip" >}}
127+
:::note
124128
We are continually enhancing our CloudFormation feature coverage by consistently introducing new resource types.
125129
Your feature requests assist us in determining the priority of resource additions.
126130
Feel free to contribute by [creating a new GitHub issue](https://github.com/localstack/localstack/issues/new?assignees=&labels=feature-request&template=feature-request.yml&title=feature+request%3A+%3Ctitle%3E).
127-
{{< /callout >}}
131+
:::
128132

129133
### Features
130134

@@ -145,17 +149,17 @@ Feel free to contribute by [creating a new GitHub issue](https://github.com/loca
145149
| StackSets | Partial |
146150
| Intrinsic Functions | Partial |
147151

148-
{{< callout >}}
152+
:::note
149153
Currently, support for `UPDATE` operations on resources is limited.
150154
Prefer stack re-creation over stack update at this time.
151-
{{< /callout >}}
155+
:::
152156

153-
{{< callout >}}
157+
:::note
154158
Currently, support for `NoEcho` parameters is limited.
155159
Parameters will be masked only in the `Parameters` section of responses to `DescribeStacks` and `DescribeChangeSets` requests.
156160
This might expose sensitive information.
157161
Please exercise caution when using parameters with `NoEcho`.
158-
{{< /callout >}}
162+
:::
159163

160164
### Intrinsic Functions
161165

@@ -179,9 +183,9 @@ Please exercise caution when using parameters with `NoEcho`.
179183

180184
### Resources
181185

182-
{{< callout >}}
186+
:::note
183187
When utilizing the Community image, any resources within the stack that are not supported will be disregarded and won't be deployed.
184-
{{< /callout >}}
188+
:::
185189

186190
#### Community image
187191

0 commit comments

Comments
 (0)