Skip to content
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

azurerm_storage_account: adding support for account_kind being StorageV2 #851

Merged
merged 3 commits into from
Feb 19, 2018
Merged

azurerm_storage_account: adding support for account_kind being StorageV2 #851

merged 3 commits into from
Feb 19, 2018

Conversation

justenwalker
Copy link
Contributor

@justenwalker justenwalker commented Feb 16, 2018

Fixes #806

This PR adds support for account_kind = "StorageV2" in azurerm_storage_account
In order to achieve this, the Storage API was upgraded to 2017-10-01 and changes needed to be made to make the management API calls consistent with the new call signatures.

Specifically:

  • 2017-10-01 removed a lot of Context parameters from API calls, so sadly they had to be removed in order for this to compile.
  • In addition, the storage account Create api uses a cancel channel instead of a context, so this update passes in the ctx.Done() channel so that at least these operations can be cancelled.
  • One good thing in this new version is that the Create API returns an account on a channel, so that the additional call to GetProperties is unnecessary to retrieve the account id

- 2017-10-01 removed a lot of Context parameters from API calls, so
  sadly they had to be removed in order for this to compile.
- In addition, the storage account Create api uses a cancel-channel
  instead of a context, so this update passes in the ctx.Done() channel
  so that at least these operations can be cancelled.
- One good thing in this new version is that the Create API returns an
  account on a channel, so that the additional call to GetProperties is
  unnecessary to retrieve the account id
- Add StorageV2 to account_kind validation
- Allow access_tier to be set on StorageV2 kinds
Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @justenwalker

Thanks for this PR - I've taken a look through and this LGTM 👍 I'll kick off the test suite now

Thanks!

@tombuildsstuff
Copy link
Contributor

Ignoring some known Azure issues (storage encryption is becoming required) - the tests pass:

screen shot 2018-02-19 at 12 24 11

Thanks again for this PR :)

@tombuildsstuff tombuildsstuff changed the title Add support for StorageV2 account_kind azurerm_storage_account: adding support for account_kind being StorageV2 Feb 19, 2018
@tombuildsstuff tombuildsstuff merged commit 83ecdac into hashicorp:master Feb 19, 2018
tombuildsstuff added a commit that referenced this pull request Feb 19, 2018
@justenwalker justenwalker deleted the storage-account-gpv2 branch February 19, 2018 23:51
@ghost
Copy link

ghost commented Mar 31, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: support for StorageV2 kind in azurerm_storage_account.account_kind
2 participants