New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
backend/azurerm: Restore Azure Stack Hub support #28613
base: main
Are you sure you want to change the base?
Conversation
This commit restores support for Azure Stack Hub in the azurerm remote backend. It seems that support was first broken by hashicorp#26463 and then later in hashicorp#28181 the storage package was updated to an API profile incompatible with Azure Stack Hub. I've removed the mention of `stack` as a possible value for environment in the backend configuration documentation, it fails with a validation error and doesn't seem to be in use. Resolves hashicorp#28581.
storageProps.AccountPropertiesCreateParameters = &armStorage.AccountPropertiesCreateParameters{ | ||
AllowSharedKeyAccess: &allowSharedKeyAccess, | ||
} | ||
storageProps.AccountPropertiesCreateParameters = &armStorage.AccountPropertiesCreateParameters{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just removed this field, as it's not available in the older API profile. It doesn't seem to affect whether the test passes.
Is there any info on whether or not this will be merged? I can confirm that this fixed the issue for me on an Azure Stack Hub device. |
@@ -203,7 +203,7 @@ The following configuration options are supported: | |||
|
|||
* `key` - (Required) The name of the Blob used to retrieve/store Terraform's State file inside the Storage Container. | |||
|
|||
* `environment` - (Optional) The Azure Environment which should be used. This can also be sourced from the `ARM_ENVIRONMENT` environment variable. Possible values are `public`, `china`, `german`, `stack` and `usgovernment`. Defaults to `public`. | |||
* `environment` - (Optional) The Azure Environment which should be used. This can also be sourced from the `ARM_ENVIRONMENT` environment variable. Possible values are `public`, `china`, `german` and `usgovernment`. Defaults to `public`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe keep "stack" in the docs if support is being restored?
Will this also fix the Hashicorp Packer tool that is experiencing similar issues with Packer connecting to Azure Public Cloud by default instead of the local Azure Stack Hub? |
This PR restores support for Azure Stack Hub in the azurerm remote
backend. It seems that support was first broken by #26463 and then
later in #28181 the storage package was updated to an API profile
incompatible with Azure Stack Hub.
I've removed the mention of
stack
as a possible value forenvironment in the backend configuration documentation, it fails with
a validation error and doesn't seem to be in use.
Resolves #28581.
NOTE: As is, this PR might break some of the changes that was done in #28181 to resolve #20831. I've simply verified that the azurerm backend works against Azure Stack Hub with the given changes.