This repository is composed by the following components:
Component | Description | Path |
---|---|---|
Provider | This is the Pulumi provider written in TypeScript. | provider/cmd/pulumi-resource-cloud-toolkit-aws/ |
Schema | The Pulumi schema that describes the resources and types managed by the Provider. It is used to generate the SDKs. | schema.yaml |
SDKs | A set of SDK to use the Provider from many languages. | sdk/ |
Integration tests | A set of suite cases to test components with a specific configuration. | tests/ |
- Pulumi CLI
- Pulumictl
- Node.js 8+
- NPM 16+
- Go 1.18
- Python 3.6+
- setuptools 1.63+
After applying changes to the Provider code, you can build and install it using the following command:
make install_provider
The provider will be installed inside the bin
directory at the root level of this repository. To use the provider just add the bin
directory to your PATH:
export PATH=$PATH:$(pwd)/bin
If you added or modified any Component, you need to update the schema.yaml
file.
For example you cloud add a StaticPage
component adding the following content to the resources
property:
+ cloud-toolkit-aws:index:StaticPage:
+ description: StaticPage component to deploy a web page using S3 bucket.
+ properties:
+ bucket:
+ description: The S3 bucket used to store the web page.
+ $ref: /aws/v5.10.0/schema.json#/resources/aws:s3%2fbucketV2:BucketV2
After updating the Schema content, it is required to regenerate the SDKs with the following command.
make build_sdk
Once the SDKs are generated, you can use them as described below.
NodeJS
Install the generated SDK placed under the sdk/nodejs/bin
directory:
npm install <path-to-this-repo>/sdk/nodejs/bin
Python
Install the generated SDK placed under the sdk/python/bin
directory:
pip install -e <path-to-this-repo>/sdk/python/bin
To execute the tests you need to specify the route of the provider in your PATH
variable:
export PATH=$PATH:$(pwd)/bin
Run integration tests with the following command:
make integration_tests
You can also execute the tests manually as usual with ginkgo run
.
You will still need to have the provider in the PATH.