How to Troubleshoot an Azure Storage Account with a Private Endpoint and a Container with Terraform

<p>Today, we will discuss a common error when deploying an&nbsp;<strong>Azure Azure Storage Account with a Private Endpoint</strong>&nbsp;with Terraform.</p> <p>After we try to add a&nbsp;<strong>Storage Account Container</strong>, we receive the following error:</p> <blockquote> <p>Error: containers.Client#GetProperties: Failure responding to request: StatusCode=403 &mdash; Original Error: autorest/azure: Service returned an error. Status=403 Code=&rdquo;AuthorizationFailure&rdquo; Message=&rdquo;This request is not authorized to perform this operation.\nRequestId:1b7570b6&ndash;101e-005f-296f-f7f2e3000000\nTime:2023&ndash;10&ndash;05T09:37:49.1892533Z&rdquo;</p> </blockquote> <h1>1. Our Scenario</h1> <ol> <li>We have a virtual machine running Terraform.</li> </ol> <ul> <li>Resource group&nbsp;<strong>&ldquo;kopicloud-core-dev-we-rg&rdquo;</strong></li> <li>Virtual Network &ldquo;<strong>kopicloud-core-dev-we-vnet&rdquo;</strong></li> <li>Subnet&nbsp;<strong>&ldquo;kopicloud-core-dev-we-subnet&rdquo;</strong></li> </ul> <p>2. We have an existing&nbsp;<strong>&ldquo;privatelink.blob.core.windows.net&rdquo;</strong>&nbsp;Private DNS Zone.</p> <ul> <li>Resource group&nbsp;<strong>&ldquo;kopicloud-core-dev-we-dns-rg&rdquo;</strong></li> </ul> <p><a href="https://gmusumeci.medium.com/how-to-troubleshoot-an-azure-storage-account-with-a-private-endpoint-and-a-container-with-terraform-c907f8f49d2b"><strong>Read More</strong></a></p>