AssertionError: Unexpected type. Expected 'list' got '<class 'str'>' erorr in create Azure Databricks with Pulumi Azure Native
AssertionError: Unexpected type. Expected 'list' got '<class 'str'>' erorr in create Azure Databricks with Pulumi Azure Native
我想用 Pulumi 从此 document 创建 Azure Databricks。
我的代码是:
databricks_workspace = azure_native.databricks.Workspace('databrick',
location=location_name,
resource_group_name=resource_group.name,
managed_resource_group_id=pulumi.Output.all(
resource_group.id),
workspace_name='workspace-{}-{}'.format(
project_name, stack_name),
sku=azure_native.databricks.SkuArgs(
name='Standard',
tier='Standard'
),
tags={
'Team': 'Data',
'Environment': stack_name,
},
)
managed_resource_group_id
的输入是resource_group
的输出。当我 运行 此代码时,我收到此错误:
raise AssertionError(f"Unexpected type. Expected 'list' got '{typ}'")
AssertionError: Unexpected type. Expected 'list' got '<class 'str'>'
error: an unhandled error occurred: Program exited with non-zero exit code: 1
我看到没有 运行 你的代码的唯一问题是 managed_resource_group_id
应该是一个字符串,但你将 pulumi.Output.all
的结果传递给它。你能试试改成
managed_resource_group_id=resource_group.id,
我想用 Pulumi 从此 document 创建 Azure Databricks。
我的代码是:
databricks_workspace = azure_native.databricks.Workspace('databrick',
location=location_name,
resource_group_name=resource_group.name,
managed_resource_group_id=pulumi.Output.all(
resource_group.id),
workspace_name='workspace-{}-{}'.format(
project_name, stack_name),
sku=azure_native.databricks.SkuArgs(
name='Standard',
tier='Standard'
),
tags={
'Team': 'Data',
'Environment': stack_name,
},
)
managed_resource_group_id
的输入是resource_group
的输出。当我 运行 此代码时,我收到此错误:
raise AssertionError(f"Unexpected type. Expected 'list' got '{typ}'")
AssertionError: Unexpected type. Expected 'list' got '<class 'str'>'
error: an unhandled error occurred: Program exited with non-zero exit code: 1
我看到没有 运行 你的代码的唯一问题是 managed_resource_group_id
应该是一个字符串,但你将 pulumi.Output.all
的结果传递给它。你能试试改成
managed_resource_group_id=resource_group.id,