CINXE.COM
Command: refresh | Terraform | HashiCorp Developer
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><title>Command: refresh | 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="The `terraform refresh` command reads the current settings from all managed remote objects and updates the Terraform state to match."/><meta name="twitter:description" content="The `terraform refresh` command reads the current settings from all managed remote objects and updates the Terraform state to match."/><meta property="og:site_name" content="Command: refresh | Terraform | HashiCorp Developer"/><meta property="og:title" content="Command: refresh | 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/cli/commands/refresh"/><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":"Terraform CLI","item":"https://developer.hashicorp.com/terraform/cli"}]}]</script><meta name="next-head-count" content="32"/><link data-next-font="" rel="preconnect" href="/" crossorigin="anonymous"/><link rel="preload" href="/_next/static/css/c4e429bfa0a6a34b.css?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" as="style"/><link rel="stylesheet" href="/_next/static/css/c4e429bfa0a6a34b.css?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" data-n-g=""/><link rel="preload" href="/_next/static/css/82b9cc80b84d25f7.css?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" as="style"/><link rel="stylesheet" href="/_next/static/css/82b9cc80b84d25f7.css?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" data-n-p=""/><link rel="preload" href="/_next/static/css/a23a4d5b8f64c49d.css?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" as="style"/><link rel="stylesheet" href="/_next/static/css/a23a4d5b8f64c49d.css?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" data-n-p=""/><link rel="preload" href="/_next/static/css/686380cdcb9bba8b.css?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" as="style"/><link rel="stylesheet" href="/_next/static/css/686380cdcb9bba8b.css?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" data-n-p=""/><link rel="preload" href="/_next/static/css/7c3fb308d5c63fc7.css?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" as="style"/><link rel="stylesheet" href="/_next/static/css/7c3fb308d5c63fc7.css?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" data-n-p=""/><link rel="preload" href="/_next/static/css/17746cad20c495ec.css?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" as="style"/><link rel="stylesheet" href="/_next/static/css/17746cad20c495ec.css?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" data-n-p=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K"></script><script src="/_next/static/chunks/webpack-99561b02e77b2351.js?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" defer=""></script><script src="/_next/static/chunks/framework-f2b655730fee1ac7.js?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" defer=""></script><script src="/_next/static/chunks/main-1241551f53f62635.js?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" defer=""></script><script src="/_next/static/chunks/pages/_app-8a473f1f488a19bf.js?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" defer=""></script><script src="/_next/static/chunks/5902-87f33039e0eec3ac.js?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" defer=""></script><script src="/_next/static/chunks/1395-3123953bf33a1a96.js?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" defer=""></script><script src="/_next/static/chunks/2273-2d3c65b146eaf65e.js?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" defer=""></script><script src="/_next/static/chunks/5675-efc9f24c3594ea92.js?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" defer=""></script><script src="/_next/static/chunks/6000-385d175dbbae1922.js?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" defer=""></script><script src="/_next/static/chunks/7181-3e3045cb27ed6ba0.js?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" defer=""></script><script src="/_next/static/chunks/9554-fb60cf4618db227c.js?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" defer=""></script><script src="/_next/static/chunks/7427-6ce68182b58ee028.js?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" defer=""></script><script src="/_next/static/chunks/5261-0f909cfff7611a53.js?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" defer=""></script><script src="/_next/static/chunks/6787-0935f1e5edf0f0cf.js?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" defer=""></script><script src="/_next/static/chunks/3786-34abdb13b229e38d.js?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" defer=""></script><script src="/_next/static/chunks/6842-a56c44eb3b2b7c0c.js?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" defer=""></script><script src="/_next/static/chunks/pages/terraform/cli/%5B%5B...page%5D%5D-ca6131f19524b337.js?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" defer=""></script><script src="/_next/static/5UHrWD8J8cIP19VzjLca1/_buildManifest.js?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" defer=""></script><script src="/_next/static/5UHrWD8J8cIP19VzjLca1/_ssgManifest.js?dpl=dpl_FJXsdYJyQZSXHCmUQ6ncif5fX57K" defer=""></script></head><body><div id="__next"><div class="style_root__dZhZu"><a href="https://live.hashiconf.com" class="style_linkElem__hCESK"><span class="style_textContainer__6CuI7 g-grid-container"><span class="style_tag__jbHGz g-type-body-small-x-strong">HashiConf 2024<!-- --> </span><span class="style_text__rwS0u g-type-body-small">Now streaming live from Boston!<span class="style_linkText__E8GJf g-type-body-small-x-strong"> <!-- -->Attend for free</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_now-streaming-live-from-boston!=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=":Rbald6j6:" 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=":Rdald6j6:" 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="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=":Rfald6j6:" 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 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">Terraform CLI</h2></div><ul class="sidebar_navList__4Rg4g"><li><a class="sidebar-nav-highlight-item_root___pPhp g-focus-ring-from-box-shadow sidebar-nav-highlight-item_theme-terraform__LHqSi" href="/terraform/cli"><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">Terraform CLI</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/cli/commands"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Basic CLI Features</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">Initializing Working Directories</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-7"><button class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" id="sidebar-nav-item-7-button"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Provisioning Infrastructure</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-12"><button class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" id="sidebar-nav-item-12-button"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Authenticating</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-16"><button class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" id="sidebar-nav-item-16-button"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Writing and Modifying Code</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-23"><button class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" id="sidebar-nav-item-23-button"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Inspecting Infrastructure</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-30"><button class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" id="sidebar-nav-item-30-button"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Importing Infrastructure</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 aria-controls="sidebar-nav-item-35-list" aria-expanded="true" 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">Manipulating State</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><ul id="sidebar-nav-item-35-list"><li id="sidebar-nav-item-36"><a class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" href="/terraform/cli/state"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Overview</span></a></li><li id="sidebar-nav-item-37"><a class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" href="/terraform/cli/state/resource-addressing"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Resource Addressing</span></a></li><li id="sidebar-nav-item-38"><a class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" href="/terraform/cli/commands/state"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX"><code>state</code></span></a></li><li id="sidebar-nav-item-39"><button aria-controls="sidebar-nav-item-39-list" aria-expanded="true" class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" id="sidebar-nav-item-39-button"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Inspecting State</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><ul id="sidebar-nav-item-39-list"><li id="sidebar-nav-item-40"><a class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" href="/terraform/cli/state/inspect"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Overview</span></a></li><li id="sidebar-nav-item-41"><a class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" href="/terraform/cli/commands/state/list"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX"><code>state list</code></span></a></li><li id="sidebar-nav-item-42"><a class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" href="/terraform/cli/commands/state/show"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX"><code>state show</code></span></a></li><li id="sidebar-nav-item-43"><a aria-current="page" class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" href="/terraform/cli/commands/refresh"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX"><code>refresh</code></span></a></li></ul></li><li id="sidebar-nav-item-44"><button class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" id="sidebar-nav-item-44-button"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Forcing Re-creation (Tainting)</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-48"><button class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" id="sidebar-nav-item-48-button"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Moving Resources</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-53"><button class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" id="sidebar-nav-item-53-button"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Disaster Recovery</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></ul></li><li id="sidebar-nav-item-58"><button class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" id="sidebar-nav-item-58-button"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Managing Workspaces</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-67"><button class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" id="sidebar-nav-item-67-button"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Managing Plugins</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-75"><button class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" id="sidebar-nav-item-75-button"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">CLI Configuration</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">Using HCP Terraform</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-83"><button class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" id="sidebar-nav-item-83-button"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Testing Terraform</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-86"><button class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" id="sidebar-nav-item-86-button"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Automating Terraform</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-89"><button class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" id="sidebar-nav-item-89-button"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Alphabetical List of Commands</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-134"><hr class="sidebar-horizontal-rule_root__UY7oh"/></li><li id="sidebar-nav-item-135"><a class="sidebar-nav-menu-item_sidebarNavMenuItem__PiyI8 g-focus-ring-from-box-shadow" href="/terraform/internals"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-regular sidebar-nav-menu-item_navMenuItemLabel__tJHwX">Terraform Internals</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-35" 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-35">(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-36" 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-36">(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-37" 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-37">(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-38" 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-38">(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"><a class="breadcrumb-bar_breadcrumbText__JvOrd g-focus-ring-from-box-shadow" href="/terraform/cli">Terraform CLI</a></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"><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-42-content" aria-expanded="false" aria-label="Choose a Terraform CLI version. Currently viewing v1.10.0 (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>v1.10.0 (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-42-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">Terraform</span></li><li class="list-item_root__ZdUej"><a class="list-item_link__l6lDd g-focus-ring-from-box-shadow" href="/terraform/cli/v1.11.x/commands/refresh" rel="nofollow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">v1.11.0 (alpha)</span></a></li><li class="list-item_root__ZdUej"><a class="list-item_link__l6lDd g-focus-ring-from-box-shadow" href="/terraform/cli/v1.9.x/commands/refresh" rel="nofollow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">v1.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/cli/v1.8.x/commands/refresh" rel="nofollow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">v1.8.x</span></a></li><li class="list-item_root__ZdUej"><a class="list-item_link__l6lDd g-focus-ring-from-box-shadow" href="/terraform/cli/v1.7.x/commands/refresh" rel="nofollow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">v1.7.x</span></a></li><li class="list-item_root__ZdUej"><a class="list-item_link__l6lDd g-focus-ring-from-box-shadow" href="/terraform/cli/v1.6.x/commands/refresh" rel="nofollow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">v1.6.x</span></a></li><li class="list-item_root__ZdUej"><a class="list-item_link__l6lDd g-focus-ring-from-box-shadow" href="/terraform/cli/v1.5.x/commands/refresh" rel="nofollow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">v1.5.x</span></a></li><li class="list-item_root__ZdUej"><a class="list-item_link__l6lDd g-focus-ring-from-box-shadow" href="/terraform/cli/v1.4.x/commands/refresh" rel="nofollow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">v1.4.x</span></a></li><li class="list-item_root__ZdUej"><a class="list-item_link__l6lDd g-focus-ring-from-box-shadow" href="/terraform/cli/v1.3.x/commands/refresh" rel="nofollow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">v1.3.x</span></a></li><li class="list-item_root__ZdUej"><a class="list-item_link__l6lDd g-focus-ring-from-box-shadow" href="/terraform/cli/v1.2.x/commands/refresh" rel="nofollow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">v1.2.x</span></a></li><li class="list-item_root__ZdUej"><a class="list-item_link__l6lDd g-focus-ring-from-box-shadow" href="/terraform/cli/v1.1.x/commands/refresh" rel="nofollow"><span class="text_root__r0DFB hds-typography-body-200 hds-font-weight-medium">v1.1 and earlier</span></a></li></ul></div></div></nav></div><div class="docs-page-heading_pageHeadingWrapper__LEMQ7"><h1 class="hds-typography-display-600 hds-font-weight-bold docs-plain-page-heading_root__HzRuX g-offset-scroll-margin-top" id="command-refresh">Command: refresh</h1></div></div><div class="dev-dot-content_root__UJDct hds-typography-body-300"><div class="docs-view_mdxContent___uMnx"><blockquote class="mdx-blockquote_blockquote__h7k9H"><p class="text_root__r0DFB hds-typography-body-300 hds-font-weight-regular mdx-p_p__ZTJEA"><strong>Hands-on:</strong> Try 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="/terraform/tutorials/state/refresh">Use Refresh-Only Mode to Sync Terraform State</a> tutorial.</p></blockquote><p class="text_root__r0DFB hds-typography-body-300 hds-font-weight-regular mdx-p_p__ZTJEA">The <code class="mdx-inline-code_inlineCode__p_0sy mdx-inline-code_size-200__YiF_7 hds-typography-code-200">terraform refresh</code> command reads the current settings from all managed remote objects and updates the Terraform state to match.</p><div class="alert alert-warning g-type-body"><p class="text_root__r0DFB hds-typography-body-300 hds-font-weight-regular mdx-p_p__ZTJEA"><em>Warning:</em> This command is deprecated, because its default behavior is unsafe if you have misconfigured credentials for any of your providers. See below for more information and recommended alternatives.</p></div><p class="text_root__r0DFB hds-typography-body-300 hds-font-weight-regular mdx-p_p__ZTJEA">This won't modify your real remote objects, but it will modify 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="/terraform/language/state">Terraform state</a>.</p><p class="text_root__r0DFB hds-typography-body-300 hds-font-weight-regular mdx-p_p__ZTJEA">You shouldn't typically need to use this command, because Terraform automatically performs the same refreshing actions as a part of creating a plan in both 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="/terraform/cli/commands/plan"><code class="mdx-inline-code_inlineCode__p_0sy mdx-inline-code_size-200__YiF_7 hds-typography-code-200">terraform plan</code></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/cli/commands/apply"><code class="mdx-inline-code_inlineCode__p_0sy mdx-inline-code_size-200__YiF_7 hds-typography-code-200">terraform apply</code></a> commands. This command is here primarily for backward compatibility, but we don't recommend using it because it provides no opportunity to review the effects of the operation before updating the state.</p><h2 id="usage" 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="usage permalink" href="/terraform/cli/commands/refresh#usage"><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>Usage</h2><p class="text_root__r0DFB hds-typography-body-300 hds-font-weight-regular mdx-p_p__ZTJEA">Usage: <code class="mdx-inline-code_inlineCode__p_0sy mdx-inline-code_size-200__YiF_7 hds-typography-code-200">terraform refresh [options]</code></p><p class="text_root__r0DFB hds-typography-body-300 hds-font-weight-regular mdx-p_p__ZTJEA">This command is effectively an alias for the following command:</p><div class="hds-code-block hds-code-block--theme-dark hds-code-block--is-standalone mdx-code-blocks_codeBlockMargin__xk4yr"><div class="hds-code-block__header"></div><div class="hds-code-block__body"><pre class="hds-code-block__code" id=":R4tdal6j6:" style="max-height:auto"><code><span><span class="line-of-code line-highlight-first line-highlight-last"><span>terraform apply -refresh-only -auto-approve</span> </span></span></code></pre><button class="hds-button hds-button--size-small hds-button--color-secondary-white hds-button--is-icon-only hds-copy-button hds-button--size-small hds-copy-button--status-idle hds-code-block__copy-button" aria-label="Copy" aria-describedby=":R4tdal6j6:"><div class="hds-button__icon"><svg class="flight-icon flight-icon-clipboard-copy" aria-hidden="true" fill="currentColor" id=":R7ctdal6j6:" width="100%" height="100%" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><use href="/_next/static/media/svg-sprite.8ce6dd4a.svg#flight-clipboard-copy-16"></use></svg></div></button></div></div><p class="text_root__r0DFB hds-typography-body-300 hds-font-weight-regular mdx-p_p__ZTJEA">Consequently, it supports all of the same options as <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/cli/commands/apply"><code class="mdx-inline-code_inlineCode__p_0sy mdx-inline-code_size-200__YiF_7 hds-typography-code-200">terraform apply</code></a> except that it does not accept a saved plan file, it doesn't allow selecting a planning mode other than "refresh only", and <code class="mdx-inline-code_inlineCode__p_0sy mdx-inline-code_size-200__YiF_7 hds-typography-code-200">-auto-approve</code> is always enabled.</p><p class="text_root__r0DFB hds-typography-body-300 hds-font-weight-regular mdx-p_p__ZTJEA">Automatically applying the effect of a refresh is risky. If you have misconfigured credentials for one or more providers, Terraform may be misled into thinking that all of the managed objects have been deleted, causing it to remove all of the tracked objects without any confirmation prompt.</p><p class="text_root__r0DFB hds-typography-body-300 hds-font-weight-regular mdx-p_p__ZTJEA">Instead, we recommend using the following command in order to get the same effect but with the opportunity to review the changes that Terraform has detected before committing them to the state:</p><div class="hds-code-block hds-code-block--theme-dark hds-code-block--is-standalone mdx-code-blocks_codeBlockMargin__xk4yr"><div class="hds-code-block__header"></div><div class="hds-code-block__body"><pre class="hds-code-block__code" id=":R6tdal6j6:" style="max-height:auto"><code><span><span class="line-of-code line-highlight-first line-highlight-last"><span>terraform apply -refresh-only</span> </span></span></code></pre><button class="hds-button hds-button--size-small hds-button--color-secondary-white hds-button--is-icon-only hds-copy-button hds-button--size-small hds-copy-button--status-idle hds-code-block__copy-button" aria-label="Copy" aria-describedby=":R6tdal6j6:"><div class="hds-button__icon"><svg class="flight-icon flight-icon-clipboard-copy" aria-hidden="true" fill="currentColor" id=":R7etdal6j6:" width="100%" height="100%" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><use href="/_next/static/media/svg-sprite.8ce6dd4a.svg#flight-clipboard-copy-16"></use></svg></div></button></div></div><p class="text_root__r0DFB hds-typography-body-300 hds-font-weight-regular mdx-p_p__ZTJEA">This alternative command will present an interactive prompt for you to confirm the detected changes.</p><p class="text_root__r0DFB hds-typography-body-300 hds-font-weight-regular mdx-p_p__ZTJEA">The <code class="mdx-inline-code_inlineCode__p_0sy mdx-inline-code_size-200__YiF_7 hds-typography-code-200">-refresh-only</code> option for <code class="mdx-inline-code_inlineCode__p_0sy mdx-inline-code_size-200__YiF_7 hds-typography-code-200">terraform plan</code> and <code class="mdx-inline-code_inlineCode__p_0sy mdx-inline-code_size-200__YiF_7 hds-typography-code-200">terraform apply</code> was introduced in Terraform v0.15.4. For prior versions you must use <code class="mdx-inline-code_inlineCode__p_0sy mdx-inline-code_size-200__YiF_7 hds-typography-code-200">terraform refresh</code> directly if you need this behavior, while taking into account the warnings above. Wherever possible, avoid using <code class="mdx-inline-code_inlineCode__p_0sy mdx-inline-code_size-200__YiF_7 hds-typography-code-200">terraform refresh</code> explicitly and instead rely on Terraform's behavior of automatically refreshing existing objects as part of creating a normal plan.</p></div></div><a href="https://github.com/hashicorp/terraform/blob/main/website/docs/cli/commands/refresh.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/cli/commands/refresh#command-refresh">Command: refresh</a></li><li><a class="outline-link_root__S7fQg hds-typography-body-200 g-focus-ring-from-box-shadow" href="/terraform/cli/commands/refresh#usage">Usage</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-51">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-60" 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-60">(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":"Terraform CLI","url":"/terraform/cli","isCurrentPage":false},{"title":"commands"},{"title":"refresh"}],"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":"Terraform CLI","fullPath":"/terraform/cli","theme":"terraform"},{"title":"Basic CLI Features","href":null,"fullPath":"/terraform/cli/commands","id":"sidebar-nav-item-2","path":"/cli/commands"},{"title":"Initializing Working Directories","routes":[{"title":"Overview","path":"init","fullPath":"/terraform/cli/init","id":"sidebar-nav-item-4"},{"title":"\u003ccode\u003einit\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/init","id":"sidebar-nav-item-5","path":"/cli/commands/init"},{"title":"\u003ccode\u003eget\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/get","id":"sidebar-nav-item-6","path":"/cli/commands/get"}],"id":"sidebar-nav-item-3"},{"title":"Provisioning Infrastructure","routes":[{"title":"Overview","path":"run","fullPath":"/terraform/cli/run","id":"sidebar-nav-item-8"},{"title":"\u003ccode\u003eplan\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/plan","id":"sidebar-nav-item-9","path":"/cli/commands/plan"},{"title":"\u003ccode\u003eapply\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/apply","id":"sidebar-nav-item-10","path":"/cli/commands/apply"},{"title":"\u003ccode\u003edestroy\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/destroy","id":"sidebar-nav-item-11","path":"/cli/commands/destroy"}],"id":"sidebar-nav-item-7"},{"title":"Authenticating","routes":[{"title":"Overview","path":"auth","fullPath":"/terraform/cli/auth","id":"sidebar-nav-item-13"},{"title":"\u003ccode\u003elogin\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/login","id":"sidebar-nav-item-14","path":"/cli/commands/login"},{"title":"\u003ccode\u003elogout\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/logout","id":"sidebar-nav-item-15","path":"/cli/commands/logout"}],"id":"sidebar-nav-item-12"},{"title":"Writing and Modifying Code","routes":[{"title":"Overview","path":"code","fullPath":"/terraform/cli/code","id":"sidebar-nav-item-17"},{"title":"\u003ccode\u003econsole\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/console","id":"sidebar-nav-item-18","path":"/cli/commands/console"},{"title":"\u003ccode\u003efmt\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/fmt","id":"sidebar-nav-item-19","path":"/cli/commands/fmt"},{"title":"\u003ccode\u003evalidate\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/validate","id":"sidebar-nav-item-20","path":"/cli/commands/validate"},{"title":"\u003ccode\u003e0.13upgrade\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/0.13upgrade","id":"sidebar-nav-item-21","path":"/cli/commands/0.13upgrade"},{"title":"\u003ccode\u003e0.12upgrade\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/0.12upgrade","id":"sidebar-nav-item-22","path":"/cli/commands/0.12upgrade"}],"id":"sidebar-nav-item-16"},{"title":"Inspecting Infrastructure","routes":[{"title":"Overview","path":"inspect","fullPath":"/terraform/cli/inspect","id":"sidebar-nav-item-24"},{"title":"\u003ccode\u003egraph\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/graph","id":"sidebar-nav-item-25","path":"/cli/commands/graph"},{"title":"\u003ccode\u003eoutput\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/output","id":"sidebar-nav-item-26","path":"/cli/commands/output"},{"title":"\u003ccode\u003eshow\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/show","id":"sidebar-nav-item-27","path":"/cli/commands/show"},{"title":"\u003ccode\u003estate list\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/state/list","id":"sidebar-nav-item-28","path":"/cli/commands/state/list"},{"title":"\u003ccode\u003estate show\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/state/show","id":"sidebar-nav-item-29","path":"/cli/commands/state/show"}],"id":"sidebar-nav-item-23"},{"title":"Importing Infrastructure","routes":[{"title":"Overview","path":"import","fullPath":"/terraform/cli/import","id":"sidebar-nav-item-31"},{"title":"\u003ccode\u003eimport\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/import","id":"sidebar-nav-item-32","path":"/cli/commands/import"},{"title":"Usage Tips","path":"import/usage","fullPath":"/terraform/cli/import/usage","id":"sidebar-nav-item-33"},{"title":"Resource Importability","path":"import/importability","fullPath":"/terraform/cli/import/importability","id":"sidebar-nav-item-34"}],"id":"sidebar-nav-item-30"},{"title":"Manipulating State","routes":[{"title":"Overview","path":"state","fullPath":"/terraform/cli/state","id":"sidebar-nav-item-36"},{"title":"Resource Addressing","path":"state/resource-addressing","fullPath":"/terraform/cli/state/resource-addressing","id":"sidebar-nav-item-37"},{"title":"\u003ccode\u003estate\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/state","id":"sidebar-nav-item-38","path":"/cli/commands/state"},{"title":"Inspecting State","routes":[{"title":"Overview","path":"state/inspect","fullPath":"/terraform/cli/state/inspect","id":"sidebar-nav-item-40"},{"title":"\u003ccode\u003estate list\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/state/list","id":"sidebar-nav-item-41","path":"/cli/commands/state/list"},{"title":"\u003ccode\u003estate show\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/state/show","id":"sidebar-nav-item-42","path":"/cli/commands/state/show"},{"title":"\u003ccode\u003erefresh\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/refresh","id":"sidebar-nav-item-43","path":"/cli/commands/refresh"}],"id":"sidebar-nav-item-39"},{"title":"Forcing Re-creation (Tainting)","routes":[{"title":"Overview","path":"state/taint","fullPath":"/terraform/cli/state/taint","id":"sidebar-nav-item-45"},{"title":"\u003ccode\u003etaint\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/taint","id":"sidebar-nav-item-46","path":"/cli/commands/taint"},{"title":"\u003ccode\u003euntaint\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/untaint","id":"sidebar-nav-item-47","path":"/cli/commands/untaint"}],"id":"sidebar-nav-item-44"},{"title":"Moving Resources","routes":[{"title":"Overview","path":"state/move","fullPath":"/terraform/cli/state/move","id":"sidebar-nav-item-49"},{"title":"\u003ccode\u003estate mv\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/state/mv","id":"sidebar-nav-item-50","path":"/cli/commands/state/mv"},{"title":"\u003ccode\u003estate rm\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/state/rm","id":"sidebar-nav-item-51","path":"/cli/commands/state/rm"},{"title":"\u003ccode\u003estate replace-provider\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/state/replace-provider","id":"sidebar-nav-item-52","path":"/cli/commands/state/replace-provider"}],"id":"sidebar-nav-item-48"},{"title":"Disaster Recovery","routes":[{"title":"Overview","path":"state/recover","fullPath":"/terraform/cli/state/recover","id":"sidebar-nav-item-54"},{"title":"\u003ccode\u003estate pull\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/state/pull","id":"sidebar-nav-item-55","path":"/cli/commands/state/pull"},{"title":"\u003ccode\u003estate push\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/state/push","id":"sidebar-nav-item-56","path":"/cli/commands/state/push"},{"title":"\u003ccode\u003eforce-unlock\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/force-unlock","id":"sidebar-nav-item-57","path":"/cli/commands/force-unlock"}],"id":"sidebar-nav-item-53"}],"id":"sidebar-nav-item-35"},{"title":"Managing Workspaces","routes":[{"title":"Overview","path":"workspaces","fullPath":"/terraform/cli/workspaces","id":"sidebar-nav-item-59"},{"title":"\u003ccode\u003eworkspace\u003c/code\u003e","routes":[{"title":"Overview","href":null,"fullPath":"/terraform/cli/commands/workspace","id":"sidebar-nav-item-61","path":"/cli/commands/workspace"},{"title":"\u003ccode\u003eworkspace list\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/workspace/list","id":"sidebar-nav-item-62","path":"/cli/commands/workspace/list"},{"title":"\u003ccode\u003eworkspace select\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/workspace/select","id":"sidebar-nav-item-63","path":"/cli/commands/workspace/select"},{"title":"\u003ccode\u003eworkspace new\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/workspace/new","id":"sidebar-nav-item-64","path":"/cli/commands/workspace/new"},{"title":"\u003ccode\u003eworkspace delete\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/workspace/delete","id":"sidebar-nav-item-65","path":"/cli/commands/workspace/delete"},{"title":"\u003ccode\u003eworkspace show\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/workspace/show","id":"sidebar-nav-item-66","path":"/cli/commands/workspace/show"}],"id":"sidebar-nav-item-60"}],"id":"sidebar-nav-item-58"},{"title":"Managing Plugins","routes":[{"title":"Overview","path":"plugins","fullPath":"/terraform/cli/plugins","id":"sidebar-nav-item-68"},{"title":"Plugin Signing","path":"plugins/signing","fullPath":"/terraform/cli/plugins/signing","id":"sidebar-nav-item-69"},{"title":"\u003ccode\u003eproviders\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/providers","id":"sidebar-nav-item-70","path":"/cli/commands/providers"},{"title":"\u003ccode\u003eversion\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/version","id":"sidebar-nav-item-71","path":"/cli/commands/version"},{"title":"\u003ccode\u003eproviders lock\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/providers/lock","id":"sidebar-nav-item-72","path":"/cli/commands/providers/lock"},{"title":"\u003ccode\u003eproviders mirror\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/providers/mirror","id":"sidebar-nav-item-73","path":"/cli/commands/providers/mirror"},{"title":"\u003ccode\u003eproviders schema\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/providers/schema","id":"sidebar-nav-item-74","path":"/cli/commands/providers/schema"}],"id":"sidebar-nav-item-67"},{"title":"CLI Configuration","routes":[{"title":"Overview","path":"config","fullPath":"/terraform/cli/config","id":"sidebar-nav-item-76"},{"title":"CLI Configuration","path":"config/config-file","fullPath":"/terraform/cli/config/config-file","id":"sidebar-nav-item-77"},{"title":"Environment Variables","path":"config/environment-variables","fullPath":"/terraform/cli/config/environment-variables","id":"sidebar-nav-item-78"}],"id":"sidebar-nav-item-75"},{"title":"Using HCP Terraform","routes":[{"title":"Overview","path":"cloud","fullPath":"/terraform/cli/cloud","id":"sidebar-nav-item-80"},{"title":"Connect to HCP Terraform","path":"cloud/settings","fullPath":"/terraform/cli/cloud/settings","id":"sidebar-nav-item-81"},{"title":"Command Line Arguments","path":"cloud/command-line-arguments","fullPath":"/terraform/cli/cloud/command-line-arguments","id":"sidebar-nav-item-82"}],"id":"sidebar-nav-item-79"},{"title":"Testing Terraform","routes":[{"title":"Overview","path":"test","fullPath":"/terraform/cli/test","id":"sidebar-nav-item-84"},{"title":"\u003ccode\u003etest\u003ccode\u003e","href":null,"fullPath":"/terraform/cli/commands/test","id":"sidebar-nav-item-85","path":"/cli/commands/test"}],"id":"sidebar-nav-item-83"},{"title":"Automating Terraform","routes":[{"title":"Running Terraform in Automation","href":"/terraform/tutorials/automation/automate-terraform?utm_source=WEBSITE\u0026utm_medium=WEB_IO\u0026utm_offer=ARTICLE_PAGE\u0026utm_content=DOCS","id":"sidebar-nav-item-87"},{"title":"GitHub Actions","href":"/terraform/tutorials/automation/github-actions?utm_source=WEBSITE\u0026utm_medium=WEB_IO\u0026utm_offer=ARTICLE_PAGE\u0026utm_content=DOCS","id":"sidebar-nav-item-88"}],"id":"sidebar-nav-item-86"},{"title":"Alphabetical List of Commands","routes":[{"title":"Overview","href":null,"fullPath":"/terraform/cli/commands","id":"sidebar-nav-item-90","path":"/cli/commands"},{"title":"\u003ccode\u003eapply\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/apply","id":"sidebar-nav-item-91","path":"/cli/commands/apply"},{"title":"\u003ccode\u003econsole\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/console","id":"sidebar-nav-item-92","path":"/cli/commands/console"},{"title":"\u003ccode\u003edestroy\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/destroy","id":"sidebar-nav-item-93","path":"/cli/commands/destroy"},{"title":"\u003ccode\u003eenv\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/env","id":"sidebar-nav-item-94","path":"/cli/commands/env"},{"title":"\u003ccode\u003efmt\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/fmt","id":"sidebar-nav-item-95","path":"/cli/commands/fmt"},{"title":"\u003ccode\u003eforce-unlock\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/force-unlock","id":"sidebar-nav-item-96","path":"/cli/commands/force-unlock"},{"title":"\u003ccode\u003eget\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/get","id":"sidebar-nav-item-97","path":"/cli/commands/get"},{"title":"\u003ccode\u003egraph\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/graph","id":"sidebar-nav-item-98","path":"/cli/commands/graph"},{"title":"\u003ccode\u003eimport\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/import","id":"sidebar-nav-item-99","path":"/cli/commands/import"},{"title":"\u003ccode\u003einit\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/init","id":"sidebar-nav-item-100","path":"/cli/commands/init"},{"title":"\u003ccode\u003elogin\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/login","id":"sidebar-nav-item-101","path":"/cli/commands/login"},{"title":"\u003ccode\u003elogout\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/logout","id":"sidebar-nav-item-102","path":"/cli/commands/logout"},{"title":"\u003ccode\u003emodules\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/modules","id":"sidebar-nav-item-103","path":"/cli/commands/modules"},{"title":"\u003ccode\u003eoutput\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/output","id":"sidebar-nav-item-104","path":"/cli/commands/output"},{"title":"\u003ccode\u003eplan\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/plan","id":"sidebar-nav-item-105","path":"/cli/commands/plan"},{"title":"\u003ccode\u003eproviders\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/providers","id":"sidebar-nav-item-106","path":"/cli/commands/providers"},{"title":"\u003ccode\u003eproviders lock\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/providers/lock","id":"sidebar-nav-item-107","path":"/cli/commands/providers/lock"},{"title":"\u003ccode\u003eproviders mirror\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/providers/mirror","id":"sidebar-nav-item-108","path":"/cli/commands/providers/mirror"},{"title":"\u003ccode\u003eproviders schema\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/providers/schema","id":"sidebar-nav-item-109","path":"/cli/commands/providers/schema"},{"title":"\u003ccode\u003epush (deprecated)\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/push","id":"sidebar-nav-item-110","path":"/cli/commands/push"},{"title":"\u003ccode\u003erefresh\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/refresh","id":"sidebar-nav-item-111","path":"/cli/commands/refresh"},{"title":"\u003ccode\u003eshow\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/show","id":"sidebar-nav-item-112","path":"/cli/commands/show"},{"title":"\u003ccode\u003estate\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/state","id":"sidebar-nav-item-113","path":"/cli/commands/state"},{"title":"\u003ccode\u003estate list\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/state/list","id":"sidebar-nav-item-114","path":"/cli/commands/state/list"},{"title":"\u003ccode\u003estate mv\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/state/mv","id":"sidebar-nav-item-115","path":"/cli/commands/state/mv"},{"title":"\u003ccode\u003estate pull\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/state/pull","id":"sidebar-nav-item-116","path":"/cli/commands/state/pull"},{"title":"\u003ccode\u003estate push\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/state/push","id":"sidebar-nav-item-117","path":"/cli/commands/state/push"},{"title":"\u003ccode\u003estate replace-provider\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/state/replace-provider","id":"sidebar-nav-item-118","path":"/cli/commands/state/replace-provider"},{"title":"\u003ccode\u003estate rm\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/state/rm","id":"sidebar-nav-item-119","path":"/cli/commands/state/rm"},{"title":"\u003ccode\u003estate show\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/state/show","id":"sidebar-nav-item-120","path":"/cli/commands/state/show"},{"title":"\u003ccode\u003etaint\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/taint","id":"sidebar-nav-item-121","path":"/cli/commands/taint"},{"title":"\u003ccode\u003etest\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/test","id":"sidebar-nav-item-122","path":"/cli/commands/test"},{"title":"\u003ccode\u003euntaint\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/untaint","id":"sidebar-nav-item-123","path":"/cli/commands/untaint"},{"title":"\u003ccode\u003evalidate\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/validate","id":"sidebar-nav-item-124","path":"/cli/commands/validate"},{"title":"\u003ccode\u003eversion\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/version","id":"sidebar-nav-item-125","path":"/cli/commands/version"},{"title":"\u003ccode\u003eworkspace\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/workspace","id":"sidebar-nav-item-126","path":"/cli/commands/workspace"},{"title":"\u003ccode\u003eworkspace list\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/workspace/list","id":"sidebar-nav-item-127","path":"/cli/commands/workspace/list"},{"title":"\u003ccode\u003eworkspace select\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/workspace/select","id":"sidebar-nav-item-128","path":"/cli/commands/workspace/select"},{"title":"\u003ccode\u003eworkspace new\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/workspace/new","id":"sidebar-nav-item-129","path":"/cli/commands/workspace/new"},{"title":"\u003ccode\u003eworkspace delete\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/workspace/delete","id":"sidebar-nav-item-130","path":"/cli/commands/workspace/delete"},{"title":"\u003ccode\u003eworkspace show\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/workspace/show","id":"sidebar-nav-item-131","path":"/cli/commands/workspace/show"},{"title":"\u003ccode\u003e0.12upgrade\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/0.12upgrade","id":"sidebar-nav-item-132","path":"/cli/commands/0.12upgrade"},{"title":"\u003ccode\u003e0.13upgrade\u003c/code\u003e","href":null,"fullPath":"/terraform/cli/commands/0.13upgrade","id":"sidebar-nav-item-133","path":"/cli/commands/0.13upgrade"}],"id":"sidebar-nav-item-89"},{"divider":true,"id":"sidebar-nav-item-134"},{"title":"Terraform Internals","href":null,"fullPath":"/terraform/internals","id":"sidebar-nav-item-135","path":"/internals"}],"title":"Terraform CLI","visuallyHideTitle":true}],"mainWidth":"narrow","githubFileUrl":"https://github.com/hashicorp/terraform/blob/main/website/docs/cli/commands/refresh.mdx"},"metadata":{"title":"Command: refresh","description":"The `terraform refresh` command reads the current settings from all managed\nremote objects and updates the Terraform state to match.","layout":null},"outlineItems":[{"title":"Command: refresh","url":"#command-refresh"},{"title":"Usage","url":"#usage"}],"pageHeading":{"id":"command-refresh","title":"Command: refresh"},"mdxSource":{"compiledSource":"const layoutProps={};const MDXLayout=\"wrapper\";function MDXContent({components,...props}){return mdx(MDXLayout,{...layoutProps,...props,components:components,mdxType:\"MDXLayout\"},mdx(\"blockquote\",null,mdx(\"p\",{parentName:\"blockquote\"},mdx(\"strong\",{parentName:\"p\"},`Hands-on:`),` Try the `,mdx(\"a\",{parentName:\"p\",\"href\":\"/terraform/tutorials/state/refresh\"},`Use Refresh-Only Mode to Sync Terraform State`),` tutorial.`)),mdx(\"p\",null,`The `,mdx(\"inlineCode\",{parentName:\"p\"},`terraform refresh`),` command reads the current settings from all managed\nremote objects and updates the Terraform state to match.`),mdx(\"div\",{className:\"alert alert-warning g-type-body\"},mdx(\"p\",null,mdx(\"em\",{parentName:\"p\"},`Warning:`),` This command is deprecated, because its default behavior is\nunsafe if you have misconfigured credentials for any of your providers.\nSee below for more information and recommended alternatives.`)),mdx(\"p\",null,`This won't modify your real remote objects, but it will modify the\n`,mdx(\"a\",{parentName:\"p\",\"href\":\"/terraform/language/state\"},`Terraform state`),`.`),mdx(\"p\",null,`You shouldn't typically need to use this command, because Terraform\nautomatically performs the same refreshing actions as a part of creating\na plan in both the\n`,mdx(\"a\",{parentName:\"p\",\"href\":\"/terraform/cli/commands/plan\"},mdx(\"inlineCode\",{parentName:\"a\"},`terraform plan`)),`\nand\n`,mdx(\"a\",{parentName:\"p\",\"href\":\"/terraform/cli/commands/apply\"},mdx(\"inlineCode\",{parentName:\"a\"},`terraform apply`)),`\ncommands. This command is here primarily for backward compatibility, but\nwe don't recommend using it because it provides no opportunity to review\nthe effects of the operation before updating the state.`),mdx(\"h2\",{\"id\":\"usage\"},mdx(\"a\",{parentName:\"h2\",\"className\":\"__permalink-h\",\"href\":\"#usage\",\"aria-label\":\"usage permalink\"},`\\xbb`),`Usage`),mdx(\"p\",null,`Usage: `,mdx(\"inlineCode\",{parentName:\"p\"},`terraform refresh [options]`)),mdx(\"p\",null,`This command is effectively an alias for the following command:`),mdx(\"pre\",null,mdx(\"code\",{parentName:\"pre\"},`terraform apply -refresh-only -auto-approve\n`)),mdx(\"p\",null,`Consequently, it supports all of the same options as\n`,mdx(\"a\",{parentName:\"p\",\"href\":\"/terraform/cli/commands/apply\"},mdx(\"inlineCode\",{parentName:\"a\"},`terraform apply`)),` except that it does not accept a saved\nplan file, it doesn't allow selecting a planning mode other than \"refresh only\",\nand `,mdx(\"inlineCode\",{parentName:\"p\"},`-auto-approve`),` is always enabled.`),mdx(\"p\",null,`Automatically applying the effect of a refresh is risky. If you have\nmisconfigured credentials for one or more providers, Terraform may\nbe misled into thinking that all of the managed objects have been deleted,\ncausing it to remove all of the tracked objects without any confirmation prompt.`),mdx(\"p\",null,`Instead, we recommend using the following command in order to get the same\neffect but with the opportunity to review the changes that Terraform has\ndetected before committing them to the state:`),mdx(\"pre\",null,mdx(\"code\",{parentName:\"pre\"},`terraform apply -refresh-only\n`)),mdx(\"p\",null,`This alternative command will present an interactive prompt for you to confirm\nthe detected changes.`),mdx(\"p\",null,`The `,mdx(\"inlineCode\",{parentName:\"p\"},`-refresh-only`),` option for `,mdx(\"inlineCode\",{parentName:\"p\"},`terraform plan`),` and `,mdx(\"inlineCode\",{parentName:\"p\"},`terraform apply`),` was\nintroduced in Terraform v0.15.4. For prior versions you must use\n`,mdx(\"inlineCode\",{parentName:\"p\"},`terraform refresh`),` directly if you need this behavior, while taking into\naccount the warnings above. Wherever possible, avoid using `,mdx(\"inlineCode\",{parentName:\"p\"},`terraform refresh`),`\nexplicitly and instead rely on Terraform's behavior of automatically refreshing\nexisting objects as part of creating a normal plan.`))};MDXContent.isMDXComponent=true;","scope":{"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":"terminal-screen","name":"Terraform CLI","path":"cli"}},"projectName":null,"versions":[{"name":"v1.11.x","label":"v1.11.0 (alpha)","isLatest":false,"releaseStage":"alpha","version":"v1.11.x"},{"name":"latest","label":"v1.10.0 (latest)","isLatest":true,"releaseStage":"stable","version":"v1.10.x"},{"name":"v1.9.x","label":"v1.9.x","isLatest":false,"releaseStage":"stable","version":"v1.9.x"},{"name":"v1.8.x","label":"v1.8.x","isLatest":false,"releaseStage":"stable","version":"v1.8.x"},{"name":"v1.7.x","label":"v1.7.x","isLatest":false,"releaseStage":"stable","version":"v1.7.x"},{"name":"v1.6.x","label":"v1.6.x","isLatest":false,"releaseStage":"stable","version":"v1.6.x"},{"name":"v1.5.x","label":"v1.5.x","isLatest":false,"releaseStage":"stable","version":"v1.5.x"},{"name":"v1.4.x","label":"v1.4.x","isLatest":false,"releaseStage":"stable","version":"v1.4.x"},{"name":"v1.3.x","label":"v1.3.x","isLatest":false,"releaseStage":"stable","version":"v1.3.x"},{"name":"v1.2.x","label":"v1.2.x","isLatest":false,"releaseStage":"stable","version":"v1.2.x"},{"name":"v1.1.x","label":"v1.1 and earlier","isLatest":false,"releaseStage":"stable","version":"v1.1.x"}]},"__N_SSG":true},"page":"/terraform/cli/[[...page]]","query":{"page":["commands","refresh"]},"buildId":"5UHrWD8J8cIP19VzjLca1","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>