packerlicious
packerlicious copied to clipboard
Azure builder usage without client_id and client_secret
packerlicious version
1.5.0
Expected behavior
Possibility using only with Subscription_id
https://www.packer.io/docs/builders/azure
If your organization allows it, you can use a command line interactive login method based on oAuth 'device code flow'. Packer will select this method when you only specify a subscription_id in your builder configuration. When you run Packer, it will ask you to visit a web site and input a code. This web site will then authenticate you, satisfying any two-factor authentication policies that your organization might have. The tokens are cached under the .azure/packer directory in your home directory and will be reused if they are still valid on subsequent runs.
Actual behavior
raise ValueError(msg)
ValueError: Resource client_id required in type azure-arm
Steps to reproduce
Use Azure builder without setting client_id
template.add_builder(
builder.Azure(
tenant_id="xxx-xxx-xxx-xxx-xxxxx",
subscription_id=Ref('subscription_id'),
managed_image_resource_group_name = Ref('resource_name'),
)
)