Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cdktf/cdktf-provider-project
Repository management for prebuilt cdktf providers via cdktf
https://github.com/cdktf/cdktf-provider-project
cdk cdktf pre-built-provider provider terraform terraform-cdk
Last synced: 7 days ago
JSON representation
Repository management for prebuilt cdktf providers via cdktf
- Host: GitHub
- URL: https://github.com/cdktf/cdktf-provider-project
- Owner: cdktf
- License: mpl-2.0
- Created: 2020-08-10T19:46:29.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-14T01:20:33.000Z (24 days ago)
- Last Synced: 2024-10-17T16:43:06.520Z (20 days ago)
- Topics: cdk, cdktf, pre-built-provider, provider, terraform, terraform-cdk
- Language: TypeScript
- Homepage: https://cdk.tf
- Size: 3.12 MB
- Stars: 18
- Watchers: 8
- Forks: 14
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Terraform CDK Provider Project
A project template for [projen](https://github.com/eladb/projen) to create repositories for prebuilt provider packages for [Terraform CDK](https://cdk.tf).
## Usage
The provider repos are entirely auto generated from the configuration contained in this repo here. There's no manual interaction necessary, except for creating the initial repository - using this repo. The `cdktf get` command is executed as part of the build pipeline in Github Actions. These jobs are executed on a schedule. Hence, new provider changes will be picked up automatically.
### Creating a new provider
Add a new repository [over here](https://github.com/terraform-cdk-providers/repository-manager).
In the newly created repository, all we need is a `.projenrc.js` file like this:
```js
const { CdktfProviderProject } = require('@cdktf/provider-project');
const { Semver } = require('projen');const project = new CdktfProviderProject({
terraformProvider: "aws@~> 2.0"
});project.synth();
```Adjust the `terraformProvider` attribute as required and run the following commands:
```
npm install @cdktf/provider-project@latest
npx projen
yarn install
```This will generate an entire repository ready to be published, including Github Workflows for publishing NPM, Pypi and maven packages. The only thing which is needed to be set manually are the tokens for these registries:
- `NPM_TOKEN`
- `TWINE_PASSWORD`
- `TWINE_USERNAME`
- `MAVEN_GPG_PRIVATE_KEY`
- `MAVEN_GPG_PRIVATE_KEY_PASSPHRASE`
- `MAVEN_PASSWORD`
- `MAVEN_USERNAME`
- `MAVEN_STAGING_PROFILE_ID`### Updating an existing Provider
Commit and push the required changes to this repository here and wait for the auto-release to happen. Once released, you can run the following commands in the target provider repository:
```
npm install @cdktf/provider-project@latest
npx projen
yarn install
```Commit, push and check for the auto-released version.
## Development
Whatever needs to be changed in the downstream [provider repositories](https://github.com/terraform-cdk-providers/repository-manager) should be done via the [code definitions](./src/index.ts) here.
For local development, [yarn link](https://classic.yarnpkg.com/en/docs/cli/link/) might be quite helpful for testing.