-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.ts
More file actions
32 lines (27 loc) · 863 Bytes
/
main.ts
File metadata and controls
32 lines (27 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { Construct } from 'constructs';
import { App, TerraformStack, RemoteBackend } from 'cdktf';
import { GithubProvider } from '@cdktf/provider-github'
import { Repositories, Members } from './lib'
import { Teams } from './lib/teams';
class MyStack extends TerraformStack {
constructor(scope: Construct, name: string) {
super(scope, name);
new RemoteBackend(this, {
hostname: 'app.terraform.io',
organization: 'cdk-dev',
workspaces: {
name: 'repository-manager'
}
})
new GithubProvider(this, 'cdk-dev', {
token: process.env.GITHUB_TOKEN,
organization: 'cdk-dev'
})
const teams = new Teams(this, 'teams')
new Repositories(this, 'repositories', { teams })
new Members(this, 'members', { teams })
}
}
const app = new App();
new MyStack(app, 'repository-manager');
app.synth();