Dockerize environment for automated testing

This commit is contained in:
geoffsee
2025-08-07 19:06:29 -04:00
parent 95d9ba8925
commit 63bea1315a
29 changed files with 9137 additions and 73 deletions

View File

@@ -0,0 +1,38 @@
import {Construct} from "constructs";
import {App, TerraformStack} from "cdktf";
import {Org} from "./.gen/providers/zitadel/org";
import {parse} from "dotenv";
import { ZitadelProvider } from "./.gen/providers/zitadel/provider";
const config = parse("../.zitadel.env");
const configExpanded = {
zitadelKey: config.ZITADEL_MASTERKEY,
};
class MyStack extends TerraformStack {
constructor(scope: Construct, id: string) {
super(scope, id);
// 1⃣ Provider configuration
new ZitadelProvider(this, "zitadel", {
domain: "http://localhost", // your instance URL
port: "8080",
insecure: true, // set true for dev/self-signed
token: configExpanded.zitadelKey
// or serviceAccountId / key depending on the auth method you prefer
});
// 2⃣ Create an organisation
new Org(this, "demoOrg", {
name: "geoffs-makers-guild"
// optional: project_grant_role_assertion, default_language, etc.
});
}
}
const app = new App();
new MyStack(app, "zitadel-configurator");
app.synth();