CINXE.COM
CDK for Terraform | Terraform | HashiCorp Developer
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><title>CDK for Terraform | Terraform | HashiCorp Developer</title><meta http-equiv="x-ua-compatible" content="ie=edge"/><meta property="og:locale" content="en_US"/><meta property="og:type" content="website"/><meta property="article:publisher" content="https://www.facebook.com/HashiCorp/"/><meta name="twitter:site" content="@HashiCorp"/><meta name="twitter:card" content="summary_large_image"/><meta name="theme-color" content="#000"/><meta name="description" property="og:description" content="Cloud Development Kit for Terraform (CDKTF) lets you use familiar programming languages to define and provision infrastructure."/><meta name="twitter:description" content="Cloud Development Kit for Terraform (CDKTF) lets you use familiar programming languages to define and provision infrastructure."/><meta property="og:site_name" content="CDK for Terraform | Terraform | HashiCorp Developer"/><meta property="og:title" content="CDK for Terraform | Terraform | HashiCorp Developer"/><meta property="og:image" content="https://developer.hashicorp.com/og-image/terraform.jpg"/><link rel="canonical" href="https://developer.hashicorp.com/terraform/cdktf"/><link rel="icon" href="/favicon.ico" sizes="48x48"/><link rel="icon" href="/favicon.svg" sizes="any" type="image/svg+xml"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta name="google-site-verification" content="zRQZqfAsOX-ypXfU0mzAIzb5rUvj5fA4Zw2jWJRN-JI"/><meta name="ahrefs-site-verification" content="9d739b21c466a84dae91df1c79396081a9072152e64f765c9390fed6f249fb84"/><meta name="zd-site-verification" content="xnvnvv1i0wl4tf0pzaymb" data-product="hcp"/><meta name="zd-site-verification" content="36fp2i1pj67d8cjtzf4fi9" data-product="terraform"/><meta name="zd-site-verification" content="nbe87kfyp1sck7b13vj1i" data-product="packer"/><meta name="zd-site-verification" content="wvsmmqa1cfb9am9zlwfj" data-product="consul"/><meta name="zd-site-verification" content="cw22oopfwr68ujj0n5pn9i" data-product="boundary"/><meta name="zd-site-verification" content="lkslvganwfgfqfwpdeicgh" data-product="vault"/><meta name="zd-site-verification" content="jl2wp2hoej9rz6c8rmqdns" data-product="nomad"/><meta name="zd-site-verification" content="2eb0cu6xceo73t0038m0tb" data-product="waypoint"/><meta name="zd-site-verification" content="n52xisxdf3higs2q9kuogd" data-product="vagrant"/><meta name="twitter:image" content="https://developer.hashicorp.com/og-image/terraform.jpg"/><link rel="prefetch" href="https://www.datadoghq-browser-agent.com/datadog-rum-v4.js"/><script type="application/ld+json">[{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Developer","item":"https://developer.hashicorp.com/"},{"@type":"ListItem","position":2,"name":"Terraform","item":"https://developer.hashicorp.com/terraform"},{"@type":"ListItem","position":3,"name":"CDK for Terraform","item":"https://developer.hashicorp.com/terraform/cdktf"}]}]</script><meta name="next-head-count" content="32"/><link data-next-font="" rel="preconnect" href="/" crossorigin="anonymous"/><link rel="preload" href="/_next/static/css/f49486d3b4c819d0.css?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" as="style"/><link rel="stylesheet" href="/_next/static/css/f49486d3b4c819d0.css?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" data-n-g=""/><link rel="preload" href="/_next/static/css/82b9cc80b84d25f7.css?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" as="style"/><link rel="stylesheet" href="/_next/static/css/82b9cc80b84d25f7.css?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" data-n-p=""/><link rel="preload" href="/_next/static/css/a23a4d5b8f64c49d.css?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" as="style"/><link rel="stylesheet" href="/_next/static/css/a23a4d5b8f64c49d.css?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" data-n-p=""/><link rel="preload" href="/_next/static/css/686380cdcb9bba8b.css?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" as="style"/><link rel="stylesheet" href="/_next/static/css/686380cdcb9bba8b.css?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" data-n-p=""/><link rel="preload" href="/_next/static/css/7c3fb308d5c63fc7.css?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" as="style"/><link rel="stylesheet" href="/_next/static/css/7c3fb308d5c63fc7.css?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" data-n-p=""/><link rel="preload" href="/_next/static/css/17746cad20c495ec.css?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" as="style"/><link rel="stylesheet" href="/_next/static/css/17746cad20c495ec.css?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m"></script><script src="/_next/static/chunks/webpack-ff3ea476a014deac.js?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" defer=""></script><script src="/_next/static/chunks/framework-f2b655730fee1ac7.js?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" defer=""></script><script src="/_next/static/chunks/main-66d51c50ad78012e.js?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" defer=""></script><script src="/_next/static/chunks/pages/_app-47313269c424a757.js?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" defer=""></script><script src="/_next/static/chunks/5902-87f33039e0eec3ac.js?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" defer=""></script><script src="/_next/static/chunks/1395-3123953bf33a1a96.js?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" defer=""></script><script src="/_next/static/chunks/2273-2d3c65b146eaf65e.js?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" defer=""></script><script src="/_next/static/chunks/5675-ff22900ae49961a1.js?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" defer=""></script><script src="/_next/static/chunks/6000-385d175dbbae1922.js?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" defer=""></script><script src="/_next/static/chunks/7181-35ae56b3d9e563d1.js?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" defer=""></script><script src="/_next/static/chunks/9554-0317e56926c524ee.js?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" defer=""></script><script src="/_next/static/chunks/7427-6ce68182b58ee028.js?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" defer=""></script><script src="/_next/static/chunks/5261-712f245d974352a7.js?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" defer=""></script><script src="/_next/static/chunks/6787-40ac7b572e656d81.js?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" defer=""></script><script src="/_next/static/chunks/3786-111421bf285ccf09.js?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" defer=""></script><script src="/_next/static/chunks/6842-ff87d59813c66bbc.js?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" defer=""></script><script src="/_next/static/chunks/pages/terraform/cdktf/%5B%5B...page%5D%5D-9ca02c4630516996.js?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" defer=""></script><script src="/_next/static/xspVxkgNWcZILOYRvLBd5/_buildManifest.js?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" defer=""></script><script src="/_next/static/xspVxkgNWcZILOYRvLBd5/_ssgManifest.js?dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m" defer=""></script></head><body><div id="__next"><div class="style_root__dZhZu style_isShown__D4mb6"><a href="https://hashi.co/hashitalks-2025" class="style_linkElem__hCESK"><span class="style_textContainer__6CuI7 g-grid-container"><span class="style_tag__jbHGz g-type-body-small-x-strong">HashiTalks 2025<!-- --> </span><span class="style_text__rwS0u g-type-body-small">Learn about unique use cases, homelab setups, and best practices at scale at our 24-hour virtual knowledge sharing event.<span class="style_linkText__E8GJf g-type-body-small-x-strong"> <!-- -->Register</span></span></span></a><button class="style_closeButton__57J9w"><div><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" viewBox="0 0 20 20"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M15 5 5 15M5 5l10 10"/></svg></div><span style="position:absolute;border:0;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;word-wrap:normal">Dismiss alert</span></button></div><script type="text/javascript"> (function checkDismissAlertBanner() { try { if (document.cookie.includes('banner_learn-about-unique-use-cases-homelab-setups-and-best-practices-at-scale-at-our-24-hour-virtual-knowledge-sharing-event.=1')) { const element = document.querySelector('.style_root__dZhZu') element.classList.remove('style_isShown__D4mb6') } } catch (_) { // do nothing } })() </script><script>!function(){try{var d=document.documentElement,n='data-theme',s='setAttribute';var e=localStorage.getItem('theme');if('system'===e||(!e&&true)){var t='(prefers-color-scheme: dark)',m=window.matchMedia(t);if(m.media!==t||m.matches){d.style.colorScheme = 'dark';d[s](n,'dark')}else{d.style.colorScheme = 'light';d[s](n,'light')}}else if(e){d[s](n,e|| '')}if(e==='light'||e==='dark')d.style.colorScheme=e}catch(e){}}()</script><div class="core-dev-dot-layout_root__MT1PZ"><div class="base-layout_root___qiZs" data-layout="base-new"><div class="base-layout_header__XhkxS"><header class="navigation-header_root__oE_HT"><div class="navigation-header_leftSide__V0xlc"><div class="product-page-content_productsDropdown__haUyw"><nav aria-label="Main" data-orientation="horizontal" dir="ltr"><div class="dropdown-menu_root__Hwy5S"><div class="dropdown-menu_activatorWrapper__LxPRt"><button aria-controls="navigation-header-menu-react-aria-1" aria-expanded="false" aria-label="Main menu" class="dropdown-menu_activator__xXb00 g-focus-ring-from-box-shadow-dark product-page-content_productsDropdownButton__bnKKs"><span class="dropdown-menu_activatorLeadingIcon__YQQlH"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24" aria-hidden="true" class="product-page-content_productsDropdownIcon__gXtly"><g fill="currentColor"><path d="M10.336 1.5L2 6.268v11.456l3.131 1.793V8.061l5.205-2.979V1.5z"></path><path d="M13.664 1.5v9.123h-3.328V7.219L7.203 9.012V20.7l3.133 1.796V13.4h3.328v3.381l3.131-1.793V3.293L13.664 1.5z"></path><path d="M22 17.732L13.664 22.5v-3.582l5.203-2.98V4.484L22 6.276v11.456z"></path></g></svg></span><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true" class="dropdown-menu_activatorTrailingIcon__r_cCd"><path fill="currentColor" fill-rule="evenodd" d="M3.235 5.205a.75.75 0 011.06.03L8 9.158l3.705-3.923a.75.75 0 011.09 1.03l-4.25 4.5a.75.75 0 01-1.09 0l-4.25-4.5a.75.75 0 01.03-1.06z" clip-rule="evenodd"></path></svg></button></div><div class="dropdown-menu_dropdownContainer__AZWxN" id="navigation-header-menu-react-aria-1" style="display:none"><div class="style_root__z3EwE style_productPanel__Z4UFi style_hasSide__15FV8 style_hasSide__ecwjD"><div class="style_mainPanel__MpQn1"><div class="style_column__9is2G style_hasSide__A3F31"><ul class="style_productCategories__j1h4T"><li class="style_productCategory__9UHKG"><span class="hds-text hdsplus-typography-body-300 style_eyebrow__OCUlS">Infrastructure Lifecycle Management</span><ul class="style_productList__uPlTj"><li><a aria-label="Terraform - Manage infrastructure as code" class="style_focusIndicator__uTVwt" data-radix-collection-item="" href="/terraform"><div class="style_productWrapper__ACHaw"><div class="style_productLogo__cTxLO"><svg class="flight-icon flight-icon-terraform-fill flight-icon-display-inline style_terraform__nU44i" aria-hidden="true" fill="currentColor" id=":R9imld6j6:" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><use href="/_next/static/media/svg-sprite.8ce6dd4a.svg#flight-terraform-fill-16"></use></svg></div><div class="style_productTextContent__o8DJ6"><span>Terraform</span><span class="style_productDesc__bi44f">Manage infrastructure as code</span></div></div></a></li><li><a aria-label="Packer - Build machine images" class="style_focusIndicator__uTVwt" data-radix-collection-item="" href="/packer"><div class="style_productWrapper__ACHaw"><div class="style_productLogo__cTxLO"><svg class="flight-icon flight-icon-packer-fill-color flight-icon-display-inline" aria-hidden="true" fill="currentColor" id=":Raimld6j6:" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><use href="/_next/static/media/svg-sprite.8ce6dd4a.svg#flight-packer-fill-color-16"></use></svg></div><div class="style_productTextContent__o8DJ6"><span>Packer</span><span class="style_productDesc__bi44f">Build machine images</span></div></div></a></li><li><a aria-label="Nomad - Orchestrate workloads" class="style_focusIndicator__uTVwt" data-radix-collection-item="" href="/nomad"><div class="style_productWrapper__ACHaw"><div class="style_productLogo__cTxLO"><svg class="flight-icon flight-icon-nomad-fill-color flight-icon-display-inline" aria-hidden="true" fill="currentColor" id=":Rbimld6j6:" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><use href="/_next/static/media/svg-sprite.8ce6dd4a.svg#flight-nomad-fill-color-16"></use></svg></div><div class="style_productTextContent__o8DJ6"><span>Nomad</span><span class="style_productDesc__bi44f">Orchestrate workloads</span></div></div></a></li><li><a aria-label="Waypoint - Standardize application patterns" class="style_focusIndicator__uTVwt" data-radix-collection-item="" href="/waypoint"><div class="style_productWrapper__ACHaw"><div class="style_productLogo__cTxLO"><svg class="flight-icon flight-icon-waypoint-fill-color flight-icon-display-inline" aria-hidden="true" fill="currentColor" id=":Rcimld6j6:" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><use href="/_next/static/media/svg-sprite.8ce6dd4a.svg#flight-waypoint-fill-color-16"></use></svg></div><div class="style_productTextContent__o8DJ6"><span>Waypoint</span><span class="style_productDesc__bi44f">Standardize application patterns</span></div></div></a></li><li><a aria-label="Vagrant - Build developer environments" class="style_focusIndicator__uTVwt" data-radix-collection-item="" href="/vagrant"><div class="style_productWrapper__ACHaw"><div class="style_productLogo__cTxLO"><svg class="flight-icon flight-icon-vagrant-fill-color flight-icon-display-inline" aria-hidden="true" fill="currentColor" id=":Rdimld6j6:" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><use href="/_next/static/media/svg-sprite.8ce6dd4a.svg#flight-vagrant-fill-color-16"></use></svg></div><div class="style_productTextContent__o8DJ6"><span>Vagrant</span><span class="style_productDesc__bi44f">Build developer environments</span></div></div></a></li></ul></li><li class="style_productCategory__9UHKG"><span class="hds-text hdsplus-typography-body-300 style_eyebrow__OCUlS">Security Lifecycle Management</span><ul class="style_productList__uPlTj"><li><a aria-label="Vault - Centrally manage secrets" class="style_focusIndicator__uTVwt" data-radix-collection-item="" href="/vault"><div class="style_productWrapper__ACHaw"><div class="style_productLogo__cTxLO"><svg class="flight-icon flight-icon-vault-fill-color flight-icon-display-inline" aria-hidden="true" fill="currentColor" id=":R9kmld6j6:" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><use href="/_next/static/media/svg-sprite.8ce6dd4a.svg#flight-vault-fill-color-16"></use></svg></div><div class="style_productTextContent__o8DJ6"><span>Vault</span><span class="style_productDesc__bi44f">Centrally manage secrets</span></div></div></a></li><li><a aria-label="Boundary - Secure remote access" class="style_focusIndicator__uTVwt" data-radix-collection-item="" href="/boundary"><div class="style_productWrapper__ACHaw"><div class="style_productLogo__cTxLO"><svg class="flight-icon flight-icon-boundary-fill-color flight-icon-display-inline" aria-hidden="true" fill="currentColor" id=":Rakmld6j6:" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><use href="/_next/static/media/svg-sprite.8ce6dd4a.svg#flight-boundary-fill-color-16"></use></svg></div><div class="style_productTextContent__o8DJ6"><span>Boundary</span><span class="style_productDesc__bi44f">Secure remote access</span></div></div></a></li><li><a aria-label="HCP Vault Secrets - Manage secrets as a service" class="style_focusIndicator__uTVwt" data-radix-collection-item="" href="/hcp/docs/vault-secrets"><div class="style_productWrapper__ACHaw"><div class="style_productLogo__cTxLO"><svg class="flight-icon flight-icon-vault-secrets flight-icon-display-inline style_hcpVaultSecrets__11wgG" aria-hidden="true" fill="currentColor" id=":Rbkmld6j6:" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><use href="/_next/static/media/svg-sprite.8ce6dd4a.svg#flight-vault-secrets-16"></use></svg></div><div class="style_productTextContent__o8DJ6"><span>HCP Vault Secrets</span><span class="style_productDesc__bi44f">Manage secrets as a service</span></div></div></a></li><li><a aria-label="Consul - Secure network services" class="style_focusIndicator__uTVwt" data-radix-collection-item="" href="/consul"><div class="style_productWrapper__ACHaw"><div class="style_productLogo__cTxLO"><svg class="flight-icon flight-icon-consul-fill-color flight-icon-display-inline" aria-hidden="true" fill="currentColor" id=":Rckmld6j6:" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><use href="/_next/static/media/svg-sprite.8ce6dd4a.svg#flight-consul-fill-color-16"></use></svg></div><div class="style_productTextContent__o8DJ6"><span>Consul</span><span class="style_productDesc__bi44f">Secure network services</span></div></div></a></li><li><a aria-label="HCP Vault Radar - Scan for embedded secrets" class="style_focusIndicator__uTVwt" data-radix-collection-item="" href="/hcp/docs/vault-radar"><div class="style_productWrapper__ACHaw"><div class="style_productLogo__cTxLO"><svg class="flight-icon flight-icon-vault-radar flight-icon-display-inline style_hcpVaultRadar__nukMV" aria-hidden="true" fill="currentColor" id=":Rdkmld6j6:" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><use href="/_next/static/media/svg-sprite.8ce6dd4a.svg#flight-vault-radar-16"></use></svg></div><div class="style_productTextContent__o8DJ6"><span>HCP Vault Radar</span><span class="style_productDesc__bi44f">Scan for embedded secrets</span></div></div></a></li></ul></li></ul></div><div class="style_promo__e6yXp style_hasSide__635Xt"><div class="style_icon__rYEcI"><svg class="flight-icon flight-icon-hashicorp flight-icon-display-inline" aria-hidden="true" fill="currentColor" id=":R36ld6j6:" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><use href="/_next/static/media/svg-sprite.8ce6dd4a.svg#flight-hashicorp-16"></use></svg></div><div class="style_rightContent__zvciM"><div><div class="style_title__eEtAF">HashiCorp Cloud Platform</div><div class="style_description__ATQzz">Get started in minutes with our cloud products</div></div><a class="style_link__U4Sfy" data-radix-collection-item="" href="/hcp">All HCP Products<svg class="flight-icon flight-icon-external-link flight-icon-display-inline" aria-hidden="true" fill="currentColor" id=":R2l6ld6j6:" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><use href="/_next/static/media/svg-sprite.8ce6dd4a.svg#flight-external-link-16"></use></svg></a></div></div></div><div class="style_column__9is2G style_sidePanel__qxYNB"><span class="hds-text hdsplus-typography-body-200 hds-font-weight-semibold">Learn</span><ul class="style_sidePanelItems__i8_HV"><li><a aria-label="Certifications - Get HashiCorp certified" class="style_sidePanelItem__j0j0G style_focusIndicator__uTVwt" href="/certifications"><div class="style_iconBackground__fn5_s"><svg class="flight-icon flight-icon-award flight-icon-display-inline" aria-hidden="true" fill="var(--token-color-foreground-faint)" id=":Rjald6j6:" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><use href="/_next/static/media/svg-sprite.8ce6dd4a.svg#flight-award-16"></use></svg></div><div class="style_sidePanelItemContent__xFcSA"><span class="hds-text hdsplus-typography-body-200 hds-font-weight-semibold">Certifications</span><span class="style_sidePanelItemDesc__UrOLh">Get HashiCorp certified</span></div></a></li><li><a aria-label="Tutorials - Learn HashiCorp products" class="style_sidePanelItem__j0j0G style_focusIndicator__uTVwt" href="/tutorials"><div class="style_iconBackground__fn5_s"><svg class="flight-icon flight-icon-learn flight-icon-display-inline" aria-hidden="true" fill="var(--token-color-foreground-faint)" id=":Rlald6j6:" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><use href="/_next/static/media/svg-sprite.8ce6dd4a.svg#flight-learn-16"></use></svg></div><div class="style_sidePanelItemContent__xFcSA"><span class="hds-text hdsplus-typography-body-200 hds-font-weight-semibold">Tutorials</span><span class="style_sidePanelItemDesc__UrOLh">Learn HashiCorp products</span></div></a></li><li><a aria-label="Validated Patterns - Field-tested patterns for using HashiCorp products" class="style_sidePanelItem__j0j0G style_focusIndicator__uTVwt" href="/validated-patterns"><div class="style_iconBackground__fn5_s"><svg class="flight-icon flight-icon-check-circle flight-icon-display-inline" aria-hidden="true" fill="var(--token-color-foreground-faint)" id=":Rnald6j6:" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><use href="/_next/static/media/svg-sprite.8ce6dd4a.svg#flight-check-circle-16"></use></svg></div><div class="style_sidePanelItemContent__xFcSA"><span class="hds-text hdsplus-typography-body-200 hds-font-weight-semibold">Validated Patterns</span><span class="style_sidePanelItemDesc__UrOLh">Field-tested patterns for using HashiCorp products</span></div></a></li><li><a aria-label="Well-Architected Framework - Adopt HashiCorp best practices" class="style_sidePanelItem__j0j0G style_focusIndicator__uTVwt" href="/well-architected-framework"><div class="style_iconBackground__fn5_s"><svg class="flight-icon flight-icon-layers flight-icon-display-inline" aria-hidden="true" fill="var(--token-color-foreground-faint)" id=":Rpald6j6:" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><use href="/_next/static/media/svg-sprite.8ce6dd4a.svg#flight-layers-16"></use></svg></div><div class="style_sidePanelItemContent__xFcSA"><span class="hds-text hdsplus-typography-body-200 hds-font-weight-semibold">Well-Architected Framework</span><span class="style_sidePanelItemDesc__UrOLh">Adopt HashiCorp best practices</span></div></a></li></ul></div></div></div></div></nav></div><div class="product-page-content_productLinkAndNav__YTzcr"><a aria-label="Terraform home" class="product-icon-text-link_root__bNTSz g-focus-ring-from-box-shadow-dark" href="/terraform"><div class="product-icon-text-lockup_root__358wV"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true" class="product-icon-text-lockup_icon__Zp_5o"><g fill="var(--token-color-terraform-brand)"><path d="M1 0v5.05l4.349 2.527V2.526L1 0zM10.175 5.344l-4.35-2.525v5.05l4.35 2.527V5.344zM10.651 10.396V5.344L15 2.819v5.05l-4.349 2.527zM10.174 16l-4.349-2.526v-5.05l4.349 2.525V16z"></path></g></svg><span class="product-icon-text-lockup_text__nHTL7 hds-typography-body-200">Terraform</span></div></a><nav aria-label="Main" data-orientation="horizontal" dir="ltr" class="nav-bar-list-container_nav__C_i0_"><div style="position:relative"><ul data-orientation="horizontal" class="nav-bar-list-container_ul___04HI" dir="ltr"><li><a aria-label="Terraform Install" class="primary-nav-link_root__RXZIC g-focus-ring-from-box-shadow-dark" href="/terraform/install"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium primary-nav-link_linkText__58O0C">Install</span></a></li><li><a aria-label="Terraform Tutorials" class="primary-nav-link_root__RXZIC g-focus-ring-from-box-shadow-dark" href="/terraform/tutorials"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium primary-nav-link_linkText__58O0C">Tutorials</span></a></li><li><div class="dropdown-menu_root__Hwy5S"><div class="dropdown-menu_activatorWrapper__LxPRt"><button aria-controls="navigation-header-menu-react-aria-5" aria-expanded="false" aria-label="Terraform Documentation" class="dropdown-menu_activator__xXb00 g-focus-ring-from-box-shadow-dark"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium dropdown-menu_activatorText__acGRP">Documentation</span><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true" class="dropdown-menu_activatorTrailingIcon__r_cCd"><path fill="currentColor" fill-rule="evenodd" d="M3.235 5.205a.75.75 0 011.06.03L8 9.158l3.705-3.923a.75.75 0 011.09 1.03l-4.25 4.5a.75.75 0 01-1.09 0l-4.25-4.5a.75.75 0 01.03-1.06z" clip-rule="evenodd"></path></svg></button></div><div class="dropdown-menu_dropdownContainer__AZWxN" id="navigation-header-menu-react-aria-5" style="display:none"><div class="dropdown-menu_dropdownContainerInner__pVtz6"><ul class="dropdown-menu_itemGroup__GEq4r dropdown-menu_twoColumns__Q_mWF"><li><a class="dropdown-menu_itemLink__92M_R g-focus-ring-from-box-shadow" href="/terraform/docs"><div class="dropdown-menu_itemLinkContent__PATCl"><div class="dropdown-menu_leftAlignedItemLinkContent__d9pe_"><span class="dropdown-menu_leftAlignedItemLinkContentIcon__Im2L5 primary-nav-submenu_primarySubnavDropdownItemIcon__yZ84X terraform"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" fill-rule="evenodd" d="M4.25 1A2.25 2.25 0 002 3.25v9.5A2.25 2.25 0 004.25 15h8.5c.69 0 1.25-.56 1.25-1.25V2.25C14 1.56 13.44 1 12.75 1h-8.5zM3.5 12.75c0 .414.336.75.75.75h8.25v-2H4.25a.75.75 0 00-.75.75v.5zm0-2.622c.235-.083.487-.128.75-.128h8.25V2.5H4.25a.75.75 0 00-.75.75v6.878z" clip-rule="evenodd"></path></svg></span><span class="text_root__r0DFB hds-typography-body-100 hds-font-weight-regular dropdown-menu_itemText__Ba9wg">Docs Overview</span></div></div></a></li><li><a class="dropdown-menu_itemLink__92M_R g-focus-ring-from-box-shadow" href="/terraform/intro"><div class="dropdown-menu_itemLinkContent__PATCl"><div class="dropdown-menu_leftAlignedItemLinkContent__d9pe_"><span class="dropdown-menu_leftAlignedItemLinkContentIcon__Im2L5 primary-nav-submenu_primarySubnavDropdownItemIcon__yZ84X terraform"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" fill-rule="evenodd" d="M4.25 1A2.25 2.25 0 002 3.25v9.5A2.25 2.25 0 004.25 15h8.5c.69 0 1.25-.56 1.25-1.25V2.25C14 1.56 13.44 1 12.75 1h-8.5zM3.5 12.75c0 .414.336.75.75.75h8.25v-2H4.25a.75.75 0 00-.75.75v.5zm0-2.622c.235-.083.487-.128.75-.128h8.25V2.5H4.25a.75.75 0 00-.75.75v6.878z" clip-rule="evenodd"></path></svg></span><span class="text_root__r0DFB hds-typography-body-100 hds-font-weight-regular dropdown-menu_itemText__Ba9wg">Intro to Terraform</span></div></div></a></li><li><a class="dropdown-menu_itemLink__92M_R g-focus-ring-from-box-shadow" href="/terraform/language"><div class="dropdown-menu_itemLinkContent__PATCl"><div class="dropdown-menu_leftAlignedItemLinkContent__d9pe_"><span class="dropdown-menu_leftAlignedItemLinkContentIcon__Im2L5 primary-nav-submenu_primarySubnavDropdownItemIcon__yZ84X terraform"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><g fill="currentColor"><path d="M7.22 7.838a.625.625 0 01-.058.882L5.699 10l1.463 1.28a.625.625 0 01-.824.94l-2-1.75a.625.625 0 010-.94l2-1.75a.625.625 0 01.882.058zM8.838 8.72a.625.625 0 01.824-.94l2 1.75a.625.625 0 010 .94l-2 1.75a.625.625 0 01-.824-.94L10.301 10 8.838 8.72z"></path><path fill-rule="evenodd" d="M3.25 0A2.25 2.25 0 001 2.25v11.5A2.25 2.25 0 003.25 16h9.5A2.25 2.25 0 0015 13.75V5.457c0-.331-.132-.65-.366-.884L10.427.366A1.25 1.25 0 009.543 0H3.25zM2.5 2.25a.75.75 0 01.75-.75H9v3.75c0 .414.336.75.75.75h3.75v7.75a.75.75 0 01-.75.75h-9.5a.75.75 0 01-.75-.75V2.25zm9.94 2.25L10.5 2.56V4.5h1.94z" clip-rule="evenodd"></path></g></svg></span><span class="text_root__r0DFB hds-typography-body-100 hds-font-weight-regular dropdown-menu_itemText__Ba9wg">Configuration Language</span></div></div></a></li><li><a class="dropdown-menu_itemLink__92M_R g-focus-ring-from-box-shadow" href="/terraform/cli"><div class="dropdown-menu_itemLinkContent__PATCl"><div class="dropdown-menu_leftAlignedItemLinkContent__d9pe_"><span class="dropdown-menu_leftAlignedItemLinkContentIcon__Im2L5 primary-nav-submenu_primarySubnavDropdownItemIcon__yZ84X terraform"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><g fill="currentColor"><path d="M3.924 5.02a.75.75 0 011.056-.096l3 2.5a.75.75 0 010 1.152l-3 2.5a.75.75 0 11-.96-1.152L6.328 8 4.02 6.076a.75.75 0 01-.096-1.056zM8.25 10.5a.75.75 0 000 1.5h3a.75.75 0 000-1.5h-3z"></path><path fill-rule="evenodd" d="M0 3.25A2.25 2.25 0 012.25 1h11.5A2.25 2.25 0 0116 3.25v9.5A2.25 2.25 0 0113.75 15H2.25A2.25 2.25 0 010 12.75v-9.5zm2.25-.75a.75.75 0 00-.75.75v9.5c0 .414.336.75.75.75h11.5a.75.75 0 00.75-.75v-9.5a.75.75 0 00-.75-.75H2.25z" clip-rule="evenodd"></path></g></svg></span><span class="text_root__r0DFB hds-typography-body-100 hds-font-weight-regular dropdown-menu_itemText__Ba9wg">Terraform CLI</span></div></div></a></li><li><a class="dropdown-menu_itemLink__92M_R g-focus-ring-from-box-shadow" href="/terraform/cloud-docs"><div class="dropdown-menu_itemLinkContent__PATCl"><div class="dropdown-menu_leftAlignedItemLinkContent__d9pe_"><span class="dropdown-menu_leftAlignedItemLinkContentIcon__Im2L5 primary-nav-submenu_primarySubnavDropdownItemIcon__yZ84X terraform"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" fill-rule="evenodd" d="M3.932 2.373a6.041 6.041 0 016.239 1.28 5.998 5.998 0 011.505 2.284h.28c1.071 0 2.1.424 2.858 1.18a4.025 4.025 0 010 5.703A4.051 4.051 0 0111.955 14H6.026a6.037 6.037 0 01-3.186-.906 6.008 6.008 0 01-2.223-2.448 5.982 5.982 0 01.644-6.32 6.02 6.02 0 012.67-1.953zm.526 1.405a4.52 4.52 0 00-2.013 1.47 4.488 4.488 0 001.186 6.572c.716.444 1.542.68 2.386.68h5.938c.676 0 1.324-.268 1.8-.742a2.524 2.524 0 000-3.578 2.551 2.551 0 00-1.8-.743h-.83a.75.75 0 01-.726-.561A4.496 4.496 0 009.14 4.74a4.541 4.541 0 00-4.681-.963z" clip-rule="evenodd"></path></svg></span><span class="text_root__r0DFB hds-typography-body-100 hds-font-weight-regular dropdown-menu_itemText__Ba9wg">HCP Terraform</span></div></div></a></li><li><a class="dropdown-menu_itemLink__92M_R g-focus-ring-from-box-shadow" href="/terraform/enterprise"><div class="dropdown-menu_itemLinkContent__PATCl"><div class="dropdown-menu_leftAlignedItemLinkContent__d9pe_"><span class="dropdown-menu_leftAlignedItemLinkContentIcon__Im2L5 primary-nav-submenu_primarySubnavDropdownItemIcon__yZ84X terraform"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><g fill="currentColor"><path fill-rule="evenodd" d="M1 3.25A2.25 2.25 0 013.25 1h6.5A2.25 2.25 0 0112 3.25v2.112l2.05 1.453A2.25 2.25 0 0115 8.65v5.1c0 .69-.56 1.25-1.25 1.25h-2.5a.748.748 0 01-.75-.751v-11a.75.75 0 00-.75-.75h-6.5a.75.75 0 00-.75.75v11a.75.75 0 01-1.5 0v-11zM12 13.5V7.2l1.184.839a.75.75 0 01.316.612v4.85H12z" clip-rule="evenodd"></path><path d="M4.75 10.55a.7.7 0 00-.7.7v3a.7.7 0 101.4 0v-2.3h2.1v2.3a.7.7 0 101.4 0v-3a.7.7 0 00-.7-.7h-3.5zM4.25 4.75A.75.75 0 015 4h.25a.75.75 0 010 1.5H5a.75.75 0 01-.75-.75zM7.75 4a.75.75 0 000 1.5H8A.75.75 0 008 4h-.25zM4.25 6.75A.75.75 0 015 6h.25a.75.75 0 010 1.5H5a.75.75 0 01-.75-.75zM7.75 6a.75.75 0 000 1.5H8A.75.75 0 008 6h-.25zM4.25 8.75A.75.75 0 015 8h.25a.75.75 0 010 1.5H5a.75.75 0 01-.75-.75zM7.75 8a.75.75 0 000 1.5H8A.75.75 0 008 8h-.25z"></path></g></svg></span><span class="text_root__r0DFB hds-typography-body-100 hds-font-weight-regular dropdown-menu_itemText__Ba9wg">Terraform Enterprise</span></div></div></a></li><li><a aria-current="page" class="dropdown-menu_itemLink__92M_R g-focus-ring-from-box-shadow" href="/terraform/cdktf"><div class="dropdown-menu_itemLinkContent__PATCl"><div class="dropdown-menu_leftAlignedItemLinkContent__d9pe_"><span class="dropdown-menu_leftAlignedItemLinkContentIcon__Im2L5 primary-nav-submenu_primarySubnavDropdownItemIcon__yZ84X terraform"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><g fill="currentColor"><path d="M9.424 2.02a.75.75 0 00-.904.556l-2.5 10.5a.75.75 0 001.46.348l2.5-10.5a.75.75 0 00-.556-.904zM11.2 4.24a.75.75 0 011.06-.04l3.5 3.25a.75.75 0 010 1.1l-3.5 3.25a.75.75 0 11-1.02-1.1L14.148 8 11.24 5.3a.75.75 0 01-.04-1.06zM4.76 5.3a.75.75 0 00-1.02-1.1L.24 7.45a.75.75 0 000 1.1l3.5 3.25a.75.75 0 101.02-1.1L1.852 8 4.76 5.3z"></path></g></svg></span><span class="text_root__r0DFB hds-typography-body-100 hds-font-weight-regular dropdown-menu_itemText__Ba9wg">CDK for Terraform</span></div></div></a></li><li><a class="dropdown-menu_itemLink__92M_R g-focus-ring-from-box-shadow" href="/terraform/language/providers"><div class="dropdown-menu_itemLinkContent__PATCl"><div class="dropdown-menu_leftAlignedItemLinkContent__d9pe_"><span class="dropdown-menu_leftAlignedItemLinkContentIcon__Im2L5 primary-nav-submenu_primarySubnavDropdownItemIcon__yZ84X terraform"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" fill-rule="evenodd" d="M8 0a8 8 0 100 16A8 8 0 008 0zm-.5 1.519a6.464 6.464 0 00-2 .48V5.19l2-1.09V1.518zM1.532 7.356A6.491 6.491 0 014 2.876V6.01L1.532 7.356zm.05 1.68L4 7.719v5.406a6.495 6.495 0 01-2.418-4.087zM7.5 11.423l-2 1.143V6.9l2-1.091v5.613zm1.5-.857V4.991L11 3.9v5.522l-2 1.143zm2 .585l-2 1.143v2.13a6.456 6.456 0 002-.655V11.15zm1.5 1.54v-2.397l1.887-1.079A6.488 6.488 0 0112.5 12.69zm0-4.125V3.31a6.482 6.482 0 011.976 4.126L12.5 8.565zm-5 4.585l-1.697.97a6.47 6.47 0 001.697.361V13.15zM9 3.282V1.576a6.455 6.455 0 011.961.636L9 3.282z" clip-rule="evenodd"></path></svg></span><span class="text_root__r0DFB hds-typography-body-100 hds-font-weight-regular dropdown-menu_itemText__Ba9wg">Provider Use</span></div></div></a></li><li><a class="dropdown-menu_itemLink__92M_R g-focus-ring-from-box-shadow" href="/terraform/plugin"><div class="dropdown-menu_itemLinkContent__PATCl"><div class="dropdown-menu_leftAlignedItemLinkContent__d9pe_"><span class="dropdown-menu_leftAlignedItemLinkContentIcon__Im2L5 primary-nav-submenu_primarySubnavDropdownItemIcon__yZ84X terraform"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" fill-rule="evenodd" d="M10.973 1.506a18.567 18.567 0 00-.497-.006A4.024 4.024 0 006.45 5.524c0 .43.095.865.199 1.205.054.18.116.356.192.527v.002a.75.75 0 01-.15.848l-4.937 4.911a.871.871 0 000 1.229.868.868 0 001.227 0L7.896 9.31a.75.75 0 01.847-.151c.17.079.35.139.528.193.34.103.775.198 1.205.198A4.024 4.024 0 0014.5 5.524c0-.177-.002-.338-.006-.483-.208.25-.438.517-.675.774-.32.345-.677.696-1.048.964-.354.257-.82.511-1.339.511-.396 0-.776-.155-1.059-.432L9.142 5.627a1.513 1.513 0 01-.433-1.06c0-.52.257-.985.515-1.34.27-.37.623-.727.97-1.046.258-.237.529-.466.78-.675zm-2.36 9.209l-4.57 4.59A2.37 2.37 0 010 13.633c0-.629.25-1.231.694-1.675v-.001l4.592-4.568a6.887 6.887 0 01-.072-.223 5.77 5.77 0 01-.263-1.64A5.524 5.524 0 0110.476 0c.675 0 1.167.028 1.525.076.331.044.64.115.873.264a.92.92 0 01.374.45.843.843 0 01-.013.625.921.921 0 01-.241.332c-.26.257-.547.487-.829.72-.315.26-.647.535-.957.82a5.953 5.953 0 00-.771.824c-.197.27-.227.415-.227.457 0 .003 0 .006.003.008l1.21 1.211a.013.013 0 00.01.003c.042 0 .189-.03.459-.226.253-.183.532-.45.826-.767.284-.308.56-.638.82-.951.233-.28.463-.564.72-.822a.926.926 0 01.31-.235.841.841 0 01.628-.033.91.91 0 01.467.376c.15.233.22.543.262.87.047.356.075.847.075 1.522a5.524 5.524 0 01-5.524 5.525c-.631 0-1.221-.136-1.64-.263a6.731 6.731 0 01-.222-.071z" clip-rule="evenodd"></path></svg></span><span class="text_root__r0DFB hds-typography-body-100 hds-font-weight-regular dropdown-menu_itemText__Ba9wg">Plugin Development</span></div></div></a></li><li><a class="dropdown-menu_itemLink__92M_R g-focus-ring-from-box-shadow" href="/terraform/registry"><div class="dropdown-menu_itemLinkContent__PATCl"><div class="dropdown-menu_leftAlignedItemLinkContent__d9pe_"><span class="dropdown-menu_leftAlignedItemLinkContentIcon__Im2L5 primary-nav-submenu_primarySubnavDropdownItemIcon__yZ84X terraform"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><g fill="currentColor"><path d="M8 4.25a.75.75 0 01.75.75v2.25H11a.75.75 0 010 1.5H8.75V11a.75.75 0 01-1.5 0V8.75H5a.75.75 0 010-1.5h2.25V5A.75.75 0 018 4.25z"></path><path fill-rule="evenodd" d="M0 8a8 8 0 1116 0A8 8 0 010 8zm8-6.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13z" clip-rule="evenodd"></path></g></svg></span><span class="text_root__r0DFB hds-typography-body-100 hds-font-weight-regular dropdown-menu_itemText__Ba9wg">Registry Publishing</span></div></div></a></li><li><a class="dropdown-menu_itemLink__92M_R g-focus-ring-from-box-shadow" href="/terraform/docs/partnerships"><div class="dropdown-menu_itemLinkContent__PATCl"><div class="dropdown-menu_leftAlignedItemLinkContent__d9pe_"><span class="dropdown-menu_leftAlignedItemLinkContentIcon__Im2L5 primary-nav-submenu_primarySubnavDropdownItemIcon__yZ84X terraform"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><g fill="currentColor"><path fill-rule="evenodd" d="M5 2.75a.75.75 0 00-.53.22l-.78.78H.75a.75.75 0 000 1.5H2v5a.75.75 0 01-.75.75h-.5a.75.75 0 000 1.5h.5a2.25 2.25 0 002.016-1.25h.557l3.063 1.531a2.25 2.25 0 002.254-.14l2.087-1.391h1.507a2.25 2.25 0 002.016 1.25h.5a.75.75 0 000-1.5h-.5a.75.75 0 01-.75-.75v-5h1.25a.75.75 0 000-1.5h-2.94l-.78-.78a.75.75 0 00-.53-.22H5zm-1 2.5h-.5v4.5H4a.75.75 0 01.335.08l3.222 1.61a.75.75 0 00.751-.047l1.652-1.101-.584-.876a.75.75 0 011.248-.832l.777 1.166H12.5v-4.5H12a.75.75 0 01-.53-.22l-.78-.78H8.81L7.065 5.997a.711.711 0 00.971 1.038l.971-.85a.75.75 0 11.988 1.13l-.971.85a2.211 2.211 0 01-3.02-3.229l.686-.686H5.311l-.78.78A.75.75 0 014 5.25z" clip-rule="evenodd"></path><path d="M1.25 9.625a.625.625 0 11-1.25 0 .625.625 0 011.25 0zM16 9.625a.625.625 0 11-1.25 0 .625.625 0 011.25 0z"></path></g></svg></span><span class="text_root__r0DFB hds-typography-body-100 hds-font-weight-regular dropdown-menu_itemText__Ba9wg">Integration Program</span></div></div></a></li></ul></div></div></div></li><li><a aria-label="Terraform Registry" class="primary-nav-link_root__RXZIC g-focus-ring-from-box-shadow-dark" aria-describedby="opens-in-new-tab-label-react-aria-17" target="_blank" href="https://registry.terraform.io/"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium primary-nav-link_linkText__58O0C">Registry</span><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><g fill="currentColor"><path d="M9 .75A.75.75 0 019.75 0h4.5c.206 0 .393.083.529.218l.001.002.002.001A.748.748 0 0115 .75v4.5a.75.75 0 01-1.5 0V2.56L7.28 8.78a.75.75 0 01-1.06-1.06l6.22-6.22H9.75A.75.75 0 019 .75z"></path><path d="M3.25 3.5a.75.75 0 00-.75.75v7.5c0 .414.336.75.75.75h7.5a.75.75 0 00.75-.75v-4a.75.75 0 011.5 0v4A2.25 2.25 0 0110.75 14h-7.5A2.25 2.25 0 011 11.75v-7.5A2.25 2.25 0 013.25 2h4a.75.75 0 010 1.5h-4z"></path></g></svg></a><span class="g-screen-reader-only" id="opens-in-new-tab-label-react-aria-17">(opens in new tab)</span></li><li><a aria-label="Terraform Try Cloud" class="primary-nav-link_root__RXZIC g-focus-ring-from-box-shadow-dark" aria-describedby="opens-in-new-tab-label-react-aria-18" target="_blank" href="https://app.terraform.io/public/signup/account"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium primary-nav-link_linkText__58O0C">Try Cloud</span><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><g fill="currentColor"><path d="M9 .75A.75.75 0 019.75 0h4.5c.206 0 .393.083.529.218l.001.002.002.001A.748.748 0 0115 .75v4.5a.75.75 0 01-1.5 0V2.56L7.28 8.78a.75.75 0 01-1.06-1.06l6.22-6.22H9.75A.75.75 0 019 .75z"></path><path d="M3.25 3.5a.75.75 0 00-.75.75v7.5c0 .414.336.75.75.75h7.5a.75.75 0 00.75-.75v-4a.75.75 0 011.5 0v4A2.25 2.25 0 0110.75 14h-7.5A2.25 2.25 0 011 11.75v-7.5A2.25 2.25 0 013.25 2h4a.75.75 0 010 1.5h-4z"></path></g></svg></a><span class="g-screen-reader-only" id="opens-in-new-tab-label-react-aria-18">(opens in new tab)</span></li></ul></div></nav></div></div><div class="navigation-header_rightSide___Vvh_"><button aria-label="Search" class="command-bar-activator_root__qgVMy g-focus-ring-from-box-shadow-dark"><span class="command-bar-activator_left__ATQTg"><span class="command-bar-activator_leadingIcon__jECP5"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" fill-rule="evenodd" d="M6.344.969a5.375 5.375 0 103.233 9.669l4.174 4.174a.75.75 0 001.06-1.061l-4.173-4.174A5.375 5.375 0 006.344.97zM2.469 6.344a3.875 3.875 0 117.75 0 3.875 3.875 0 01-7.75 0z" clip-rule="evenodd"></path></svg></span><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular command-bar-activator_text__pTZN_">Search</span></span><span class="command-bar-activator_right__XejfJ"><span class="g-screen-reader-only">Command or control key</span><span aria-hidden="true" class="badge_root___Z7Nt badge_small__GI0Zk badge_filled-neutral-dark-mode__VC3Ba command-bar-activator_keyBadge__xnKpi"><div class="cmd-ctrl-icon_root___TToz"><svg xmlns="http://www.w3.org/2000/svg" width="41" height="11" fill="none" viewBox="0 0 41 11"><path fill="#fff" fill-rule="evenodd" d="M4.125 2.063V3h2.25v-.937a2.062 2.062 0 1 1 2.063 2.062H7.5v2.25h.938a2.062 2.062 0 1 1-2.063 2.063V7.5h-2.25v.938a2.062 2.062 0 1 1-2.062-2.063H3v-2.25h-.937a2.062 2.062 0 1 1 2.062-2.062m-2.062-.938a.937.937 0 1 0 0 1.875H3v-.937a.937.937 0 0 0-.937-.938M7.5 7.5v.938a.937.937 0 1 0 .938-.938zM6.375 6.375v-2.25h-2.25v2.25zM2.063 7.5H3v.938a.937.937 0 1 1-.937-.938M7.5 3h.938a.937.937 0 1 0-.938-.937z" clip-rule="evenodd"/><path fill="#fff" d="M15.09 10.5 18.085 0h-1.097L14 10.5zM26.387 5.308c-.183-1.445-1.263-2.534-3.05-2.534C21.264 2.774 20 4.247 20 6.61c0 2.41 1.27 3.89 3.344 3.89 1.76 0 2.86-1.034 3.043-2.5H25.02c-.184.808-.792 1.247-1.682 1.247-1.172 0-1.898-.994-1.898-2.637 0-1.61.72-2.583 1.898-2.583.942 0 1.518.555 1.681 1.281zM28.6 1.041v1.897h-1.133v1.178H28.6v4.281c0 1.432.622 2.007 2.186 2.007.275 0 .537-.034.766-.075V9.158c-.196.02-.32.034-.537.034-.7 0-1.008-.35-1.008-1.15V4.115h1.545V2.938h-1.545V1.041zM33.207 10.356h1.407V5.911c0-1.048.752-1.767 1.819-1.767.249 0 .667.048.785.082V2.842a3.372 3.372 0 0 0-.628-.054c-.93 0-1.721.527-1.924 1.26h-.105v-1.13h-1.354zM38.638 10.356h1.407V0h-1.407z"/></svg></div></span><span class="g-screen-reader-only">K key</span><span aria-hidden="true" class="badge_root___Z7Nt badge_small__GI0Zk badge_filled-neutral-dark-mode__VC3Ba command-bar-activator_keyBadge__xnKpi"><div class="k-icon_root__a_5pR"><svg xmlns="http://www.w3.org/2000/svg" width="8" height="10" fill="none" viewBox="0 0 8 10"><path fill="#fff" d="M1.512 9.84v-3l.986-1.147L5.445 9.84h1.704L3.46 4.745 6.857.84H5.244L1.61 5.094h-.098V.84H.15v9z"/></svg></div></span></span></button><div class="navigation-header_authenticationControls__EP1LY"><div class="disclosure_root__rcBaW dropdown-disclosure_root__pzZlN dropdown-disclosure_list-position--right__WP_Kj"><button aria-controls="disclosure-react-aria-19-content" aria-expanded="false" aria-label="User menu" class="disclosure_activator__pORI0 activator_root__pOfAQ dropdown-disclosure_activator__nGgNo navigation-header_userDropdownDisclosureActivator__RayIV g-focus-ring-from-box-shadow-dark activator_hasIcon__5HO6W g-focus-ring-from-box-shadow"><span class="activator_childrenWrapper__kaK0w"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24" aria-hidden="true"><g fill="currentColor"><path fill-rule="evenodd" d="M12 3a5 5 0 100 10 5 5 0 000-10zM8.5 8a3.5 3.5 0 117 0 3.5 3.5 0 01-7 0z" clip-rule="evenodd"></path><path d="M7.75 14.5A4.75 4.75 0 003 19.25v1a.75.75 0 001.5 0v-1A3.25 3.25 0 017.75 16h8.5a3.25 3.25 0 013.25 3.25v1a.75.75 0 001.5 0v-1a4.75 4.75 0 00-4.75-4.75h-8.5z"></path></g></svg></span><span class="activator_chevronWrapper__4_AVG"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" fill-rule="evenodd" d="M3.235 5.205a.75.75 0 011.06.03L8 9.158l3.705-3.923a.75.75 0 011.09 1.03l-4.25 4.5a.75.75 0 01-1.09 0l-4.25-4.5a.75.75 0 01.03-1.06z" clip-rule="evenodd"></path></svg></span></button><div class="disclosure_contentContainer__QQ4kt dropdown-disclosure_content__ZZRPG undefined" id="disclosure-react-aria-19-content"><ul class="dropdown-disclosure_list__urBXU"><li class="list-item_root__ZdUej"><button class="list-item_button__nXy5K g-focus-ring-from-box-shadow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">Sign in</span></button></li><li class="list-item_root__ZdUej"><a class="list-item_link__l6lDd g-focus-ring-from-box-shadow" href="/sign-up"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">Sign up</span></a></li><li class="list-item_root__ZdUej"><hr class="list-item_separator__cBVLs"/></li><li class="list-item_root__ZdUej user-dropdown-switcher_listItem__Q_GIj hds-font-weight-medium"><label class="theme-switcher_label__7Boh2 hds-typography-body-200" for="react-aria-21">Theme</label></li></ul></div></div></div><button aria-label="Open navigation menu" class="navigation-header_mobileMenuButton__74S4w"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24" aria-hidden="true"><g fill="currentColor"><path d="M2 5.75A.75.75 0 012.75 5h18.5a.75.75 0 010 1.5H2.75A.75.75 0 012 5.75zM2 11.75a.75.75 0 01.75-.75h18.5a.75.75 0 010 1.5H2.75a.75.75 0 01-.75-.75zM2.75 17a.75.75 0 000 1.5h18.5a.75.75 0 000-1.5H2.75z"></path></g></svg></button></div></header></div><div class="base-layout_contentArea__BMvQn"><div class="sidebar-sidecar-layout_root__h5rD8 sidebar-sidecar-layout_mainWidth-narrow__FhCbs"><div class="mobile-menu-container_root__fPUFu sidebar-sidecar-layout_sidebarContainer__4fcF8"><div class="sidebar-sidecar-layout_sidebarContentWrapper__ftn5q"><div class="sidebar-sidecar-layout_sidePadding__iwNw_"><div class="sidebar_sidebar___fTlC"><div class="sidebar_backToLinkWrapper__F6iLs"><div class="sidebar-back-to-link_root__z_Hj1"><a class="standalone-link_standaloneLink__ahuej g-focus-ring-from-box-shadow standalone-link_primary__ESNCA" href="/terraform"><div class="standalone-link_standaloneLinkContents__4I2XN standalone-link_medium__J2yVM"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" fill-rule="evenodd" d="M10.795 3.235a.75.75 0 01-.03 1.06L6.842 8l3.923 3.705a.75.75 0 01-1.03 1.09l-4.5-4.25a.75.75 0 010-1.09l4.5-4.25a.75.75 0 011.06.03z" clip-rule="evenodd"></path></svg><span class="standalone-link_text__7GEyG">Terraform Home</span></div></a></div></div><div class="sidebar_filterInputWrapper__0_l_Y"><div class="filter-input_filterInputContainer__thZt3"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true" class="filter-input_filterIcon__UET0p filter-input_sharedIconColorAndPositioning__hXPit"><g fill="currentColor"><path d="M1 3.75A.75.75 0 011.75 3h12.5a.75.75 0 010 1.5H1.75A.75.75 0 011 3.75zM3.5 7.75A.75.75 0 014.25 7h7.5a.75.75 0 010 1.5h-7.5a.75.75 0 01-.75-.75zM6.75 11a.75.75 0 000 1.5h2.5a.75.75 0 000-1.5h-2.5z"></path></g></svg><input class="filter-input_filterInput__hga4N g-focus-ring-from-box-shadow" placeholder="Filter sidebar" autoComplete="off" autoCorrect="off" autoCapitalize="none" spellcheck="false" value=""/></div></div><nav aria-labelledby="sidebar-label" class="sidebar_nav__IworY" id="sidebar-nav"><div class="g-screen-reader-only"><h2 class="sidebar-headings_root__tGfxC" id="sidebar-label">CDK for Terraform</h2></div><ul class="sidebar_navList__4Rg4g"><li><a aria-current="page" class="sidebar-nav-highlight-item_root___pPhp g-focus-ring-from-box-shadow sidebar-nav-highlight-item_theme-terraform__LHqSi" href="/terraform/cdktf"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true" class="sidebar-nav-highlight-item_icon__G8JxG"><g fill="var(--token-color-terraform-brand)"><path d="M1 0v5.05l4.349 2.527V2.526L1 0zM10.175 5.344l-4.35-2.525v5.05l4.35 2.527V5.344zM10.651 10.396V5.344L15 2.819v5.05l-4.349 2.527zM10.174 16l-4.349-2.526v-5.05l4.349 2.525V16z"></path></g></svg><span class="sidebar-nav-highlight-item_text__VORFJ hds-typography-body-200">CDK for Terraform</span></a></li><li id="sidebar-nav-item-2"><a class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" href="/terraform/tutorials/cdktf/cdktf-install"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Get Started</span></a></li><li id="sidebar-nav-item-3"><button class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" id="sidebar-nav-item-3-button"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Concepts</span><div class="sidebar-nav-menu-item_rightIconsContainer__hynke"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" fill-rule="evenodd" d="M3.235 5.205a.75.75 0 011.06.03L8 9.158l3.705-3.923a.75.75 0 011.09 1.03l-4.25 4.5a.75.75 0 01-1.09 0l-4.25-4.5a.75.75 0 01.03-1.06z" clip-rule="evenodd"></path></svg></div></button></li><li id="sidebar-nav-item-19"><button class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" id="sidebar-nav-item-19-button"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Examples and Guides</span><div class="sidebar-nav-menu-item_rightIconsContainer__hynke"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" fill-rule="evenodd" d="M3.235 5.205a.75.75 0 011.06.03L8 9.158l3.705-3.923a.75.75 0 011.09 1.03l-4.25 4.5a.75.75 0 01-1.09 0l-4.25-4.5a.75.75 0 01.03-1.06z" clip-rule="evenodd"></path></svg></div></button></li><li id="sidebar-nav-item-22"><button class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" id="sidebar-nav-item-22-button"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Create and Deploy Applications</span><div class="sidebar-nav-menu-item_rightIconsContainer__hynke"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" fill-rule="evenodd" d="M3.235 5.205a.75.75 0 011.06.03L8 9.158l3.705-3.923a.75.75 0 011.09 1.03l-4.25 4.5a.75.75 0 01-1.09 0l-4.25-4.5a.75.75 0 01.03-1.06z" clip-rule="evenodd"></path></svg></div></button></li><li id="sidebar-nav-item-32"><button class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" id="sidebar-nav-item-32-button"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Develop Custom Constructs</span><div class="sidebar-nav-menu-item_rightIconsContainer__hynke"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" fill-rule="evenodd" d="M3.235 5.205a.75.75 0 011.06.03L8 9.158l3.705-3.923a.75.75 0 011.09 1.03l-4.25 4.5a.75.75 0 01-1.09 0l-4.25-4.5a.75.75 0 01.03-1.06z" clip-rule="evenodd"></path></svg></div></button></li><li id="sidebar-nav-item-35"><button class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" id="sidebar-nav-item-35-button"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Test and Debug</span><div class="sidebar-nav-menu-item_rightIconsContainer__hynke"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" fill-rule="evenodd" d="M3.235 5.205a.75.75 0 011.06.03L8 9.158l3.705-3.923a.75.75 0 011.09 1.03l-4.25 4.5a.75.75 0 01-1.09 0l-4.25-4.5a.75.75 0 01.03-1.06z" clip-rule="evenodd"></path></svg></div></button></li><li id="sidebar-nav-item-38"><button class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" id="sidebar-nav-item-38-button"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">CLI Reference</span><div class="sidebar-nav-menu-item_rightIconsContainer__hynke"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" fill-rule="evenodd" d="M3.235 5.205a.75.75 0 011.06.03L8 9.158l3.705-3.923a.75.75 0 011.09 1.03l-4.25 4.5a.75.75 0 01-1.09 0l-4.25-4.5a.75.75 0 01.03-1.06z" clip-rule="evenodd"></path></svg></div></button></li><li id="sidebar-nav-item-41"><button class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" id="sidebar-nav-item-41-button"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">API Reference</span><div class="sidebar-nav-menu-item_rightIconsContainer__hynke"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" fill-rule="evenodd" d="M3.235 5.205a.75.75 0 011.06.03L8 9.158l3.705-3.923a.75.75 0 011.09 1.03l-4.25 4.5a.75.75 0 01-1.09 0l-4.25-4.5a.75.75 0 01.03-1.06z" clip-rule="evenodd"></path></svg></div></button></li><li id="sidebar-nav-item-79"><button class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" id="sidebar-nav-item-79-button"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Release</span><div class="sidebar-nav-menu-item_rightIconsContainer__hynke"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" fill-rule="evenodd" d="M3.235 5.205a.75.75 0 011.06.03L8 9.158l3.705-3.923a.75.75 0 011.09 1.03l-4.25 4.5a.75.75 0 01-1.09 0l-4.25-4.5a.75.75 0 01.03-1.06z" clip-rule="evenodd"></path></svg></div></button></li><li id="sidebar-nav-item-92"><a class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" href="/terraform/cdktf/community"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Community</span></a></li><li id="sidebar-nav-item-93"><a class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" href="/terraform/cdktf/telemetry"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Telemetry</span></a></li></ul><hr class="sidebar-horizontal-rule_root__UY7oh"/><ul class="sidebar_navList__4Rg4g"><li><h3 class="sidebar-headings_root__tGfxC">Resources</h3></li><li><a class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" href="/tutorials/library?product=terraform"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Tutorial Library</span></a></li><li><a class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" href="/certifications/infrastructure-automation"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Certifications</span></a></li><li><a aria-label="Community Forum. Opens in a new tab." class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" rel="noreferrer noopener" aria-describedby="opens-in-new-tab-label-react-aria-29" target="_blank" href="https://discuss.hashicorp.com/c/terraform-core/27"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Community Forum</span><div class="sidebar-nav-menu-item_rightIconsContainer__hynke"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><g fill="currentColor"><path d="M9 .75A.75.75 0 019.75 0h4.5c.206 0 .393.083.529.218l.001.002.002.001A.748.748 0 0115 .75v4.5a.75.75 0 01-1.5 0V2.56L7.28 8.78a.75.75 0 01-1.06-1.06l6.22-6.22H9.75A.75.75 0 019 .75z"></path><path d="M3.25 3.5a.75.75 0 00-.75.75v7.5c0 .414.336.75.75.75h7.5a.75.75 0 00.75-.75v-4a.75.75 0 011.5 0v4A2.25 2.25 0 0110.75 14h-7.5A2.25 2.25 0 011 11.75v-7.5A2.25 2.25 0 013.25 2h4a.75.75 0 010 1.5h-4z"></path></g></svg></div></a><span class="g-screen-reader-only" id="opens-in-new-tab-label-react-aria-29">(opens in new tab)</span></li><li><a aria-label="Support. Opens in a new tab." class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" rel="noreferrer noopener" aria-describedby="opens-in-new-tab-label-react-aria-30" target="_blank" href="https://www.hashicorp.com/customer-success"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Support</span><div class="sidebar-nav-menu-item_rightIconsContainer__hynke"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><g fill="currentColor"><path d="M9 .75A.75.75 0 019.75 0h4.5c.206 0 .393.083.529.218l.001.002.002.001A.748.748 0 0115 .75v4.5a.75.75 0 01-1.5 0V2.56L7.28 8.78a.75.75 0 01-1.06-1.06l6.22-6.22H9.75A.75.75 0 019 .75z"></path><path d="M3.25 3.5a.75.75 0 00-.75.75v7.5c0 .414.336.75.75.75h7.5a.75.75 0 00.75-.75v-4a.75.75 0 011.5 0v4A2.25 2.25 0 0110.75 14h-7.5A2.25 2.25 0 011 11.75v-7.5A2.25 2.25 0 013.25 2h4a.75.75 0 010 1.5h-4z"></path></g></svg></div></a><span class="g-screen-reader-only" id="opens-in-new-tab-label-react-aria-30">(opens in new tab)</span></li><li><a aria-label="GitHub. Opens in a new tab." class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" rel="noreferrer noopener" aria-describedby="opens-in-new-tab-label-react-aria-31" target="_blank" href="https://github.com/hashicorp/terraform"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">GitHub</span><div class="sidebar-nav-menu-item_rightIconsContainer__hynke"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><g fill="currentColor"><path d="M9 .75A.75.75 0 019.75 0h4.5c.206 0 .393.083.529.218l.001.002.002.001A.748.748 0 0115 .75v4.5a.75.75 0 01-1.5 0V2.56L7.28 8.78a.75.75 0 01-1.06-1.06l6.22-6.22H9.75A.75.75 0 019 .75z"></path><path d="M3.25 3.5a.75.75 0 00-.75.75v7.5c0 .414.336.75.75.75h7.5a.75.75 0 00.75-.75v-4a.75.75 0 011.5 0v4A2.25 2.25 0 0110.75 14h-7.5A2.25 2.25 0 011 11.75v-7.5A2.25 2.25 0 013.25 2h4a.75.75 0 010 1.5h-4z"></path></g></svg></div></a><span class="g-screen-reader-only" id="opens-in-new-tab-label-react-aria-31">(opens in new tab)</span></li><li><a aria-label="Terraform Registry. Opens in a new tab." class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" rel="noreferrer noopener" aria-describedby="opens-in-new-tab-label-react-aria-32" target="_blank" href="https://registry.terraform.io/"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Terraform Registry</span><div class="sidebar-nav-menu-item_rightIconsContainer__hynke"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><g fill="currentColor"><path d="M9 .75A.75.75 0 019.75 0h4.5c.206 0 .393.083.529.218l.001.002.002.001A.748.748 0 0115 .75v4.5a.75.75 0 01-1.5 0V2.56L7.28 8.78a.75.75 0 01-1.06-1.06l6.22-6.22H9.75A.75.75 0 019 .75z"></path><path d="M3.25 3.5a.75.75 0 00-.75.75v7.5c0 .414.336.75.75.75h7.5a.75.75 0 00.75-.75v-4a.75.75 0 011.5 0v4A2.25 2.25 0 0110.75 14h-7.5A2.25 2.25 0 011 11.75v-7.5A2.25 2.25 0 013.25 2h4a.75.75 0 010 1.5h-4z"></path></g></svg></div></a><span class="g-screen-reader-only" id="opens-in-new-tab-label-react-aria-32">(opens in new tab)</span></li></ul></nav></div></div></div></div><div class="sidebar-sidecar-layout_contentWrapper__Z5BK4"><div class="sidebar-sidecar-layout_paddedAreaWrapper___S_Ff"><div class="sidebar-sidecar-layout_breadcrumbContainer__3uz7P"><div class="sidebar-sidecar-layout_breadcrumbMaxWidth__coOcu"><nav aria-label="Breadcrumb" class="breadcrumb-bar_root__wd_C5"><ol class="breadcrumb-bar_listRoot__8eupO"><li class="text_root__r0DFB hds-typography-body-100 hds-font-weight-medium breadcrumb-bar_listItem__2sevd"><a class="breadcrumb-bar_breadcrumbText__JvOrd g-focus-ring-from-box-shadow" href="/">Developer</a></li><li class="text_root__r0DFB hds-typography-body-100 hds-font-weight-medium breadcrumb-bar_listItem__2sevd"><a class="breadcrumb-bar_breadcrumbText__JvOrd g-focus-ring-from-box-shadow" href="/terraform">Terraform</a></li><li class="text_root__r0DFB hds-typography-body-100 hds-font-weight-medium breadcrumb-bar_listItem__2sevd"><span class="breadcrumb-bar_breadcrumbText__JvOrd g-focus-ring-from-box-shadow" aria-current="page">CDK for Terraform</span></li></ol></nav></div></div><div class="sidebar-sidecar-layout_mainAndSidecar__UDm3Z"><main id="main" class="sidebar-sidecar-layout_main__0SN51"><div class="docs-page-heading_root__QuBg_ docs-view_docsPageHeading___xkrK docs-view_hasLandingHero__kcYld"><div class="docs-page-heading_versionSwitcherWrapper__bdlWl"><nav><div class="disclosure_root__rcBaW dropdown-disclosure_root__pzZlN dropdown-disclosure_list-position--right__WP_Kj version-switcher_root__5pTE6"><button aria-controls="disclosure-react-aria-35-content" aria-expanded="false" aria-label="Choose a CDK For Terraform version. Currently viewing v0.20.x (latest)." class="button_root__itF9E hds-font-weight-medium button_medium__Cm2eg button_secondary__m5f7i disclosure_activator__pORI0 activator_root__pOfAQ dropdown-disclosure_activator__nGgNo" type="button"><span>v0.20.x (latest)</span><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true" class="activator_chevronWrapper__4_AVG"><path fill="currentColor" fill-rule="evenodd" d="M3.235 5.205a.75.75 0 011.06.03L8 9.158l3.705-3.923a.75.75 0 011.09 1.03l-4.25 4.5a.75.75 0 01-1.09 0l-4.25-4.5a.75.75 0 01.03-1.06z" clip-rule="evenodd"></path></svg></button><div class="disclosure_contentContainer__QQ4kt dropdown-disclosure_content__ZZRPG undefined" id="disclosure-react-aria-35-content"><ul class="dropdown-disclosure_list__urBXU"><li class="list-item_root__ZdUej"><span class="text_root__r0DFB hds-typography-body-100 hds-font-weight-semibold list-item_label__9AZsc">CDK For Terraform</span></li><li class="list-item_root__ZdUej"><a class="list-item_link__l6lDd g-focus-ring-from-box-shadow" href="/terraform/cdktf/v0.19.x" rel="nofollow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">v0.19.x</span></a></li><li class="list-item_root__ZdUej"><a class="list-item_link__l6lDd g-focus-ring-from-box-shadow" href="/terraform/cdktf/v0.18.x" rel="nofollow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">v0.18.x</span></a></li><li class="list-item_root__ZdUej"><a class="list-item_link__l6lDd g-focus-ring-from-box-shadow" href="/terraform/cdktf/v0.17.x" rel="nofollow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">v0.17.x</span></a></li><li class="list-item_root__ZdUej"><a class="list-item_link__l6lDd g-focus-ring-from-box-shadow" href="/terraform/cdktf/v0.16.x" rel="nofollow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">v0.16.x</span></a></li><li class="list-item_root__ZdUej"><a class="list-item_link__l6lDd g-focus-ring-from-box-shadow" href="/terraform/cdktf/v0.15.x" rel="nofollow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">v0.15.x</span></a></li><li class="list-item_root__ZdUej"><a class="list-item_link__l6lDd g-focus-ring-from-box-shadow" href="/terraform/cdktf/v0.14.x" rel="nofollow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">v0.14.x</span></a></li><li class="list-item_root__ZdUej"><a class="list-item_link__l6lDd g-focus-ring-from-box-shadow" href="/terraform/cdktf/v0.13.x" rel="nofollow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">v0.13.x</span></a></li><li class="list-item_root__ZdUej"><a class="list-item_link__l6lDd g-focus-ring-from-box-shadow" href="/terraform/cdktf/v0.12.x" rel="nofollow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">v0.12.x</span></a></li><li class="list-item_root__ZdUej"><a class="list-item_link__l6lDd g-focus-ring-from-box-shadow" href="/terraform/cdktf/v0.11.x" rel="nofollow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">v0.11.x</span></a></li><li class="list-item_root__ZdUej"><a class="list-item_link__l6lDd g-focus-ring-from-box-shadow" href="/terraform/cdktf/v0.10.x" rel="nofollow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">v0.10.x</span></a></li><li class="list-item_root__ZdUej"><a class="list-item_link__l6lDd g-focus-ring-from-box-shadow" href="/terraform/cdktf/v0.9.x" rel="nofollow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">v0.9.x</span></a></li><li class="list-item_root__ZdUej"><a class="list-item_link__l6lDd g-focus-ring-from-box-shadow" href="/terraform/cdktf/v0.8.x" rel="nofollow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">v0.8.x</span></a></li></ul></div></div></nav></div><div class="docs-page-heading_pageHeadingWrapper__LEMQ7"><div class="docs-landing-hero_root__F2hg6 docs-landing-hero_hasSubtitle__CfTS8"><span class="icon-tile_root__ShC0s icon-tile_size-extra-large__0pFeU icon-tile_color-terraform__Ss0_6 docs-landing-hero_icon__4GYZD"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><g fill="var(--token-color-terraform-brand)"><path d="M1 0v5.05l4.349 2.527V2.526L1 0zM10.175 5.344l-4.35-2.525v5.05l4.35 2.527V5.344zM10.651 10.396V5.344L15 2.819v5.05l-4.349 2.527zM10.174 16l-4.349-2.526v-5.05l4.349 2.525V16z"></path></g></svg></span><div><h1 class="hds-typography-display-600 hds-font-weight-bold docs-landing-hero_pageTitle__CbfYj g-offset-scroll-margin-top" id="cdk-for-terraform">CDK for Terraform</h1><p class="text_root__r0DFB hds-typography-body-300 hds-font-weight-regular docs-landing-hero_pageSubtitle__7Wrei">Cloud Development Kit for Terraform (CDKTF) lets you use familiar programming languages to define and provision infrastructure.</p></div></div></div></div><div class="dev-dot-content_root__UJDct hds-typography-body-300"><div class="docs-view_mdxContent___uMnx"><p class="text_root__r0DFB hds-typography-body-300 hds-font-weight-regular mdx-p_p__ZTJEA">Cloud Development Kit for Terraform (CDKTF) allows you to use familiar programming languages to define and provision infrastructure. This gives you access to the entire Terraform ecosystem without learning HashiCorp Configuration Language (HCL) and lets you leverage the power of your existing toolchain for testing, dependency management, etc.</p><p class="text_root__r0DFB hds-typography-body-300 hds-font-weight-regular mdx-p_p__ZTJEA">We support TypeScript, Python, Java, C#, and Go.</p><p class="text_root__r0DFB hds-typography-body-300 hds-font-weight-regular mdx-p_p__ZTJEA"><span class="image_root__Kkwm7 image_noBorder__e_8et"><img alt="terraform platform" loading="lazy" width="1776" height="1317" decoding="async" data-nimg="1" style="color:transparent" srcSet="/_next/image?url=https%3A%2F%2Fcontent.hashicorp.com%2Fapi%2Fassets%3Fproduct%3Dterraform-cdk%26version%3Dv0.20.11%26asset%3Dwebsite%252Fdocs%252Fcdktf%252Fterraform-platform.png%26width%3D1776%26height%3D1317&w=1920&q=75&dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m 1x, /_next/image?url=https%3A%2F%2Fcontent.hashicorp.com%2Fapi%2Fassets%3Fproduct%3Dterraform-cdk%26version%3Dv0.20.11%26asset%3Dwebsite%252Fdocs%252Fcdktf%252Fterraform-platform.png%26width%3D1776%26height%3D1317&w=3840&q=75&dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m 2x" src="/_next/image?url=https%3A%2F%2Fcontent.hashicorp.com%2Fapi%2Fassets%3Fproduct%3Dterraform-cdk%26version%3Dv0.20.11%26asset%3Dwebsite%252Fdocs%252Fcdktf%252Fterraform-platform.png%26width%3D1776%26height%3D1317&w=3840&q=75&dpl=dpl_Gpkis5daodif1XJUkruzJDBVBi2m"/></span></p><h2 id="how-does-cdk-for-terraform-work" class="hds-typography-display-500 hds-font-weight-bold mdx-headings_heading__M6qPe g-offset-scroll-margin-top mdx-headings_h2__9ZcX_"><a class="mdx-heading-permalink_root__2oeix g-focus-ring-from-box-shadow mdx-heading-permalink_h2__CA9g8" aria-label="how does cdk for terraform work permalink" href="/terraform/cdktf#how-does-cdk-for-terraform-work"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true" class="mdx-heading-permalink_icon__Sz01O"><g fill="currentColor"><path d="M11.141 1a3.893 3.893 0 00-2.738 1.093L7.314 3.175A.75.75 0 008.372 4.24l1.077-1.07a2.393 2.393 0 013.384 3.382l-1.881 1.88a2.393 2.393 0 01-3.608-.258.75.75 0 00-1.202.899 3.893 3.893 0 005.87.42l1.886-1.886.01-.009A3.893 3.893 0 0011.14 1z"></path><path d="M7.019 5.365a3.893 3.893 0 00-3.032 1.13L2.102 8.382l-.01.01a3.893 3.893 0 005.505 5.504l1.084-1.084a.75.75 0 00-1.06-1.06l-1.07 1.07a2.393 2.393 0 01-3.384-3.384l1.881-1.88a2.393 2.393 0 013.609.258.75.75 0 101.2-.899A3.893 3.893 0 007.02 5.365z"></path></g></svg></a>How does CDK for Terraform work?</h2><p class="text_root__r0DFB hds-typography-body-300 hds-font-weight-regular mdx-p_p__ZTJEA">CDK for Terraform leverages concepts and libraries from the <a class="inline-link_root__iIql6 g-focus-ring-from-box-shadow hds-typography-body-300 hds-font-weight-regular inline-link_primary__kGJLJ" href="https://aws.amazon.com/cdk/">AWS Cloud Development Kit</a> to translate your code into infrastructure configuration files for Terraform.</p><p class="text_root__r0DFB hds-typography-body-300 hds-font-weight-regular mdx-p_p__ZTJEA">At a high level, you will:</p><ol class="mdx-lists_listRoot__iVDx9"><li class="mdx-lists_listItem__nkqhg"><strong>Create an Application:</strong> Use either a built-in or a custom template to scaffold a project in your chosen language.</li><li class="mdx-lists_listItem__nkqhg"><strong>Define Infrastructure:</strong> Use your chosen language to define the infrastructure you want to provision on one or more providers. CDKTF automatically extracts the schema from Terraform providers and modules to generate the necessary classes for your application.</li><li class="mdx-lists_listItem__nkqhg"><strong>Deploy</strong>: Use <code class="mdx-inline-code_inlineCode__p_0sy mdx-inline-code_size-200__YiF_7 hds-typography-code-200">cdktf</code> CLI commands to provision infrastructure with Terraform or synthesize your code into a JSON configuration file that others can use with Terraform directly.</li></ol><p class="text_root__r0DFB hds-typography-body-300 hds-font-weight-regular mdx-p_p__ZTJEA">You can use every Terraform provider and module available on the <a class="inline-link_root__iIql6 g-focus-ring-from-box-shadow hds-typography-body-300 hds-font-weight-regular inline-link_primary__kGJLJ" href="https://registry.terraform.io/">Terraform Registry</a>, and you can use CDKTF with <a class="inline-link_root__iIql6 g-focus-ring-from-box-shadow hds-typography-body-300 hds-font-weight-regular inline-link_primary__kGJLJ" href="https://cloud.hashicorp.com/products/terraform">HCP Terraform</a>, <a class="inline-link_root__iIql6 g-focus-ring-from-box-shadow hds-typography-body-300 hds-font-weight-regular inline-link_primary__kGJLJ" href="/terraform/enterprise">Terraform Enterprise</a>, and HashiCorp's policy as code framework, <a class="inline-link_root__iIql6 g-focus-ring-from-box-shadow hds-typography-body-300 hds-font-weight-regular inline-link_primary__kGJLJ" href="https://www.hashicorp.com/sentinel">Sentinel</a>.</p><h2 id="when-to-use-cdk-for-terraform" class="hds-typography-display-500 hds-font-weight-bold mdx-headings_heading__M6qPe g-offset-scroll-margin-top mdx-headings_h2__9ZcX_"><a class="mdx-heading-permalink_root__2oeix g-focus-ring-from-box-shadow mdx-heading-permalink_h2__CA9g8" aria-label="when to use cdk for terraform permalink" href="/terraform/cdktf#when-to-use-cdk-for-terraform"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true" class="mdx-heading-permalink_icon__Sz01O"><g fill="currentColor"><path d="M11.141 1a3.893 3.893 0 00-2.738 1.093L7.314 3.175A.75.75 0 008.372 4.24l1.077-1.07a2.393 2.393 0 013.384 3.382l-1.881 1.88a2.393 2.393 0 01-3.608-.258.75.75 0 00-1.202.899 3.893 3.893 0 005.87.42l1.886-1.886.01-.009A3.893 3.893 0 0011.14 1z"></path><path d="M7.019 5.365a3.893 3.893 0 00-3.032 1.13L2.102 8.382l-.01.01a3.893 3.893 0 005.505 5.504l1.084-1.084a.75.75 0 00-1.06-1.06l-1.07 1.07a2.393 2.393 0 01-3.384-3.384l1.881-1.88a2.393 2.393 0 013.609.258.75.75 0 101.2-.899A3.893 3.893 0 007.02 5.365z"></path></g></svg></a>When to use CDK for Terraform</h2><p class="text_root__r0DFB hds-typography-body-300 hds-font-weight-regular mdx-p_p__ZTJEA">CDKTF offers many benefits, but it is not the right choice for every project. You should consider using CDKTF when:</p><ul class="mdx-lists_listRoot__iVDx9"><li class="mdx-lists_listItem__nkqhg">You have a strong preference or need to use a procedural language to define infrastructure.</li><li class="mdx-lists_listItem__nkqhg">You need to create abstractions to help manage complexity. For example, you want to create constructs to model a reusable infrastructure pattern composed of multiple resources and convenience methods.</li><li class="mdx-lists_listItem__nkqhg">You are comfortable living on the cutting edge; CDKTF may still have breaking changes before our 1.0 release.</li></ul><p class="text_root__r0DFB hds-typography-body-300 hds-font-weight-regular mdx-p_p__ZTJEA">You can make this choice for each team and project because CDK for Terraform <a class="inline-link_root__iIql6 g-focus-ring-from-box-shadow hds-typography-body-300 hds-font-weight-regular inline-link_primary__kGJLJ" href="/terraform/cdktf/concepts/hcl-interoperability">interoperates with existing Terraform providers and modules</a>.</p><h2 id="choosing-a-language-for-your-project" class="hds-typography-display-500 hds-font-weight-bold mdx-headings_heading__M6qPe g-offset-scroll-margin-top mdx-headings_h2__9ZcX_"><a class="mdx-heading-permalink_root__2oeix g-focus-ring-from-box-shadow mdx-heading-permalink_h2__CA9g8" aria-label="choosing a language for your project permalink" href="/terraform/cdktf#choosing-a-language-for-your-project"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true" class="mdx-heading-permalink_icon__Sz01O"><g fill="currentColor"><path d="M11.141 1a3.893 3.893 0 00-2.738 1.093L7.314 3.175A.75.75 0 008.372 4.24l1.077-1.07a2.393 2.393 0 013.384 3.382l-1.881 1.88a2.393 2.393 0 01-3.608-.258.75.75 0 00-1.202.899 3.893 3.893 0 005.87.42l1.886-1.886.01-.009A3.893 3.893 0 0011.14 1z"></path><path d="M7.019 5.365a3.893 3.893 0 00-3.032 1.13L2.102 8.382l-.01.01a3.893 3.893 0 005.505 5.504l1.084-1.084a.75.75 0 00-1.06-1.06l-1.07 1.07a2.393 2.393 0 01-3.384-3.384l1.881-1.88a2.393 2.393 0 013.609.258.75.75 0 101.2-.899A3.893 3.893 0 007.02 5.365z"></path></g></svg></a>Choosing a Language for your Project</h2><p class="text_root__r0DFB hds-typography-body-300 hds-font-weight-regular mdx-p_p__ZTJEA">Consider which of the supported languages you are most familiar with and which language best fits your organization's current tooling. We work towards providing feature parity and a good user experience across all supported languages, but there may be instances when new experimental features will not be available for all languages.</p><p class="text_root__r0DFB hds-typography-body-300 hds-font-weight-regular mdx-p_p__ZTJEA">If you plan to create and package your own constructs, we recommend choosing TypeScript. Using TypeScript allows you to use the <a class="inline-link_root__iIql6 g-focus-ring-from-box-shadow hds-typography-body-300 hds-font-weight-regular inline-link_primary__kGJLJ" href="https://github.com/projen/projen#getting-started">cdktf constructs</a> package generator to build and publish your constructs in multiple languages.</p><h2 id="get-started" class="hds-typography-display-500 hds-font-weight-bold mdx-headings_heading__M6qPe g-offset-scroll-margin-top mdx-headings_h2__9ZcX_"><a class="mdx-heading-permalink_root__2oeix g-focus-ring-from-box-shadow mdx-heading-permalink_h2__CA9g8" aria-label="get started permalink" href="/terraform/cdktf#get-started"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true" class="mdx-heading-permalink_icon__Sz01O"><g fill="currentColor"><path d="M11.141 1a3.893 3.893 0 00-2.738 1.093L7.314 3.175A.75.75 0 008.372 4.24l1.077-1.07a2.393 2.393 0 013.384 3.382l-1.881 1.88a2.393 2.393 0 01-3.608-.258.75.75 0 00-1.202.899 3.893 3.893 0 005.87.42l1.886-1.886.01-.009A3.893 3.893 0 0011.14 1z"></path><path d="M7.019 5.365a3.893 3.893 0 00-3.032 1.13L2.102 8.382l-.01.01a3.893 3.893 0 005.505 5.504l1.084-1.084a.75.75 0 00-1.06-1.06l-1.07 1.07a2.393 2.393 0 01-3.384-3.384l1.881-1.88a2.393 2.393 0 013.609.258.75.75 0 101.2-.899A3.893 3.893 0 007.02 5.365z"></path></g></svg></a>Get Started</h2><ul class="mdx-lists_listRoot__iVDx9"><li class="mdx-lists_listItem__nkqhg"><a class="inline-link_root__iIql6 g-focus-ring-from-box-shadow hds-typography-body-300 hds-font-weight-regular inline-link_primary__kGJLJ" href="/terraform/tutorials/cdktf/cdktf-install">Install CDKTF</a> and set up your first project.</li><li class="mdx-lists_listItem__nkqhg">Learn about <a class="inline-link_root__iIql6 g-focus-ring-from-box-shadow hds-typography-body-300 hds-font-weight-regular inline-link_primary__kGJLJ" href="/terraform/cdktf/concepts/cdktf-architecture">CDKTF application architecture</a>.</li><li class="mdx-lists_listItem__nkqhg">Learn how to use key CDKTF concepts like <a class="inline-link_root__iIql6 g-focus-ring-from-box-shadow hds-typography-body-300 hds-font-weight-regular inline-link_primary__kGJLJ" href="/terraform/cdktf/concepts/providers">providers</a>, <a class="inline-link_root__iIql6 g-focus-ring-from-box-shadow hds-typography-body-300 hds-font-weight-regular inline-link_primary__kGJLJ" href="/terraform/cdktf/concepts/modules">modules</a>, and <a class="inline-link_root__iIql6 g-focus-ring-from-box-shadow hds-typography-body-300 hds-font-weight-regular inline-link_primary__kGJLJ" href="/terraform/cdktf/concepts/resources">resources</a> to define infrastructure.</li></ul></div></div><a href="https://github.com/hashicorp/terraform-cdk/blob/main/website/docs/cdktf/index.mdx" target="_blank" class="edit-on-github-link_editLink__AsG8Z sidebar-sidecar-layout_editOnGithubLink__SDraB" rel="noreferrer"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true" class="edit-on-github-link_editLinkIcon__wMtY9"><path fill="currentColor" fill-rule="evenodd" d="M8 1C4.133 1 1 4.13 1 7.993c0 3.09 2.006 5.71 4.787 6.635.35.064.478-.152.478-.337 0-.166-.006-.606-.01-1.19-1.947.423-2.357-.937-2.357-.937-.319-.808-.778-1.023-.778-1.023-.635-.434.048-.425.048-.425.703.05 1.073.72 1.073.72.624 1.07 1.638.76 2.037.582.063-.452.244-.76.444-.935-1.554-.176-3.188-.776-3.188-3.456 0-.763.273-1.388.72-1.876-.072-.177-.312-.888.07-1.85 0 0 .586-.189 1.924.716A6.711 6.711 0 018 4.381c.595.003 1.194.08 1.753.236 1.336-.905 1.923-.717 1.923-.717.382.963.142 1.674.07 1.85.448.49.72 1.114.72 1.877 0 2.686-1.638 3.278-3.197 3.45.251.216.475.643.475 1.296 0 .934-.009 1.688-.009 1.918 0 .187.127.404.482.336A6.996 6.996 0 0015 7.993 6.997 6.997 0 008 1z" clip-rule="evenodd"></path></svg>Edit this page on GitHub</a></main><div class="sidebar-sidecar-layout_sidecarPosition__WtTq0"><div class="sidebar-sidecar-layout_sidecarTopSlot__qRAEI"></div><div class="sidecar-scroll-container_root__a8nIj"><div class="sidecar-scroll-container_scrollContainer__Dw9id"><div><nav aria-labelledby="react-aria-48"><p id="react-aria-48" class="outline-nav_navLabel__HrjQb hds-typography-body-100">On this page:</p><ol class="outline-nav_listRoot__Sm1fr"><li><a class="outline-link_root__S7fQg hds-typography-body-200 g-focus-ring-from-box-shadow" href="/terraform/cdktf#cdk-for-terraform">CDK for Terraform</a></li><li><a class="outline-link_root__S7fQg hds-typography-body-200 g-focus-ring-from-box-shadow" href="/terraform/cdktf#how-does-cdk-for-terraform-work">How does CDK for Terraform work?</a></li><li><a class="outline-link_root__S7fQg hds-typography-body-200 g-focus-ring-from-box-shadow" href="/terraform/cdktf#when-to-use-cdk-for-terraform">When to use CDK for Terraform</a></li><li><a class="outline-link_root__S7fQg hds-typography-body-200 g-focus-ring-from-box-shadow" href="/terraform/cdktf#choosing-a-language-for-your-project">Choosing a Language for your Project</a></li><li><a class="outline-link_root__S7fQg hds-typography-body-200 g-focus-ring-from-box-shadow" href="/terraform/cdktf#get-started">Get Started</a></li></ol></nav></div></div></div></div></div></div></div></div></div><div class="base-layout_footer__HGqK8 base-layout_showFooterTopBorder__4_CwH"><footer class="footer_root__qJO_k"><span class="footer_logoAndSwitcher__CJkN3"><a href="https://www.hashicorp.com/" aria-label="Go to HashiCorp home page" class="footer_logo__pe9i3 g-focus-ring-from-box-shadow"><div><svg xmlns="http://www.w3.org/2000/svg" width="254" height="53" fill="none" viewBox="0 0 254 53"><g fill="#000" clip-path="url(#clip0_1743_1384)"><g><path d="M63.01 12.22h5.32v11.43h12.19V12.22h5.36V40.2h-5.36V28.45H68.33V40.2h-5.32zM89.28 34.77c0-4.2 2.96-5.6 6.56-6.44l6.079-1.4v-.48c0-2.04-1.32-3.32-3.44-3.32s-3.36 1.16-3.76 3.08l-4.56-.52c.68-3.84 3.92-6.32 8.52-6.32 5.08 0 8.4 3.2 8.4 7.88v8.2c0 .52.16.68.52.68h1.12v4.08h-3.12c-1.96 0-2.84-.64-2.84-2.24 0-.48.08-1.04.28-1.76l-.44-.16c-1.44 3.12-3.56 4.48-6.56 4.48-4.12 0-6.76-2.28-6.76-5.76m8.12 2c2.639 0 4.519-1.92 4.519-4.96v-1.6l-4.36 1.04c-2.2.52-3.12 1.28-3.12 2.96s1.16 2.56 2.96 2.56M110.59 34.69l4.88-.96c.52 2.16 2.24 3.24 4.52 3.24 2.28 0 3.56-.92 3.56-2.48s-1.52-1.88-4.4-2.4c-3.64-.56-8.35-1.24-8.35-6.28 0-3.8 3.24-6.44 8.52-6.44 4.68 0 8.32 1.96 9.15 5.92l-4.92.8c-.44-2-2.08-3.04-4.24-3.04-2.36 0-3.48 1-3.48 2.36 0 1.56 1.56 1.88 4.44 2.4 3.6.56 8.32 1.24 8.32 6.28 0 3.96-3.2 6.6-8.6 6.6-4.88 0-8.52-2-9.4-6M136.94 40.21h-5.2V11.42h5.2v8.96c0 1.04-.2 2.04-.48 3.52l.48.16c1.24-2.96 3.12-4.68 6.6-4.68 4.44 0 6.8 2.8 6.8 7.56v13.27h-5.2V27.1c0-2.32-1.16-3.6-3.48-3.6-2.64 0-4.72 2-4.72 5.52zM161.01 35.05c0 .8.28 1.04.88 1.04h2.28v4.12h-4.72c-2.36 0-3.64-1.32-3.64-3.76V23.98h-2.88v-4.12h8.08zm-5.92-20.63c0-1.76 1.44-3.2 3.16-3.2 1.72 0 3.16 1.44 3.16 3.2 0 1.76-1.4 3.16-3.16 3.16-1.76 0-3.16-1.4-3.16-3.16M165.89 26.22c0-8.4 5.52-14.47 13.51-14.47 6.72 0 11.31 3.88 12.55 9.15l-5.28 1.28c-1-3.68-3.44-5.76-7.28-5.76-4.88 0-7.96 4.04-7.96 9.79 0 5.75 3.2 9.79 8.16 9.79 3.92 0 6.32-2.12 7.32-6.04l5 .56c-1.2 6.28-5.84 10.15-12.39 10.15-8.08 0-13.63-6.08-13.63-14.47zM194.08 30.01c0-6.2 4.36-10.63 10.39-10.63s10.39 4.44 10.39 10.63-4.36 10.67-10.39 10.67-10.39-4.48-10.39-10.67m15.59 0c0-3.84-2.04-6.4-5.2-6.4s-5.2 2.56-5.2 6.4c0 3.84 2.08 6.44 5.2 6.44s5.2-2.56 5.2-6.44M218.149 19.86h4.8v.8c0 1.08-.04 1.96-.36 3.6l.48.12c.76-2.68 2.16-4.52 5.44-4.52h1.48v5.04h-2.12c-2.92 0-4.52 1.76-4.52 5v10.31h-5.2zM232.43 19.86h5.12v.92c0 .92-.08 1.64-.36 3.28l.48.12c1.24-3.24 3.56-4.8 6.56-4.8 4.96 0 8.88 4.08 8.88 10.63 0 6.55-3.92 10.67-8.88 10.67-3 0-5.2-1.56-6.48-4.84l-.44.16c.24 1.6.32 2.36.32 3.24v9.15h-5.2V19.85zm15.51 10.15c0-3.96-2.16-6.4-5.2-6.4s-5.2 2.44-5.2 6.4c0 3.96 2.16 6.44 5.2 6.44s5.2-2.44 5.2-6.44"/></g><g><path d="M20.79.01.07 11.97v28.71l7.78 4.5V16.46l12.94-7.47z"/><path d="M29.06.01v22.87h-8.27v-8.54L13 18.84v29.3l7.79 4.5v-22.8h8.27v8.48l7.79-4.49V4.51z"/><path d="M29.06 52.65 49.78 40.7V11.99L42 7.49V36.2l-12.94 7.47z"/></g></g><defs><clipPath id="clip0_1743_1384"><path fill="#fff" d="M0 0h254v53H0z"/></clipPath></defs></svg></div></a><span class="footer_themeSwitcher__CPJxw hds-font-weight-regular"><label class="theme-switcher_label__7Boh2 hds-typography-body-200" for="react-aria-54">Theme</label></span></span><ul class="footer_links__t81SU"><li><a class="footer_linkAction__bR3OW g-focus-ring-from-box-shadow" href="/certifications"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular">Certifications</span></a></li><li><a class="footer_linkAction__bR3OW g-focus-ring-from-box-shadow" href="https://status.hashicorp.com"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular">System Status</span></a></li><li><button class="footer_linkAction__bR3OW g-focus-ring-from-box-shadow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular">Cookie Manager</span></button></li><li><a class="footer_linkAction__bR3OW g-focus-ring-from-box-shadow" href="https://www.hashicorp.com/terms-of-service"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular">Terms of Use</span></a></li><li><a class="footer_linkAction__bR3OW g-focus-ring-from-box-shadow" href="https://www.hashicorp.com/trust/security"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular">Security</span></a></li><li><a class="footer_linkAction__bR3OW g-focus-ring-from-box-shadow" href="https://www.hashicorp.com/privacy"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular">Privacy</span></a></li><li><a class="footer_linkAction__bR3OW g-focus-ring-from-box-shadow" href="https://www.hashicorp.com/trademark-policy"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular">Trademark Policy</span></a></li><li><a class="footer_linkAction__bR3OW g-focus-ring-from-box-shadow" href="https://www.hashicorp.com/trade-controls"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular">Trade Controls</span></a></li><li><a class="footer_linkAction__bR3OW g-focus-ring-from-box-shadow" href="https://www.hashicorp.com/trust/accessibility"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular">Accessibility</span></a></li><li><a class="footer_linkAction__bR3OW g-focus-ring-from-box-shadow" aria-describedby="opens-in-new-tab-label-react-aria-63" target="_blank" href="https://forms.gle/fnHLuNahLEhjuKvE6"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular">Give Feedback</span><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true"><g fill="currentColor"><path d="M9 .75A.75.75 0 019.75 0h4.5c.206 0 .393.083.529.218l.001.002.002.001A.748.748 0 0115 .75v4.5a.75.75 0 01-1.5 0V2.56L7.28 8.78a.75.75 0 01-1.06-1.06l6.22-6.22H9.75A.75.75 0 019 .75z"></path><path d="M3.25 3.5a.75.75 0 00-.75.75v7.5c0 .414.336.75.75.75h7.5a.75.75 0 00.75-.75v-4a.75.75 0 011.5 0v4A2.25 2.25 0 0110.75 14h-7.5A2.25 2.25 0 011 11.75v-7.5A2.25 2.25 0 013.25 2h4a.75.75 0 010 1.5h-4z"></path></g></svg></a><span class="g-screen-reader-only" id="opens-in-new-tab-label-react-aria-63">(opens in new tab)</span></li></ul></footer></div></div></div><div style="position:fixed;z-index:99;top:16px;left:16px;right:16px;bottom:16px;pointer-events:none;inset:24px"></div><!--$--><!--/$--></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"layoutProps":{"breadcrumbLinks":[{"title":"Developer","url":"/"},{"title":"Terraform","url":"/terraform"},{"title":"CDK for Terraform","url":"/terraform/cdktf","isCurrentPage":true}],"sidebarNavDataLevels":[{"levelButtonProps":{"levelDownButtonText":"Terraform Home"},"menuItems":[{"leadingIconName":"home","title":"HashiCorp Developer","href":"/"},{"leadingIconName":"guide","title":"Tutorials","href":"/tutorials"},{"divider":true},{"heading":"Products"},{"leadingIconName":"hcp","title":"HashiCorp Cloud Platform","href":"/hcp"},{"leadingIconName":"terraform","title":"Terraform","href":"/terraform"},{"leadingIconName":"packer","title":"Packer","href":"/packer"},{"leadingIconName":"consul","title":"Consul","href":"/consul"},{"leadingIconName":"vault","title":"Vault","href":"/vault"},{"leadingIconName":"boundary","title":"Boundary","href":"/boundary"},{"leadingIconName":"nomad","title":"Nomad","href":"/nomad"},{"leadingIconName":"waypoint","title":"Waypoint","href":"/waypoint"},{"leadingIconName":"vagrant","title":"Vagrant","href":"/vagrant"}],"showFilterInput":false,"title":"Main Menu"},{"levelButtonProps":{"levelUpButtonText":"Main Menu","levelDownButtonText":"Previous"},"menuItems":[{"title":"Terraform","fullPath":"/terraform","theme":"terraform"},{"title":"Install","fullPath":"/terraform/install"},{"title":"Intro to Terraform","fullPath":"/terraform/intro"},{"title":"Tutorials","fullPath":"/terraform/tutorials"},{"title":"Documentation","isOpen":true,"routes":[{"title":"Docs Overview","fullPath":"/terraform/docs"},{"title":"Configuration Language","fullPath":"/terraform/language"},{"title":"Terraform CLI","fullPath":"/terraform/cli"},{"title":"HCP Terraform","fullPath":"/terraform/cloud-docs"},{"title":"Terraform Enterprise","fullPath":"/terraform/enterprise"},{"title":"CDK for Terraform","fullPath":"/terraform/cdktf"},{"title":"Provider Use","fullPath":"/terraform/language/providers"},{"title":"Plugin Development","fullPath":"/terraform/plugin"},{"title":"Registry Publishing","fullPath":"/terraform/registry"},{"title":"Integration Program","fullPath":"/terraform/docs/partnerships"}]}],"showFilterInput":false,"title":"Terraform","visuallyHideTitle":true},{"backToLinkProps":{"text":"Terraform Home","href":"/terraform"},"levelButtonProps":{"levelUpButtonText":"Terraform Home"},"menuItems":[{"title":"CDK for Terraform","fullPath":"/terraform/cdktf","theme":"terraform"},{"title":"Get Started","href":"/terraform/tutorials/cdktf/cdktf-install","id":"sidebar-nav-item-2"},{"title":"Concepts","routes":[{"title":"Architecture","path":"concepts/cdktf-architecture","fullPath":"/terraform/cdktf/concepts/cdktf-architecture","id":"sidebar-nav-item-4"},{"title":"HCL Interoperability","path":"concepts/hcl-interoperability","fullPath":"/terraform/cdktf/concepts/hcl-interoperability","id":"sidebar-nav-item-5"},{"title":"Constructs","path":"concepts/constructs","fullPath":"/terraform/cdktf/concepts/constructs","id":"sidebar-nav-item-6"},{"title":"Providers","path":"concepts/providers","fullPath":"/terraform/cdktf/concepts/providers","id":"sidebar-nav-item-7"},{"title":"Resources","path":"concepts/resources","fullPath":"/terraform/cdktf/concepts/resources","id":"sidebar-nav-item-8"},{"title":"Modules","path":"concepts/modules","fullPath":"/terraform/cdktf/concepts/modules","id":"sidebar-nav-item-9"},{"title":"Data Sources","path":"concepts/data-sources","fullPath":"/terraform/cdktf/concepts/data-sources","id":"sidebar-nav-item-10"},{"title":"Variables and Outputs","path":"concepts/variables-and-outputs","fullPath":"/terraform/cdktf/concepts/variables-and-outputs","id":"sidebar-nav-item-11"},{"title":"Functions","path":"concepts/functions","fullPath":"/terraform/cdktf/concepts/functions","id":"sidebar-nav-item-12"},{"title":"Iterators","path":"concepts/iterators","fullPath":"/terraform/cdktf/concepts/iterators","id":"sidebar-nav-item-13"},{"title":"Remote Backends","path":"concepts/remote-backends","fullPath":"/terraform/cdktf/concepts/remote-backends","id":"sidebar-nav-item-14"},{"title":"Aspects","path":"concepts/aspects","fullPath":"/terraform/cdktf/concepts/aspects","id":"sidebar-nav-item-15"},{"title":"Assets","path":"concepts/assets","fullPath":"/terraform/cdktf/concepts/assets","id":"sidebar-nav-item-16"},{"title":"Tokens","path":"concepts/tokens","fullPath":"/terraform/cdktf/concepts/tokens","id":"sidebar-nav-item-17"},{"title":"Stacks","path":"concepts/stacks","fullPath":"/terraform/cdktf/concepts/stacks","id":"sidebar-nav-item-18"}],"id":"sidebar-nav-item-3"},{"title":"Examples and Guides","routes":[{"title":"Examples","path":"examples-and-guides/examples","fullPath":"/terraform/cdktf/examples-and-guides/examples","id":"sidebar-nav-item-20"},{"title":"Refactoring Stacks","path":"examples-and-guides/refactoring","fullPath":"/terraform/cdktf/examples-and-guides/refactoring","id":"sidebar-nav-item-21"}],"id":"sidebar-nav-item-19"},{"title":"Create and Deploy Applications","routes":[{"title":"Project Setup","path":"create-and-deploy/project-setup","fullPath":"/terraform/cdktf/create-and-deploy/project-setup","id":"sidebar-nav-item-23"},{"title":"Configuration File","path":"create-and-deploy/configuration-file","fullPath":"/terraform/cdktf/create-and-deploy/configuration-file","id":"sidebar-nav-item-24"},{"title":"Best Practices","path":"create-and-deploy/best-practices","fullPath":"/terraform/cdktf/create-and-deploy/best-practices","id":"sidebar-nav-item-25"},{"title":"Environment Variables","path":"create-and-deploy/environment-variables","fullPath":"/terraform/cdktf/create-and-deploy/environment-variables","id":"sidebar-nav-item-26"},{"title":"HCP Terraform","path":"create-and-deploy/hcp-terraform","fullPath":"/terraform/cdktf/create-and-deploy/hcp-terraform","id":"sidebar-nav-item-27"},{"title":"Deployment Patterns","path":"create-and-deploy/deployment-patterns","fullPath":"/terraform/cdktf/create-and-deploy/deployment-patterns","id":"sidebar-nav-item-28"},{"title":"Performance","path":"create-and-deploy/performance","fullPath":"/terraform/cdktf/create-and-deploy/performance","id":"sidebar-nav-item-29"},{"title":"Remote Templates","path":"create-and-deploy/remote-templates","fullPath":"/terraform/cdktf/create-and-deploy/remote-templates","id":"sidebar-nav-item-30"},{"title":"AWS Adapter [preview]","path":"create-and-deploy/aws-adapter","fullPath":"/terraform/cdktf/create-and-deploy/aws-adapter","id":"sidebar-nav-item-31"}],"id":"sidebar-nav-item-22"},{"title":"Develop Custom Constructs","routes":[{"title":"Design","path":"develop-custom-constructs/construct-design","fullPath":"/terraform/cdktf/develop-custom-constructs/construct-design","id":"sidebar-nav-item-33"},{"title":"Publishing and Distribution","path":"develop-custom-constructs/publishing-and-distribution","fullPath":"/terraform/cdktf/develop-custom-constructs/publishing-and-distribution","id":"sidebar-nav-item-34"}],"id":"sidebar-nav-item-32"},{"title":"Test and Debug","routes":[{"title":"Unit Tests","path":"test/unit-tests","fullPath":"/terraform/cdktf/test/unit-tests","id":"sidebar-nav-item-36"},{"title":"Debugging","path":"test/debugging","fullPath":"/terraform/cdktf/test/debugging","id":"sidebar-nav-item-37"}],"id":"sidebar-nav-item-35"},{"title":"CLI Reference","routes":[{"title":"CLI Configuration","path":"cli-reference/cli-configuration","fullPath":"/terraform/cdktf/cli-reference/cli-configuration","id":"sidebar-nav-item-39"},{"title":"Commands","path":"cli-reference/commands","fullPath":"/terraform/cdktf/cli-reference/commands","id":"sidebar-nav-item-40"}],"id":"sidebar-nav-item-38"},{"title":"API Reference","routes":[{"title":"Overview","path":"api-reference","fullPath":"/terraform/cdktf/api-reference","id":"sidebar-nav-item-42"},{"title":"Typescript","routes":[{"title":"Overview","path":"api-reference/typescript","fullPath":"/terraform/cdktf/api-reference/typescript","id":"sidebar-nav-item-44"},{"title":"Classes","path":"api-reference/typescript/classes","fullPath":"/terraform/cdktf/api-reference/typescript/classes","id":"sidebar-nav-item-45"},{"title":"Constructs","path":"api-reference/typescript/constructs","fullPath":"/terraform/cdktf/api-reference/typescript/constructs","id":"sidebar-nav-item-46"},{"title":"Enums","path":"api-reference/typescript/enums","fullPath":"/terraform/cdktf/api-reference/typescript/enums","id":"sidebar-nav-item-47"},{"title":"Protocols","path":"api-reference/typescript/protocols","fullPath":"/terraform/cdktf/api-reference/typescript/protocols","id":"sidebar-nav-item-48"},{"title":"Structs","path":"api-reference/typescript/structs","fullPath":"/terraform/cdktf/api-reference/typescript/structs","id":"sidebar-nav-item-49"}],"id":"sidebar-nav-item-43"},{"title":"Python","routes":[{"title":"Overview","path":"api-reference/python","fullPath":"/terraform/cdktf/api-reference/python","id":"sidebar-nav-item-51"},{"title":"Classes","path":"api-reference/python/classes","fullPath":"/terraform/cdktf/api-reference/python/classes","id":"sidebar-nav-item-52"},{"title":"Constructs","path":"api-reference/python/constructs","fullPath":"/terraform/cdktf/api-reference/python/constructs","id":"sidebar-nav-item-53"},{"title":"Enums","path":"api-reference/python/enums","fullPath":"/terraform/cdktf/api-reference/python/enums","id":"sidebar-nav-item-54"},{"title":"Protocols","path":"api-reference/python/protocols","fullPath":"/terraform/cdktf/api-reference/python/protocols","id":"sidebar-nav-item-55"},{"title":"Structs","path":"api-reference/python/structs","fullPath":"/terraform/cdktf/api-reference/python/structs","id":"sidebar-nav-item-56"}],"id":"sidebar-nav-item-50"},{"title":"Java","routes":[{"title":"Overview","path":"api-reference/java","fullPath":"/terraform/cdktf/api-reference/java","id":"sidebar-nav-item-58"},{"title":"Classes","path":"api-reference/java/classes","fullPath":"/terraform/cdktf/api-reference/java/classes","id":"sidebar-nav-item-59"},{"title":"Constructs","path":"api-reference/java/constructs","fullPath":"/terraform/cdktf/api-reference/java/constructs","id":"sidebar-nav-item-60"},{"title":"Enums","path":"api-reference/java/enums","fullPath":"/terraform/cdktf/api-reference/java/enums","id":"sidebar-nav-item-61"},{"title":"Protocols","path":"api-reference/java/protocols","fullPath":"/terraform/cdktf/api-reference/java/protocols","id":"sidebar-nav-item-62"},{"title":"Structs","path":"api-reference/java/structs","fullPath":"/terraform/cdktf/api-reference/java/structs","id":"sidebar-nav-item-63"}],"id":"sidebar-nav-item-57"},{"title":"C#","routes":[{"title":"Overview","path":"api-reference/csharp","fullPath":"/terraform/cdktf/api-reference/csharp","id":"sidebar-nav-item-65"},{"title":"Classes","path":"api-reference/csharp/classes","fullPath":"/terraform/cdktf/api-reference/csharp/classes","id":"sidebar-nav-item-66"},{"title":"Constructs","path":"api-reference/csharp/constructs","fullPath":"/terraform/cdktf/api-reference/csharp/constructs","id":"sidebar-nav-item-67"},{"title":"Enums","path":"api-reference/csharp/enums","fullPath":"/terraform/cdktf/api-reference/csharp/enums","id":"sidebar-nav-item-68"},{"title":"Protocols","path":"api-reference/csharp/protocols","fullPath":"/terraform/cdktf/api-reference/csharp/protocols","id":"sidebar-nav-item-69"},{"title":"Structs","path":"api-reference/csharp/structs","fullPath":"/terraform/cdktf/api-reference/csharp/structs","id":"sidebar-nav-item-70"}],"id":"sidebar-nav-item-64"},{"title":"Go","routes":[{"title":"Overview","path":"api-reference/go","fullPath":"/terraform/cdktf/api-reference/go","id":"sidebar-nav-item-72"},{"title":"Classes","path":"api-reference/go/classes","fullPath":"/terraform/cdktf/api-reference/go/classes","id":"sidebar-nav-item-73"},{"title":"Constructs","path":"api-reference/go/constructs","fullPath":"/terraform/cdktf/api-reference/go/constructs","id":"sidebar-nav-item-74"},{"title":"Enums","path":"api-reference/go/enums","fullPath":"/terraform/cdktf/api-reference/go/enums","id":"sidebar-nav-item-75"},{"title":"Protocols","path":"api-reference/go/protocols","fullPath":"/terraform/cdktf/api-reference/go/protocols","id":"sidebar-nav-item-76"},{"title":"Structs","path":"api-reference/go/structs","fullPath":"/terraform/cdktf/api-reference/go/structs","id":"sidebar-nav-item-77"}],"id":"sidebar-nav-item-71"},{"title":"Providers","path":"api-reference/provider","fullPath":"/terraform/cdktf/api-reference/provider","id":"sidebar-nav-item-78"}],"id":"sidebar-nav-item-41"},{"title":"Release","routes":[{"title":"Overview","path":"release","fullPath":"/terraform/cdktf/release","id":"sidebar-nav-item-80"},{"title":"Upgrading to Version 0.19","path":"release/upgrade-guide-v0-19","fullPath":"/terraform/cdktf/release/upgrade-guide-v0-19","id":"sidebar-nav-item-81"},{"title":"Upgrading to Version 0.18","path":"release/upgrade-guide-v0-18","fullPath":"/terraform/cdktf/release/upgrade-guide-v0-18","id":"sidebar-nav-item-82"},{"title":"Upgrading to Version 0.17","path":"release/upgrade-guide-v0-17","fullPath":"/terraform/cdktf/release/upgrade-guide-v0-17","id":"sidebar-nav-item-83"},{"title":"Upgrading to Version 0.15","path":"release/upgrade-guide-v0-15","fullPath":"/terraform/cdktf/release/upgrade-guide-v0-15","id":"sidebar-nav-item-84"},{"title":"Upgrading to Version 0.13","path":"release/upgrade-guide-v0-13","fullPath":"/terraform/cdktf/release/upgrade-guide-v0-13","id":"sidebar-nav-item-85"},{"title":"Upgrading to Version 0.12","path":"release/upgrade-guide-v0-12","fullPath":"/terraform/cdktf/release/upgrade-guide-v0-12","id":"sidebar-nav-item-86"},{"title":"Upgrading to Version 0.11","path":"release/upgrade-guide-v0-11","fullPath":"/terraform/cdktf/release/upgrade-guide-v0-11","id":"sidebar-nav-item-87"},{"title":"Upgrading to Version 0.10","path":"release/upgrade-guide-v0-10","fullPath":"/terraform/cdktf/release/upgrade-guide-v0-10","id":"sidebar-nav-item-88"},{"title":"Upgrading to Version 0.9","path":"release/upgrade-guide-v0-9","fullPath":"/terraform/cdktf/release/upgrade-guide-v0-9","id":"sidebar-nav-item-89"},{"title":"Upgrading to Version 0.7","path":"release/upgrade-guide-v0-7","fullPath":"/terraform/cdktf/release/upgrade-guide-v0-7","id":"sidebar-nav-item-90"},{"title":"Upgrading to Version 0.6","path":"release/upgrade-guide-v0-6","fullPath":"/terraform/cdktf/release/upgrade-guide-v0-6","id":"sidebar-nav-item-91"}],"id":"sidebar-nav-item-79"},{"title":"Community","path":"community","fullPath":"/terraform/cdktf/community","id":"sidebar-nav-item-92"},{"title":"Telemetry","path":"telemetry","fullPath":"/terraform/cdktf/telemetry","id":"sidebar-nav-item-93"}],"title":"CDK for Terraform","visuallyHideTitle":true}],"mainWidth":"narrow","githubFileUrl":"https://github.com/hashicorp/terraform-cdk/blob/main/website/docs/cdktf/index.mdx"},"metadata":{"title":"CDK for Terraform","description":"Cloud Development Kit for Terraform (CDKTF) lets you use familiar programming languages to define and provision infrastructure.","layout":{"name":"docs-root-landing","subtitle":"Cloud Development Kit for Terraform (CDKTF) lets you use familiar programming languages to define and provision infrastructure."}},"outlineItems":[{"title":"CDK for Terraform","url":"#cdk-for-terraform"},{"title":"How does CDK for Terraform work?","url":"#how-does-cdk-for-terraform-work"},{"title":"When to use CDK for Terraform","url":"#when-to-use-cdk-for-terraform"},{"title":"Choosing a Language for your Project","url":"#choosing-a-language-for-your-project"},{"title":"Get Started","url":"#get-started"}],"pageHeading":{"id":"cdk-for-terraform","title":"CDK for Terraform"},"mdxSource":{"compiledSource":"const layoutProps={};const MDXLayout=\"wrapper\";function MDXContent({components,...props}){return mdx(MDXLayout,{...layoutProps,...props,components:components,mdxType:\"MDXLayout\"},mdx(\"p\",null,`Cloud Development Kit for Terraform (CDKTF) allows you to use familiar programming languages to define and provision infrastructure. This gives you access to the entire Terraform ecosystem without learning HashiCorp Configuration Language (HCL) and lets you leverage the power of your existing toolchain for testing, dependency management, etc.`),mdx(\"p\",null,`We support TypeScript, Python, Java, C#, and Go.`),mdx(\"p\",null,mdx(\"img\",{parentName:\"p\",\"src\":\"https://content.hashicorp.com/api/assets?product=terraform-cdk\u0026version=v0.20.11\u0026asset=website%2Fdocs%2Fcdktf%2Fterraform-platform.png\u0026width=1776\u0026height=1317\",\"alt\":\"terraform platform\"})),mdx(\"h2\",{\"id\":\"how-does-cdk-for-terraform-work\"},mdx(\"a\",{parentName:\"h2\",\"className\":\"__permalink-h\",\"href\":\"#how-does-cdk-for-terraform-work\",\"aria-label\":\"how does cdk for terraform work permalink\"},`\\xbb`),`How does CDK for Terraform work?`),mdx(\"p\",null,`CDK for Terraform leverages concepts and libraries from the `,mdx(\"a\",{parentName:\"p\",\"href\":\"https://aws.amazon.com/cdk/\"},`AWS Cloud Development Kit`),` to translate your code into infrastructure configuration files for Terraform.`),mdx(\"p\",null,`At a high level, you will:`),mdx(\"ol\",null,mdx(\"li\",{parentName:\"ol\"},mdx(\"strong\",{parentName:\"li\"},`Create an Application:`),` Use either a built-in or a custom template to scaffold a project in your chosen language.`),mdx(\"li\",{parentName:\"ol\"},mdx(\"strong\",{parentName:\"li\"},`Define Infrastructure:`),` Use your chosen language to define the infrastructure you want to provision on one or more providers. CDKTF automatically extracts the schema from Terraform providers and modules to generate the necessary classes for your application.`),mdx(\"li\",{parentName:\"ol\"},mdx(\"strong\",{parentName:\"li\"},`Deploy`),`: Use `,mdx(\"inlineCode\",{parentName:\"li\"},`cdktf`),` CLI commands to provision infrastructure with Terraform or synthesize your code into a JSON configuration file that others can use with Terraform directly.`)),mdx(\"p\",null,`You can use every Terraform provider and module available on the `,mdx(\"a\",{parentName:\"p\",\"href\":\"https://registry.terraform.io/\"},`Terraform Registry`),`, and you can use CDKTF with `,mdx(\"a\",{parentName:\"p\",\"href\":\"https://cloud.hashicorp.com/products/terraform\"},`HCP Terraform`),`, `,mdx(\"a\",{parentName:\"p\",\"href\":\"/terraform/enterprise\"},`Terraform Enterprise`),`, and HashiCorp's policy as code framework, `,mdx(\"a\",{parentName:\"p\",\"href\":\"https://www.hashicorp.com/sentinel\"},`Sentinel`),`.`),mdx(\"h2\",{\"id\":\"when-to-use-cdk-for-terraform\"},mdx(\"a\",{parentName:\"h2\",\"className\":\"__permalink-h\",\"href\":\"#when-to-use-cdk-for-terraform\",\"aria-label\":\"when to use cdk for terraform permalink\"},`\\xbb`),`When to use CDK for Terraform`),mdx(\"p\",null,`CDKTF offers many benefits, but it is not the right choice for every project. You should consider using CDKTF when:`),mdx(\"ul\",null,mdx(\"li\",{parentName:\"ul\"},`You have a strong preference or need to use a procedural language to define infrastructure.`),mdx(\"li\",{parentName:\"ul\"},`You need to create abstractions to help manage complexity. For example, you want to create constructs to model a reusable infrastructure pattern composed of multiple resources and convenience methods.`),mdx(\"li\",{parentName:\"ul\"},`You are comfortable living on the cutting edge; CDKTF may still have breaking changes before our 1.0 release.`)),mdx(\"p\",null,`You can make this choice for each team and project because CDK for Terraform `,mdx(\"a\",{parentName:\"p\",\"href\":\"/terraform/cdktf/concepts/hcl-interoperability\"},`interoperates with existing Terraform providers and modules`),`.`),mdx(\"h2\",{\"id\":\"choosing-a-language-for-your-project\"},mdx(\"a\",{parentName:\"h2\",\"className\":\"__permalink-h\",\"href\":\"#choosing-a-language-for-your-project\",\"aria-label\":\"choosing a language for your project permalink\"},`\\xbb`),`Choosing a Language for your Project`),mdx(\"p\",null,`Consider which of the supported languages you are most familiar with and which language best fits your organization's current tooling. We work towards providing feature parity and a good user experience across all supported languages, but there may be instances when new experimental features will not be available for all languages.`),mdx(\"p\",null,`If you plan to create and package your own constructs, we recommend choosing TypeScript. Using TypeScript allows you to use the `,mdx(\"a\",{parentName:\"p\",\"href\":\"https://github.com/projen/projen#getting-started\"},`cdktf constructs`),` package generator to build and publish your constructs in multiple languages.`),mdx(\"h2\",{\"id\":\"get-started\"},mdx(\"a\",{parentName:\"h2\",\"className\":\"__permalink-h\",\"href\":\"#get-started\",\"aria-label\":\"get started permalink\"},`\\xbb`),`Get Started`),mdx(\"ul\",null,mdx(\"li\",{parentName:\"ul\"},mdx(\"a\",{parentName:\"li\",\"href\":\"/terraform/tutorials/cdktf/cdktf-install\"},`Install CDKTF`),` and set up your first project.`),mdx(\"li\",{parentName:\"ul\"},`Learn about `,mdx(\"a\",{parentName:\"li\",\"href\":\"/terraform/cdktf/concepts/cdktf-architecture\"},`CDKTF application architecture`),`.`),mdx(\"li\",{parentName:\"ul\"},`Learn how to use key CDKTF concepts like `,mdx(\"a\",{parentName:\"li\",\"href\":\"/terraform/cdktf/concepts/providers\"},`providers`),`, `,mdx(\"a\",{parentName:\"li\",\"href\":\"/terraform/cdktf/concepts/modules\"},`modules`),`, and `,mdx(\"a\",{parentName:\"li\",\"href\":\"/terraform/cdktf/concepts/resources\"},`resources`),` to define infrastructure.`)))};MDXContent.isMDXComponent=true;","scope":{"product":"terraform-cdk","version":"latest"}},"product":{"slug":"terraform","name":"Terraform","algoliaConfig":{"indexName":"product_TERRAFORM"},"alertBannerActive":true,"alertBanner":{"tag":"New","url":"https://www.hashicorp.com/blog/introducing-the-infrastructure-cloud","text":"Terraform Cloud is now HCP Terraform","linkText":"Read more →","expirationDate":"2024-04-29T00:00:00-08:00"},"basePaths":["cdktf","cli","cloud-docs","cloud-docs/agents","docs","enterprise","internals","intro","language","plugin","plugin/framework","plugin/log","plugin/mux","plugin/sdkv2","plugin/testing","registry","downloads"],"docsNavItems":["docs","intro","language","cli","cloud-docs","enterprise","cdktf",{"icon":"provider","label":"Provider Use","fullPath":"/terraform/language/providers"},"plugin","registry",{"icon":"handshake","label":"Integration Program","fullPath":"/terraform/docs/partnerships"}],"rootDocsPaths":[{"iconName":"code","name":"CDK for Terraform","path":"cdktf","productSlugForLoader":"terraform-cdk"},{"iconName":"terminal-screen","name":"Terraform CLI","path":"cli"},{"iconName":"cloud","name":"HCP Terraform","path":"cloud-docs","productSlugForLoader":"terraform-docs-common"},{"iconName":"cloud","name":"HCP Terraform Agents","navDataPrefix":"cloud-docs-agents","path":"cloud-docs/agents","productSlugForLoader":"terraform-docs-agents"},{"iconName":"docs","name":"Docs Overview","path":"docs","productSlugForLoader":"terraform-docs-common"},{"iconName":"org","name":"Terraform Enterprise","path":"enterprise","productSlugForLoader":"ptfe-releases"},{"iconName":"docs","name":"Internals","path":"internals"},{"iconName":"docs","name":"Intro to Terraform","path":"intro"},{"iconName":"file-source","name":"Configuration Language","path":"language"},{"iconName":"wrench","name":"Plugin Development","path":"plugin","productSlugForLoader":"terraform-docs-common"},{"iconName":"plug","name":"Framework","navDataPrefix":"plugin-framework","path":"plugin/framework","productSlugForLoader":"terraform-plugin-framework"},{"iconName":"plug","name":"Logging","navDataPrefix":"plugin-log","path":"plugin/log","productSlugForLoader":"terraform-plugin-log"},{"iconName":"plug","name":"Combining and Translating","navDataPrefix":"plugin-mux","path":"plugin/mux","productSlugForLoader":"terraform-plugin-mux"},{"iconName":"plug","name":"SDKv2","path":"plugin/sdkv2","productSlugForLoader":"terraform-plugin-sdk","navDataPrefix":"plugin-sdkv2"},{"iconName":"plug","name":"Testing","path":"plugin/testing","productSlugForLoader":"terraform-plugin-testing","navDataPrefix":"plugin-testing"},{"iconName":"plus-circle","name":"Registry Publishing","path":"registry","productSlugForLoader":"terraform-docs-common"}],"currentRootDocsPath":{"iconName":"code","name":"CDK for Terraform","path":"cdktf","productSlugForLoader":"terraform-cdk"}},"projectName":"CDK For Terraform","versions":[{"name":"latest","label":"v0.20.x (latest)","isLatest":true,"releaseStage":"stable","version":"v0.20.x"},{"name":"v0.19.x","label":"v0.19.x","isLatest":false,"releaseStage":"stable","version":"v0.19.x"},{"name":"v0.18.x","label":"v0.18.x","isLatest":false,"releaseStage":"stable","version":"v0.18.x"},{"name":"v0.17.x","label":"v0.17.x","isLatest":false,"releaseStage":"stable","version":"v0.17.x"},{"name":"v0.16.x","label":"v0.16.x","isLatest":false,"releaseStage":"stable","version":"v0.16.x"},{"name":"v0.15.x","label":"v0.15.x","isLatest":false,"releaseStage":"stable","version":"v0.15.x"},{"name":"v0.14.x","label":"v0.14.x","isLatest":false,"releaseStage":"stable","version":"v0.14.x"},{"name":"v0.13.x","label":"v0.13.x","isLatest":false,"releaseStage":"stable","version":"v0.13.x"},{"name":"v0.12.x","label":"v0.12.x","isLatest":false,"releaseStage":"stable","version":"v0.12.x"},{"name":"v0.11.x","label":"v0.11.x","isLatest":false,"releaseStage":"stable","version":"v0.11.x"},{"name":"v0.10.x","label":"v0.10.x","isLatest":false,"releaseStage":"stable","version":"v0.10.x"},{"name":"v0.9.x","label":"v0.9.x","isLatest":false,"releaseStage":"stable","version":"v0.9.x"},{"name":"v0.8.x","label":"v0.8.x","isLatest":false,"releaseStage":"stable","version":"v0.8.x"}]},"__N_SSG":true},"page":"/terraform/cdktf/[[...page]]","query":{},"buildId":"xspVxkgNWcZILOYRvLBd5","isFallback":false,"isExperimentalCompile":false,"gsp":true,"scriptLoader":[]}</script><script nomodule="">window.MSInputMethodContext && document.documentMode && document.write('<script src="/ie-warning.js"><\x2fscript>');</script></body></html>