Created
September 16, 2025 09:34
-
-
Save miton18/da0dbabe4377a2ca5ec145c5bce56fbc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| npm install --global cdktf-cli@latest | |
| mkdir proj && cd proj | |
| cdktf init --template typescript --local --providers "CleverCloud/clevercloud" | |
| # edit cdktf.json | |
| "terraformProviders": [ | |
| + "CleverCloud/clevercloud" | |
| ], | |
| # edit main.ts | |
| import { Construct } from "constructs"; | |
| import { App, TerraformStack } from "cdktf"; | |
| import {ClevercloudProvider} from './.gen/providers/clevercloud/provider' | |
| import { MateriaKv } from './.gen/providers/clevercloud/materia-kv' | |
| class MyStack extends TerraformStack { | |
| constructor(scope: Construct, id: string) { | |
| super(scope, id); | |
| new ClevercloudProvider(this, "provider", { | |
| organisation: "orga_12851457-6cd1-4a79-b3f0-2f9dd4c59628" | |
| }); | |
| const addon = new MateriaKv(this, "addon", { | |
| name: "kvstorage", | |
| }); | |
| console.log(addon); | |
| } | |
| } | |
| const app = new App(); | |
| new MyStack(app, "test-cdktf"); | |
| app.synth(); | |
| # Generate | |
| cdktf get | |
| # Deploy | |
| cdktf deploy | |
| cdktf destroy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment