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

[DOC] Create workspace step doesn't run though #597

Closed
felixsafegraph opened this issue Apr 16, 2021 · 2 comments
Closed

[DOC] Create workspace step doesn't run though #597

felixsafegraph opened this issue Apr 16, 2021 · 2 comments
Milestone

Comments

@felixsafegraph
Copy link

Terraform Version

Terraform v0.15.0
on darwin_amd64
+ provider registry.terraform.io/databrickslabs/databricks v0.3.2
+ provider registry.terraform.io/hashicorp/aws v3.36.0
+ provider registry.terraform.io/hashicorp/random v3.1.0

Affected Resource(s)

https://docs.databricks.com/dev-tools/terraform/e2-workspace.html#step-4-create-a-databricks-e2-workspace

Environment variable names

NONE

Terraform Configuration Files

Had it exactly as this section
https://docs.databricks.com/dev-tools/terraform/e2-workspace.html#step-4-create-a-databricks-e2-workspace

Output

╷
│ Error: Authentication is not configured for provider. Please configure it
│ through one of the following options:
│ 1. DATABRICKS_HOST + DATABRICKS_TOKEN environment variables.
│ 2. host + token provider arguments.
│ 3. azure_databricks_workspace_id + AZ CLI authentication.
│ 4. azure_databricks_workspace_id + azure_client_id + azure_client_secret + azure_tenant_id for Azure Service Principal authentication.
│ 5. Run `databricks configure --token` that will create ~/.databrickscfg file.
│
│ Please check https://registry.terraform.io/providers/databrickslabs/databricks/latest/docs#authentication for details
│
│   on workspace.tf line 25, in resource "databricks_token" "pat":
│   25: resource "databricks_token" "pat" {
│
╵

Expected Behavior

Should work, PAT created as output

Actual Behavior

Failed, databricks_host is set but not databricks_token

It is not clear from documentation that this part is supposed to be in a different module or not


// initialize provider in normal mode
provider "databricks" {
  // in normal scenario you won't have to give providers aliases
  alias = "created_workspace"
  host  = databricks_mws_workspaces.this.workspace_url
}

// create PAT token to provision entities within workspace
resource "databricks_token" "pat" {
  provider         = databricks.created_workspace
  comment          = "Terraform Provisioning"
  lifetime_seconds = 86400
}

// export token for integration tests to run on
output "databricks_token" {
  value     = databricks_token.pat.token_value
  sensitive = true
}

Steps to Reproduce

  1. terraform apply
@nfx nfx changed the title [ISSUE] Create workspace step doesn't run though [DOC] Create workspace step doesn't run though Apr 22, 2021
@nfx nfx added this to the v0.3.4 milestone Apr 22, 2021
@nfx
Copy link
Contributor

nfx commented Apr 22, 2021

@felixsafegraph you should use a separate module or provider aliasing. We're working on a separate provider just for databricks_mws_* resources to remove this confusion.

@felixsafegraph
Copy link
Author

ok

@nfx nfx closed this as completed in 1e44b35 May 12, 2021
@nfx nfx mentioned this issue May 12, 2021
@nfx nfx added the lazy auth label Jan 19, 2022
michael-berk pushed a commit to michael-berk/terraform-provider-databricks that referenced this issue Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants