Skip to content

~/.databrickscfg is loaded even when direct config has precedence #304

@nfx

Description

@nfx

steps to reproduce:

  • direct host & az resource ID
  • configuration file with DEFAULT profile with token + host
  • expected: azure CLI working for that host
  • happens: validate: more than one authorization method configured: azure and pat error

this issue blocks databricks/terraform-provider-databricks#1848

func TestConfig_AzureCliHostAndResourceID(t *testing.T) {
	p, _ := filepath.Abs("../common/testdata")
	providerFixture{
		// omit request to management endpoint to get workspace properties
		azureResourceID: azResourceID,
		host:            "x",
		env: map[string]string{
			// these may fail on windows. use docker container for testing.
			"PATH": p,
			"HOME": p,
		},
		assertAzure: true,
		assertHost:  "https://x",
		assertAuth:  "azure-cli",
	}.apply(t)
}

Metadata

Metadata

Assignees

Labels

bugThe issue is a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions