Missing instruction for Azure Setup document for object_id #4803

Closed
TsuyoshiUshio opened this Issue Apr 19, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@TsuyoshiUshio
Contributor

TsuyoshiUshio commented Apr 19, 2017

We need to specify object_id when we build Windows image on Azure.
However, we can't find any instruction. Only see it on an example on this. However, object_id is ambiguous term. User might very hard to understand what is it?

Unless object_id, we get this error and it is very hard to identify the root cause.

Microsoft.KeyVault/vaults
{
  "error": {
    "code": "BadRequest",
    "message": "An invalid value was provided for 'accessPolicies'."
  }
}

The root cause is GetKeyValutDeployment needs object_id.

ObjectId: &template.TemplateParameter{Value: config.ObjectID},

GetKeyVaultDeployment is called only for Windows.

NewStepValidateTemplate(azureClient, ui, b.config, GetKeyVaultDeployment),

These is no instruction on this doc.
https://github.com/hashicorp/packer/blob/master/website/source/docs/builders/azure-setup.html.md

So I edit the doc and add explanation and sent a pull request.

#4802

You can get ObjectID from ClientID. I recommend we can remove object_id and get it from ClientID for the user's convenience. If you like this idea, I'll try to hack and send a pull request.

@boumenot

This comment has been minimized.

Show comment
Hide comment
@boumenot

boumenot Apr 19, 2017

Collaborator

Thank you for opening an issue! I'm sorry you struggled with this so much. The documentation update looks good to me.

Collaborator

boumenot commented Apr 19, 2017

Thank you for opening an issue! I'm sorry you struggled with this so much. The documentation update looks good to me.

@mwhooker mwhooker closed this in #4802 Apr 19, 2017

@Morlince

This comment has been minimized.

Show comment
Hide comment
@Morlince

Morlince Aug 17, 2017

@boumenot @TsuyoshiUshio

https://www.packer.io/docs/builders/azure.html

This page still does not reference the need for object_id as required input. The setup page does state it as required, but the builder info page does not.

I had to add the string in my template file to get it to run successfully. Did this get resolved to pull the ObjectID from ClientID?

Morlince commented Aug 17, 2017

@boumenot @TsuyoshiUshio

https://www.packer.io/docs/builders/azure.html

This page still does not reference the need for object_id as required input. The setup page does state it as required, but the builder info page does not.

I had to add the string in my template file to get it to run successfully. Did this get resolved to pull the ObjectID from ClientID?

kmcquade added a commit to kmcquade/packer that referenced this issue Aug 26, 2017

Update windows_custom_image.json
object_id is not present in the file. Added it
Required, as per the docs: https://www.packer.io/docs/builders/azure.html#object_id
The other windows example shows this properly: https://github.com/hashicorp/packer/blob/master/examples/azure/windows.json
Similar to: hashicorp#4803
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment