terraform icon indicating copy to clipboard operation
terraform copied to clipboard

docs: azurerm backend updates for 1.11 release

Open jaredfholgate opened this issue 10 months ago • 2 comments

This PR is to update the azurerm backend docs for correctness following the 1.11 release.

Related: https://github.com/hashicorp/terraform/pull/36623

Target Release

1.11.1

CHANGELOG entry

  • [ ] This change is user-facing and I added a changelog entry.
  • [ ] This change is not user-facing.

jaredfholgate avatar Mar 05 '25 12:03 jaredfholgate

@magodo Thanks for your feedback. I decided to completely refactor the docs in an attempt to make them more understandable. I'm hoping this is an improvement and fits better with your advice?

jaredfholgate avatar Mar 06 '25 13:03 jaredfholgate

Hi @jaredfholgate, thanks for the effort to refactor the document! I've left some minor comments about the wording, then I noticed the overall structure of the sections is like below:

  1. Direct AAD (i.e. AAD Auth Storage API)
  • 5 subtypes
  1. Indirect AAD with URI lookup
  • 5 subtypes
  1. Indirect Access Key Lookup
  • 5 subtypes
  1. Direct Access Key
  2. Direct SAS Token

Besides the non-necessary repeating of the 5 AAD auth sub types, the first level of category seems not correct. The 2nd point is actually something can apply to every other categories, meaning it is not fit to put along with the others.

Ideally, can we re-organize as below (I know that's a lot of efforts, appreciate your patience :)):

Required Config

  • storage_account_name
  • container_name
  • key_name

The other configs depends on the auth method you've chosen. See below.

Auth

  1. AAD Auth (recommended)
  • reference to AAD auth (5 subtypes)
  • config: use_azuread_auth=true and attributes in AAD Auth section
  • permission: Storage Blob Data Reader/Contributor
  1. Access Key
  • config: access_key
  1. SAS Token
  • config: sas_token
  1. Access Key (lookup)
  • reference to AAD auth (5 subtypes)
  • config: subscription_id, resource_group_name and attributes in AAD Auth section
  • permission: storageAccounts/listKeys, storageAccounts/read

AAD Auth

Listing the detailed configs for the 5 subtypes AAD auth methods:

  1. OIDC (recommended)
  2. MI (recommended)
  3. Client secret
  4. Client certificate
  5. Azure CLI: Mention that tenant_id and subscription_id are optional and can be inferred

Optional Arguments

Listing the remaining arguments:

  • ...
  • lookup_blob_endpoint: This requires AAD Auth setting (See AAD Auth), and requires permission storageAccounts/read
  • ...

Thanks, I have made these changes now.

jaredfholgate avatar Mar 07 '25 09:03 jaredfholgate

@jaredfholgate Fantastic! Thanks for updating this, it LGTM!

magodo avatar Mar 10 '25 02:03 magodo

@crw This PR is ready for review and release in 1.11.1. It is a sister PR for: #36623

Thanks

jaredfholgate avatar Mar 10 '25 11:03 jaredfholgate

@jaredfholgate thanks a lot for your contribution! We don't need a changelog for docs-related changes, so I've added the no-changelog-needed label. Can you please delete the changelog file?

dbanck avatar Mar 12 '25 09:03 dbanck

@jaredfholgate thanks a lot for your contribution! We don't need a changelog for docs-related changes, so I've added the no-changelog-needed label. Can you please delete the changelog file?

@dbanck Done and rebased onto main

jaredfholgate avatar Mar 12 '25 10:03 jaredfholgate

Thanks @jaredfholgate! Just some feedback to bring it in line with HashiCorp's style guide and consistency across backend documentation. There's a few places where I wanted to verify that my suggestion didn't change the intention of the original wording. I left a comment on the first instance of it, but it's the places we document the trio of the storage_account_name, container_name, and key configuration options.

Otherwise the rest should just be style tweaks, and this LGTM! Thanks again!

Hi @BrianMMcClain. Thanks for the comprehensive review. I have merged all those changes now.

jaredfholgate avatar Mar 14 '25 12:03 jaredfholgate

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Apr 14 '25 02:04 github-actions[bot]