Skip to content
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

Azure deployment: failed to get SPT from client credentials #351

Open
bluedog13 opened this issue Sep 14, 2022 · 1 comment
Open

Azure deployment: failed to get SPT from client credentials #351

bluedog13 opened this issue Sep 14, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@bluedog13
Copy link

What happened?

The "SYNCED" status is always "false" when I try to deploy a resource into Azure. I have the creds.json file and have generated the secret using creds.json file as well.

I am following the example provided here to deploy a resource in Azure.

I see the below error when i run the describe command on the resource

Status:
  Conditions:
    Last Transition Time:  2022-09-14T21:35:05Z
    Message:               connect failed: cannot get authorizer from client credentials config: failed to get SPT from client credentials: parameter 'activeDirectoryEndpoint' cannot be empty
    Reason:                ReconcileError
    Status:                False
    Type:                  Synced

How can we reproduce it?

Just by following the example here

What environment did it happen in?

Crossplane version: 1.9.1

Additional Details

The generated creds.json file is of the following format

{
  "appId": "[redacted]",
  "displayName": "azure-cli-2022-09-14-20-29-57",
  "password": "[redacted]",
  "tenant": "[redacted]"
}
@bluedog13
Copy link
Author

bluedog13 commented Sep 15, 2022

The below solved it. (the documentation is missing "--sdk-auth" in the command)

az ad sp create-for-rbac \
        --role Contributor \
        --scopes /subscriptions/[redacted] \
        --sdk-auth \
        > "creds.json"

As a word of caution going forward : "WARNING: Option '--sdk-auth' has been deprecated and will be removed in a future release."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant