Last active
May 22, 2026 13:29
-
-
Save omarqureshi/bccbea94832119aaa7cac04c00908917 to your computer and use it in GitHub Desktop.
Example of synth output from `cdk synth` when writing CDK in Ruby
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
| diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json | |
| index 8420c94bc5..bdd75dd017 100644 | |
| --- a/packages/aws-cdk-lib/package.json | |
| +++ b/packages/aws-cdk-lib/package.json | |
| @@ -66,6 +66,10 @@ | |
| "tsconfig": "tsconfig.json", | |
| "outdir": "dist", | |
| "targets": { | |
| + "ruby": { | |
| + "gem": "aws-cdk-lib", | |
| + "module": "AWSCDK" | |
| + }, | |
| "dotnet": { | |
| "namespace": "Amazon.CDK", | |
| "packageId": "Amazon.CDK.Lib", |
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
| diff --git a/package.json b/package.json | |
| index 456844a..788dd98 100644 | |
| --- a/package.json | |
| +++ b/package.json | |
| @@ -143,6 +143,10 @@ | |
| }, | |
| "go": { | |
| "moduleName": "github.com/aws/constructs-go" | |
| + }, | |
| + "ruby": { | |
| + "gem": "constructs", | |
| + "module": "Constructs" | |
| } | |
| }, | |
| "tsc": { |
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
| source 'https://rubygems.org' | |
| gem 'constructs', path: '../constructs/dist/ruby' | |
| gem 'aws-cdk-lib', path: '../aws-cdk/packages/aws-cdk-lib/dist/ruby' | |
| gem 'aws-cdk-asset-awscli-v1', path: '../aws-cdk/node_modules/@aws-cdk/asset-awscli-v1/dist/ruby' | |
| gem 'aws-cdk-asset-node-proxy-agent-v6', path: '../aws-cdk/node_modules/@aws-cdk/asset-node-proxy-agent-v6/dist/ruby' | |
| gem 'aws-cdk-cloud-assembly-schema', path: '../aws-cdk/node_modules/@aws-cdk/cloud-assembly-schema/dist/ruby' |
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
| require 'aws-cdk-lib' | |
| class MyCustomStack < AWSCDK::Stack | |
| def initialize(scope, id, props = nil) | |
| super(scope, id, props) | |
| AWSCDK::AWSS3::Bucket.new(self, 'MyBucket', { | |
| versioned: true | |
| }) | |
| end | |
| end | |
| app = AWSCDK::App.new | |
| MyCustomStack.new(app, 'MyStack') | |
| app.synth |
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
| Resources: | |
| MyBucketF68F3FF0: | |
| Type: AWS::S3::Bucket | |
| Properties: | |
| VersioningConfiguration: | |
| Status: Enabled | |
| UpdateReplacePolicy: Retain | |
| DeletionPolicy: Retain | |
| Metadata: | |
| aws:cdk:path: MyStack/MyBucket/Resource | |
| CDKMetadata: | |
| Type: AWS::CDK::Metadata | |
| Properties: | |
| Analytics: v2:deflate64:H4sIAAAAAAAA/zPQM9AzUEwsL9ZNTsnWzclM0qsOLklMztZJLC+OLzbWq3YqTc5OLdFxTsuDsGprdfLyU1L1sor1y4xM9AxN9QwUs4ozM3WLSvNKMnNT9YIgNAAy+cp+WQAAAA== | |
| Metadata: | |
| aws:cdk:path: MyStack/CDKMetadata/Default | |
| Condition: CDKMetadataAvailable | |
| Conditions: | |
| CDKMetadataAvailable: | |
| Fn::Or: | |
| - Fn::Or: | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - af-south-1 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - ap-east-1 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - ap-northeast-1 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - ap-northeast-2 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - ap-northeast-3 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - ap-south-1 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - ap-south-2 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - ap-southeast-1 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - ap-southeast-2 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - ap-southeast-3 | |
| - Fn::Or: | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - ap-southeast-4 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - ca-central-1 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - ca-west-1 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - cn-north-1 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - cn-northwest-1 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - eu-central-1 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - eu-central-2 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - eu-north-1 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - eu-south-1 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - eu-south-2 | |
| - Fn::Or: | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - eu-west-1 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - eu-west-2 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - eu-west-3 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - il-central-1 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - me-central-1 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - me-south-1 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - sa-east-1 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - us-east-1 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - us-east-2 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - us-west-1 | |
| - Fn::Equals: | |
| - Ref: AWS::Region | |
| - us-west-2 | |
| Parameters: | |
| BootstrapVersion: | |
| Type: AWS::SSM::Parameter::Value<String> | |
| Default: /cdk-bootstrap/hnb659fds/version | |
| Description: Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment