jason-johnson / azure-pipelines-tasks-terraform

Azure Pipelines extension for Terraform
MIT License
121 stars 52 forks source link

Create Storage account (TF state) with Infrastructure enabled #368

Closed SPALLADI closed 8 months ago

SPALLADI commented 10 months ago

Describe the bug I am using your extension in our Pipelines. Terraform init with in the extension creates storage account for TF state files. For our project we need our Storage account to have Infrastructure Encryption enabled. Do you have option for this? az storage account create \ --name \ --resource-group \ --location \ --sku Standard_RAGRS \ --kind StorageV2 \ --require-infrastructure-encryption To Reproduce image

Expected behavior I expect to create the Storage account with infrastructure enabled

Screenshots If applicable, add screenshots to help explain your problem.

Pipeline Logs Include logs that help demonstrate the problem. Please make sure to redact any sensitive info such as secrets.

Agent Configuration

Additional context Add any other context about the problem here.

jason-johnson commented 9 months ago

Hi @SPALLADI, thanks for the issue. In this case, wouldn't it be better to go ahead and create the storage account with your specific needs outside of the pipeline? Or at least in a separate step in your pipeline.

ensureBackend is a convenience feature but it's not intended to support every option storage accounts have (e.g. setting up private endpoints, CMK's, etc.).