pulumi / pulumi-azure-native

Azure Native Provider
Apache License 2.0
125 stars 34 forks source link

[Synapse] [BigDataPool]: Cannot add `libraryRequirements` during resource creation #2702

Open rhuanbarreto opened 1 year ago

rhuanbarreto commented 1 year ago

What happened?

Adding the parameter libraryRequirements during resource creation gives me an error:

azure-native:synapse:BigDataPool spark-pool **creating failed** error: Code="ValidationFailed" Message="Spark pool request validation failed." Details=[{"code":"SparkComputePropertiesNotAllowed","message":"Synapse Spark pool must be created before libraries are installed."}]

Expected Behavior

To create the BigDataPool correctly. Or maybe have a documnetation on how to make a patch resource to apply it after creation.

Steps to reproduce

  1. Define a BigDataPool with the libraryRequirements parameter set.
    new BigDataPool(
    "spark-pool",
    {
    autoPause: {
      enabled: true,
      delayInMinutes: 60,
    },
    autoScale: {
      enabled: true,
      maxNodeCount: 10,
      minNodeCount: 3,
    },
    bigDataPoolName: "sparkpool",
    nodeCount: 3,
    nodeSize: "Small",
    nodeSizeFamily: "MemoryOptimized",
    resourceGroupName: resourceGroupName,
    sparkVersion: "3.3",
    workspaceName: workspace.name,
    dynamicExecutorAllocation: {
      enabled: false,
    },
    isComputeIsolationEnabled: false,
    sessionLevelPackagesEnabled: false,
    libraryRequirements: { content: "psycopg2-binary==2.9.6", filename: "requirements.txt" },
    },
    { ignoreChanges: ["creationDate", "provisioningState"] },
    );
  2. Try pulumi up.
  3. You will get the error.

Output of pulumi about

CLI          
Version      3.78.0
Go Version   go1.20.6
Go Compiler  gc

Plugins
NAME          VERSION
azure-native  2.2.0
azuread       5.40.0
mongodbatlas  3.10.0
nodejs        unknown
random        4.13.2
tls           4.10.0

Host     
OS       darwin
Version  13.5.1
Arch     arm64

This project is written in nodejs: executable='/Users/rhuan/.nvm/versions/node/v18.17.1/bin/node' version='v18.17.1'

Current Stack: [REDACTED]

TYPE                                                   URN
[REDACTED]

Found no pending operations associated with [REDACTED]

Backend        
Name           pulumi.com
URL            https://app.pulumi.com/rhuanbarreto
User           rhuanbarreto
Organizations  rhuanbarreto, [REDACTED]

Dependencies:
NAME                              VERSION
prettier                          3.0.1
@pulumi/random                    4.13.2
ajv-cli                           5.0.0
eslint-plugin-prettier            5.0.0
@typescript-eslint/parser         6.3.0
@pulumi/pulumi                    3.77.1
@pulumi/tls                       4.10.0
@types/node                       18.17.3
eslint-config-prettier            9.0.0
@pulumi/azure-native              2.2.0
@pulumi/mongodbatlas              3.10.0
@typescript-eslint/eslint-plugin  6.3.0
commander                         11.0.0
eslint                            8.46.0
@pulumi/azuread                   5.40.0

Pulumi locates its logs in /var/folders/td/tflwpdvn70j8pglc6k153mgc0000gn/T/ by default

Additional context

No response

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).

iwahbe commented 1 year ago

Hi @rhuanbarreto. Thanks for opening an issue! I agree that we should correctly deploy the synapse.BigDataPool as described. To help us reproduce the issue, can you post the code you used to deploy the BigDataPool?

rhuanbarreto commented 1 year ago

@iwahbe updated the description with the code on how to create the bigdatapool

iwahbe commented 1 year ago

Thanks @rhuanbarreto.