The new driver uses Azure Resource Manager APIs and offers a lot more functionality compared to the old Azure driver. It is also easier to authenticate and does not require user to create and place certificate files. It only has a single required argument. This is a breaking change: The new driver cannot work with machines created with the older Azure driver and vice versa (as the APIs are entirely different and resources are not shared between old/new azure APIs). The new driver addresses many issues about the azure driver reported so far. This resolves #2742, resolves #1368, resolves #1142, resolves #2236, resolves #2408, resolves #1126, resolves #774. Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
16 lines
376 B
Go
16 lines
376 B
Go
package azureutil
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/Azure/go-autorest/autorest"
|
|
)
|
|
|
|
// accessToken is interim autorest.Authorizer until we figure out oauth token
|
|
// handling. It holds the access token.
|
|
type accessToken string
|
|
|
|
func (a accessToken) WithAuthorization() autorest.PrepareDecorator {
|
|
return autorest.WithHeader("Authorization", fmt.Sprintf("Bearer %s", string(a)))
|
|
}
|