forked from MitzyMeow/java-goof
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypescript
More file actions
29 lines (24 loc) · 756 Bytes
/
typescript
File metadata and controls
29 lines (24 loc) · 756 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
import { Construct } from 'constructs';
import { App, TerraformStack, TerraformOutput } from 'cdktf';
import { AwsProvider, S3Bucket } from './imports';
class MyStack extends TerraformStack {
constructor(scope: Construct, name: string) {
super(scope, name);
// Define AWS provider
new AwsProvider(this, 'aws', {
region: 'us-west-2', // Misconfigured region
});
// Define S3 bucket
new S3Bucket(this, 'my-bucket', {
bucket: 'my-bucket', // Misconfigured bucket name
acl: 'private', // Misconfigured ACL
});
// Output
new TerraformOutput(this, 'bucket_name', {
value: 'my-bucket', // Misconfigured output value
});
}
}
const app = new App();
new MyStack(app, 'my-stack');
app.synth();