Skip to content

Instantly share code, notes, and snippets.

@sscovil
Last active November 6, 2022 20:32
Show Gist options
  • Select an option

  • Save sscovil/95b2119ed0f06579b81c016951d69ade to your computer and use it in GitHub Desktop.

Select an option

Save sscovil/95b2119ed0f06579b81c016951d69ade to your computer and use it in GitHub Desktop.
Terraform CDK using AWS Provider (Python)
from cdktf import App, TerraformStack, TerraformOutput
from cdktf_cdktf_provider_aws.provider import AwsProvider
from constructs import Construct
class ExampleStack(TerraformStack):
def __init__(self, scope: Construct, ns: str):
super().__init__(scope, ns)
AwsProvider(self, "aws", region="us-east-1")
# TODO: Add your constructs here
app = App()
ExampleStack(app, "my-example-stack")
app.synth()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment