This file contains 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
on: | |
pull_request: | |
jobs: | |
plan: | |
runs-on: ubuntu-latest | |
env: | |
GH_TOKEN: ${{ github.token }} | |
permissions: | |
pull-requests: write |
This file contains 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
import * as cdk from 'aws-cdk-lib'; | |
import { Construct } from 'constructs'; | |
import * as ec2 from 'aws-cdk-lib/aws-ec2'; | |
export class CdkStack extends cdk.Stack { | |
constructor(scope: Construct, id: string, props?: cdk.StackProps) { | |
super(scope, id, props); | |
const vpc = ec2.Vpc.fromLookup(this, 'vpc', { | |
vpcId: 'vpc-12345678901234567' |
This file contains 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
#!/usr/bin/env node | |
import 'source-map-support/register'; | |
import * as cdk from 'aws-cdk-lib'; | |
import { CdkStack } from '../lib/cdk-stack'; | |
const app = new cdk.App(); | |
new CdkStack(app, 'CdkStack', { | |
/* If you don't specify 'env', this stack will be environment-agnostic. | |
* Account/Region-dependent features and context lookups will not work, | |
* but a single synthesized template can be deployed anywhere. */ |
This file contains 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
data "aws_ami" "al2023" { | |
most_recent = true | |
owners = ["amazon"] | |
filter { | |
name = "name" | |
values = ["al2023-ami-2023.*"] | |
} |