Description
openedon Jun 29, 2023
What happened?
Trying to update the synapse workspace from default version to API version 2021-06-01 with the property azure_ad_only_authentication = True.
Observed: azureADOnlyAuthentication remains as "null"
Expected Behavior
Synapse workspace should be updated with azure_ad_only_authentication = True
Steps to reproduce
Below code was used to deploy azure synapse workspace
import pulumi
from pulumi import ComponentResource
from pulumi_azure_native import storage,synapse
# import pulumi_azure_native.synapse.v20210601 as synapse
class StorageAccountSynapseWorkspace(ComponentResource):
def __init__(self, name: str, resource_group_name: str, location: str, opts: pulumi.ResourceOptions = None):
super().__init__('custom:hosted_application', name, {}, opts)
self.storage_account_2 = storage.StorageAccount(
f"{name}stract2",
resource_group_name=resource_group_name,
location=location,
sku=storage.SkuArgs(name=storage.SkuName.STANDARD_LRS),
kind=storage.Kind.STORAGE_V2,
opts=pulumi.ResourceOptions(parent=self)
)
self.synapse_workspace = synapse.Workspace(
f"{name}synapsews",
resource_group_name=resource_group_name,
location=location,
default_data_lake_storage=synapse.DataLakeStorageAccountDetailsArgs(
account_url=self.storage_account_2.primary_endpoints.apply(lambda x: x["dfs"]),
filesystem="ContainerName"
),
tags={"Environment": "testing"},
identity=synapse.ManagedIdentityArgs(
type="SystemAssigned"
),
public_network_access=synapse.WorkspacePublicNetworkAccess.ENABLED,
opts=pulumi.ResourceOptions(parent=self))
synapse_resource = StorageAccountSynapseWorkspace("syninst",
resource_group_name=<resource_group_name>,
location="East US")
# Export the resources outputs:
pulumi.export("storage_account_2_id", synapse_resource.storage_account_2.id)
pulumi.export("synapse_workspace_id", synapse_resource.synapse_workspace.id)
pulumi.export("synapse_workspace_urn", synapse_resource.synapse_workspace.urn)
Below is the output after deploying the resources through Pulumi.
Do you want to perform this update? yes
Updating (teststack):
Type Name Status
+ pulumi:pulumi:Stack test_pulumi-teststack created (211s)
+ └─ custom:hosted_application syninst created
+ ├─ azure-native:storage:StorageAccount syninststract2 created (21s)
+ └─ azure-native:synapse:Workspace syninstsynapsews created (188s)
Below is the code used to update the synapse workspace using api version v20210601 with the property azure_ad_only_authentication=True
import pulumi
from pulumi import ComponentResource
from pulumi_azure_native import storage
import pulumi_azure_native.synapse.v20210601 as synapse
class StorageAccountSynapseWorkspace(ComponentResource):
def __init__(self, name: str, resource_group_name: str, location: str, opts: pulumi.ResourceOptions = None):
super().__init__('custom:hosted_application', name, {}, opts)
self.storage_account_2 = storage.StorageAccount(
f"{name}stract2",
resource_group_name=resource_group_name,
location=location,
sku=storage.SkuArgs(name=storage.SkuName.STANDARD_LRS),
kind=storage.Kind.STORAGE_V2,
opts=pulumi.ResourceOptions(parent=self)
)
self.synapse_workspace = synapse.Workspace(
f"{name}synapsews",
azure_ad_only_authentication=True,
resource_group_name=resource_group_name,
location=location,
default_data_lake_storage=synapse.DataLakeStorageAccountDetailsArgs(
account_url=self.storage_account_2.primary_endpoints.apply(lambda x: x["dfs"]),
filesystem="ContainerName"
),
tags={"Environment": "testing"},
identity=synapse.ManagedIdentityArgs(
type="SystemAssigned"
),
public_network_access=synapse.WorkspacePublicNetworkAccess.ENABLED,
opts=pulumi.ResourceOptions(parent=self))
synapse_resource = StorageAccountSynapseWorkspace("syninst",
resource_group_name=<'resource_group_name'>,
location="East US")
# Export the resources outputs:
pulumi.export("storage_account_2_id", synapse_resource.storage_account_2.id)
pulumi.export("synapse_workspace_id", synapse_resource.synapse_workspace.id)
pulumi.export("synapse_workspace_urn", synapse_resource.synapse_workspace.urn)
pulumi preview
(venv) ➜ test_pulumi pulumi preview
Enter your passphrase to unlock config/secrets
(set PULUMI_CONFIG_PASSPHRASE or PULUMI_CONFIG_PASSPHRASE_FILE to remember):
Previewing update (teststack):
Type Name Plan Info
pulumi:pulumi:Stack test_pulumi-teststack 1 warning
└─ custom:hosted_application syninst
~ └─ azure-native:synapse/v20210601:Workspace syninstsynapsews update [diff: +azureADOnlyAuthentication,trustedServiceBypassEnabled]
pulumi up --yes
Updating (teststack):
Type Name Status Info
pulumi:pulumi:Stack test_pulumi-teststack 1 warning
└─ custom:hosted_application syninst
~ └─ azure-native:synapse/v20210601:Workspace syninstsynapsews updated (95s) [diff: +azureADOnlyAuthentication,trustedServiceBypassEnable
Output of pulumi about
(venv) ➜ test_pulumi pulumi about
Enter your passphrase to unlock config/secrets
(set PULUMI_CONFIG_PASSPHRASE or PULUMI_CONFIG_PASSPHRASE_FILE to remember):
CLI
Version 3.73.0
Go Version go1.20.5
Go Compiler gc
Plugins
NAME VERSION
azure-native 1.103.0
python unknown
Host
OS darwin
Version 13.2.1
Arch arm64
This project is written in python: executable='/Users/asambrekar/test_pulumi/venv/bin/python3' version='3.11.2
'
Current Stack: teststack
TYPE URN
pulumi:pulumi:Stack urn:pulumi:teststack::test_pulumi::pulumi:pulumi:Stack::test_pulumi-teststack
custom:hosted_application urn:pulumi:teststack::test_pulumi::custom:hosted_application::syninst
pulumi:providers:azure-native urn:pulumi:teststack::test_pulumi::pulumi:providers:azure-native::default_1_103_0
azure-native:storage:StorageAccount urn:pulumi:teststack::test_pulumi::custom:hosted_application$azure-native:storage:StorageAccount::syninststract2
azure-native:synapse/v20210601:Workspace urn:pulumi:teststack::test_pulumi::custom:hosted_application$azure-native:synapse/v20210601:Workspace::syninstsynapsews
Found no pending operations associated with teststack
Backend
Name MBP-JK330PQGRQ
URL file://~
User asambrekar
Organizations
Dependencies:
NAME VERSION
pip 23.1.2
pulumi-azure-native 1.103.0
setuptools 67.8.0
wheel 0.40.0
Pulumi locates its logs in /var/folders/0z/685bzw656f58fwfptvs9vvlc0000gp/T/ by default
Additional context
Failed to update the synapse workdspace with the mentioned propery.
Similar results were achieved when tried with v20210601preview version.
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).