Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jayair committed Mar 13, 2024
1 parent d04b6ad commit e6ff54f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 33 deletions.
2 changes: 1 addition & 1 deletion pkg/platform/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export interface App {
* 1. Add the config for it in the `providers` object. The key is the name of the provider.
* 2. Install the provider using `sst install`.
*
* :::tip
* :::note
* If you are using one of our quick starts with the `sst init` command, it'll automatically install the right provider for you.
* :::
*
Expand Down
39 changes: 7 additions & 32 deletions www/src/content/docs/docs/components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,46 +19,21 @@ You can also use any Pulumi component in your SST app. This is useful if you wan

## Providers

Components are classes that are name spaced under the cloud provider it deploys to. Currently, Ion supports two providers out of the box. Support for other providers is coming soon.
Components are classes that are name spaced under the cloud provider it deploys to. Currently, SST has components that depoy to two providers:

---

### AWS

This is Pulumi's [AWS Classic](https://www.pulumi.com/registry/packages/aws/) provider is automatically included in your SST app. So you can directly use Pulumi's AWS components.

```js
import * as aws from "@pulumi/aws";

new aws.s3.BucketV2("b", {
bucket: "mybucket",
tags: {
Name: "My bucket"
}
});
```

---
- **AWS**

### Cloudflare
These components are namespaced under `sst.aws.*`. They use Pulumi's [AWS Classic](https://www.pulumi.com/registry/packages/aws/) provider.

This is Pulumi's [Cloudflare](https://www.pulumi.com/registry/packages/cloudflare/) provider and it's also included in your SST app. Allowing you use Cloudflare components.
- **Cloudflare**

```js
import * as cloudflare from "@pulumi/cloudflare";
These components are namespaced under `sst.cloudflare.*`. They use Pulumi's [Cloudflare](https://www.pulumi.com/registry/packages/cloudflare/) provider.

new cloudflare.Record("sample-record", {
name: "my-record",
zoneId: "xxsdfhsfkashadf",
type: "A",
value: "192.168.0.11",
ttl: 3600
});
```
Aside from SST's components, you can use any [Pulumi provider](https://www.pulumi.com/registry/) for your Pulumi components in your app. You can read more about `providers` in [Config](/docs/reference/config/).

---

## Create a component
## Constructor

To add a component to your app, you create an instance of it by passing in a couple of args. For example, here's the signature of the [Function](/docs/component/aws/function) component.

Expand Down

0 comments on commit e6ff54f

Please sign in to comment.