salt-extensions / saltext-azurerm

Salt Extension Modules for Azure Resource Manager
Apache License 2.0
7 stars 9 forks source link

[BUG] The DeploymentProperties model in the resource Azure module is not available. #18

Closed hemebond closed 1 year ago

hemebond commented 1 year ago

Description When trying to use azurerm_resource.deployment_create_or_update I get the error:

The DeploymentProperties model in the resource Azure module is not available.

Setup Using a masterless minion, running inside a Docker container.

FROM debian:bullseye-slim
ENV SALT_VERSION "stable"
RUN apt update
RUN apt install --yes python3-pip
RUN mkdir -p /etc/salt/minion.d && \
    chmod -R 755 /etc/salt
ADD files/10-minion-overrides.conf /etc/salt/minion.d/
RUN apt-get install curl -y && \
    curl -L https://bootstrap.saltstack.com -o install_salt.sh && \
    sh install_salt.sh -X -d stable
RUN python3 -m pip install saltext-azurerm
CMD salt-call --version

Steps to Reproduce the behavior

salt-call --local azurerm_resource.deployment_create_or_update name="my-keyvault-name" resource_group="my-resource-group" template_link=salt://key_vault_template.json parameters_link=salt://key_vault_parameters.json subscription_id=xxx-xxx-xxx-xxx

Expected behavior I expect it to deploy the ARM template with the parameters from the template parameters file.

Versions Report

salt-call --local --versions ``` Salt Version: Salt: 3005.1 Dependency Versions: cffi: 1.15.1 cherrypy: Not Installed dateutil: 2.8.1 docker-py: Not Installed gitdb: Not Installed gitpython: Not Installed Jinja2: 2.11.3 libgit2: Not Installed M2Crypto: Not Installed Mako: Not Installed msgpack: 1.0.0 msgpack-pure: Not Installed mysql-python: Not Installed pycparser: 2.21 pycrypto: Not Installed pycryptodome: 3.9.7 pygit2: Not Installed Python: 3.9.2 (default, Feb 28 2021, 17:03:44) python-gnupg: Not Installed PyYAML: 5.3.1 PyZMQ: 20.0.0 smmap: Not Installed timelib: Not Installed Tornado: 4.5.3 ZMQ: 4.3.4 Salt Extensions: saltext.azurerm: 2.0.0 System Versions: dist: debian 11 bullseye locale: utf-8 machine: x86_64 release: 6.1.0-1-amd64 system: Linux version: Debian GNU/Linux 11 bullseye ```
pip freeze ``` adal==1.2.7 azure-batch==12.0.0 azure-common==1.1.28 azure-core==1.24.2 azure-graphrbac==0.61.1 azure-identity==1.10.0 azure-keyvault==4.2.0 azure-keyvault-certificates==4.6.0 azure-keyvault-keys==4.7.0 azure-keyvault-secrets==4.6.0 azure-mgmt-authorization==2.0.0 azure-mgmt-batch==16.2.0 azure-mgmt-compute==27.1.0 azure-mgmt-core==1.3.2 azure-mgmt-dns==8.0.0 azure-mgmt-keyvault==10.0.0 azure-mgmt-msi==6.0.1 azure-mgmt-network==20.0.0 azure-mgmt-privatedns==1.0.0 azure-mgmt-resource==21.1.0 azure-mgmt-subscription==3.0.0 azure-mgmt-web==6.1.0 azure-nspkg==3.0.2 azure-storage-blob==12.12.0 azure-storage-common==2.1.0 azure-storage-file==2.1.0 azure-storage-nspkg==3.1.0 azure-storage-queue==12.3.0 certifi==2020.6.20 cffi==1.15.1 chardet==4.0.0 contextvars==2.4 croniter==0.3.34 cryptography==39.0.0 distro==1.5.0 idna==2.10 immutables==0.14 isodate==0.6.1 Jinja2==2.11.3 jmespath==0.10.0 MarkupSafe==1.1.1 msal==1.20.0 msal-extensions==1.0.0 msgpack==1.0.0 msrest==0.7.1 msrestazure==0.6.4 natsort==7.1.0 oauthlib==3.2.2 portalocker==2.7.0 psutil==5.8.0 pycparser==2.21 pycryptodomex==3.9.7 PyJWT==2.6.0 python-apt==2.2.1 python-dateutil==2.8.1 pytz==2021.1 PyYAML==5.3.1 pyzmq==20.0.0 requests==2.25.1 requests-oauthlib==1.3.1 salt==3005.1 saltext.azurerm==2.0.0 six==1.16.0 systemd-python==234 typing-extensions==4.4.0 tzlocal==2.1 urllib3==1.26.5 ```
nicholasmhughes commented 1 year ago

Confirmed. This is largely due to changes in the SDK that weren't found while bumping requirement versions between the v1.0.0 and v2.0.0 switch. @M3GH4NN is working on a fix now. Will cut a 2.0.1 version to resolve in the next few days.