-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Storage Account: Add identity property #1323
Merged
katbyte
merged 11 commits into
hashicorp:master
from
lstolyarov:storage-account-identity
Jun 14, 2018
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
ac0ccbe
Add the storage account object id as an output
leostolyarov 68d994d
Update the storage account resource to include identity
leostolyarov 28f4b30
Add the storage account identity tests
leostolyarov c3f58da
Update the storage account identity block documentation
leostolyarov f7df70d
Checking identity type is not nill
leostolyarov 8dd38e2
Updating storage account identity documentation
leostolyarov 8a2457e
Updating to make the updateResourceByEnablingIdentity test pass
leostolyarov 0b448c8
Merge branch 'master' into storage-account-identity
lstolyarov cb8dd58
Running fmt
leostolyarov a0db137
Update resource_arm_storage_account.go
katbyte 86fe88c
Update resource_arm_storage_account.go
katbyte File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@lstolyarov you'll want to use
resp.[XX]Properties.Identity
here - since the top level fieldsresp.Identity
isn't guaranteed to have a value, unfortunately. These fields exist primarily for the older API's where the responses aren't guaranteed in theproperties
block in the JSONThere 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.
@tombuildsstuff what do you mean by
[XX]Properties
? There is anAccountProperties
filed inresp
but that does not have anIdentity
fieldThere 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.
The
properties
field is prefixed with the name of the struct, so it's different (hence[XX]Properties
, sorry I should have looked this up).I don't see any option to enable this in the Portal - is this feature in Preview?
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.
Well it is not really a feature. This PR is to be able to extract the Object ID (or Principal ID as it is referred to in the SDK). I don't think there is any anyway to get this information out in the portal - it could be extracted with powershell.
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.
sorry, I was referring to pulling this out via the API/SDK - I'm not sure if you've seen it but the Azure Resources Explorer can be really helpful here.
In other API's (e.g. App Service) the
identity
block won't be returned from the API until it's enabled, which can be done by sending the following Request (in the Create/Update):Once the Identity's assigned, the
identity
block returned from the API SDK as Principal ID/Object ID. That said, given this isn't available in the Portal yet - and I can't see any reference to it online; I have a feeling this may be in Preview?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.
Ok, that makes more sense now.
Thanks for the Azure Resources Explorer - its really useful.
I am not sure if it would technically count as a preview feature or not. My understanding that behind the scenes all resources have object ids and this is required as input for key vault. It is not really useful in the portal as when you enable storage account encryption and select the key vault you want to use that object id gets populated automatically.