Skip to content

Commit

Permalink
Address Lucas's feedback about auth docs and superfluous line in test
Browse files Browse the repository at this point in the history
  • Loading branch information
JenGoldstrich committed Jun 4, 2024
1 parent b1d6ef9 commit 90c5c1e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
9 changes: 6 additions & 3 deletions .web-docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,12 @@ Packer can create Azure virtual machine images through variety of ways depending

Config allows for various ways to authenticate Azure clients. When
`client_id` and `subscription_id` are specified in addition to one of the following
`client_secret`, `client_jwt`, `client_cert_path`, or `oidc_request_url combined with oidc_request_token` --
Packer will use the specified Azure Active Directory (AAD) Service Principal
(SP).
* `client_secret`
* `client_jwt`
* `client_cert_path`
* `oidc_request_url` combined with `oidc_request_token`

Packer will use the specified Azure Active Directory (AAD) Service Principal (SP).
If none of these options are specified, Packer will attempt to use the Managed Identity
and subscription of the VM that Packer is running on. This will only work if
Packer is running on an Azure VM with either a System Assigned Managed
Expand Down
9 changes: 6 additions & 3 deletions builder/azure/common/client/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,12 @@ var NullModelSDKErr = fmt.Errorf("Unexpected SDK response, please open an issue

// Config allows for various ways to authenticate Azure clients. When
// `client_id` and `subscription_id` are specified in addition to one of the following
// `client_secret`, `client_jwt`, `client_cert_path`, or `oidc_request_url combined with oidc_request_token` --
// Packer will use the specified Azure Active Directory (AAD) Service Principal
// (SP).
// * `client_secret`
// * `client_jwt`
// * `client_cert_path`
// * `oidc_request_url` combined with `oidc_request_token`
//
// Packer will use the specified Azure Active Directory (AAD) Service Principal (SP).
// If none of these options are specified, Packer will attempt to use the Managed Identity
// and subscription of the VM that Packer is running on. This will only work if
// Packer is running on an Azure VM with either a System Assigned Managed
Expand Down
1 change: 0 additions & 1 deletion builder/azure/common/client/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ func Test_ClientConfig_GitHubOIDC_Rejections(t *testing.T) {
OidcRequestURL: "whatever",
}
assertInvalid(t, cfg)

}

func getEnvOrSkip(t *testing.T, envVar string) string {
Expand Down
9 changes: 6 additions & 3 deletions docs-partials/builder/azure/common/client/Config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

Config allows for various ways to authenticate Azure clients. When
`client_id` and `subscription_id` are specified in addition to one of the following
`client_secret`, `client_jwt`, `client_cert_path`, or `oidc_request_url combined with oidc_request_token` --
Packer will use the specified Azure Active Directory (AAD) Service Principal
(SP).
* `client_secret`
* `client_jwt`
* `client_cert_path`
* `oidc_request_url` combined with `oidc_request_token`

Packer will use the specified Azure Active Directory (AAD) Service Principal (SP).
If none of these options are specified, Packer will attempt to use the Managed Identity
and subscription of the VM that Packer is running on. This will only work if
Packer is running on an Azure VM with either a System Assigned Managed
Expand Down

0 comments on commit 90c5c1e

Please sign in to comment.