|
1 | 1 | # component-cloudfront-s3-cdk |
2 | | -This is a component that uses Pulumi's CDK interop capability to deploy CloudFront with and S3 backend using an AWS CDK construct. |
| 2 | + |
| 3 | +A component that uses Pulumi's CDK interop capability to deploy CloudFront with and S3 backend using an AWS CDK construct. |
| 4 | + |
| 5 | +# Inputs |
| 6 | + |
| 7 | +None |
| 8 | + |
| 9 | +# Outputs |
| 10 | + |
| 11 | +* cloudFrontDomain: The name of the Cloud Front Domain. |
| 12 | +* websiteBucketName: The bucket backend. |
3 | 13 |
|
4 | 14 | # Usage |
| 15 | +## Specify Package in `Pulumi.yaml` |
| 16 | + |
| 17 | +Add the following to your `Pulumi.yaml` file: |
| 18 | +Note: If no version is specified, the latest version will be used. |
5 | 19 |
|
6 | | -In the folder of the project code that is using the component, run the following command using the release you want. |
7 | | -```bash |
8 | | -pulumi package add https://github.com/pulumi-pequod/ [email protected] |
9 | 20 | ``` |
| 21 | +packages: |
| 22 | + stackmgmt: https://github.com/pulumi-pequod/component-cloudfront-s3-cdk[@vX.Y.Z] |
| 23 | +``` |
| 24 | + |
| 25 | +## Use SDK in Program |
| 26 | + |
| 27 | +### Python |
| 28 | +``` |
| 29 | +from pulumi_pequod_cloudfront-s3-cdk import CloudFrontS3 |
| 30 | +
|
| 31 | +cloudfront_s3 = CloudFrontS3("my-cloudfront") |
| 32 | +``` |
| 33 | + |
| 34 | +### Typescript |
| 35 | +``` |
| 36 | +import { CloudFrontS3 } from "@pulumi-pequod/cloudfront-s3-cdk"; |
| 37 | +
|
| 38 | +const cloudfront = new CloudFrontS3(); |
| 39 | +``` |
| 40 | + |
| 41 | +### Dotnet |
| 42 | +``` |
| 43 | +using PulumiPequod.CloudfrontS3Cdk; |
| 44 | +
|
| 45 | +var cloudFront = new CloudFrontS3("mycloudfront"); |
| 46 | +``` |
| 47 | + |
| 48 | +### YAML |
| 49 | +``` |
| 50 | + stacksettings: |
| 51 | + type: cloudfront-s3-cdk:CloudFrontS3 |
| 52 | +``` |
| 53 | + |
10 | 54 |
|
11 | | -# Example Programs |
12 | | -There are two test projects provided that use the component: |
13 | | -- Typescript (`test-project-ts`) and |
14 | | -- YAML (`test-project-yaml`) |
15 | 55 |
|
16 | | -To use: |
17 | | -* cd to the test project folder you want to use. |
18 | | -* `pulumi package add https://github.com/MitchellGerdisch/[email protected]` |
19 | | -* `pulumi stack init` |
20 | | -* Modify the program as you want. |
21 | | -* `pulumi up` |
22 | 56 |
|
0 commit comments