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

ERROR: API version 2022-05-01 does not have operation group │ 'storage_accounts' #433

Closed
1 task done
bpriyas92 opened this issue Jul 20, 2023 · 2 comments
Closed
1 task done
Labels

Comments

@bpriyas92
Copy link

Terraform CLI and Provider Versions

Terraform v1.3.0
on linux_amd64

  • provider registry.terraform.io/hashicorp/azuread v2.40.0
  • provider registry.terraform.io/hashicorp/azurerm v3.49.0
  • provider registry.terraform.io/hashicorp/null v3.2.1

Terraform Configuration

resource "null_resource" "storage_resource_instance" {
  count = length(local.datastores)
  provisioner "local-exec" {
    command = "az storage account network-rule add --resource-id ${azurerm_machine_learning_workspace.ws.id} --tenant-id ${data.azurerm_client_config.current.tenant_id} -g ${local.datastores[count.index].storage_resource_group_name} --account-name ${local.datastores[count.index].storage_name}"
  }
}

Expected Behavior

To set network rule for storage account

Actual Behavior

Error: local-exec provisioner error

│ with null_resource.storage_resource_instance[0],
│ on main.tf line 169, in resource "null_resource" "storage_resource_instance":
│ 169: provisioner "local-exec" {

│ Error running command 'az storage account network-rule add --resource-id ': exit status
│ 1. Output: ERROR: The command failed with an unexpected error. Here is the
│ traceback:
│ ERROR: API version 2022-05-01 does not have operation group
│ 'storage_accounts'
│ Traceback (most recent call last):
│ File "/home/nub2kor/.local/lib/python3.8/site-packages/knack/cli.py", line 231, in invoke
│ cmd_result = self.invocation.execute(args)
│ File "/home/nub2kor/.local/lib/python3.8/site-packages/azure/cli/core/commands/init.py", line 663, in execute
│ raise ex
│ File "/home/nub2kor/.local/lib/python3.8/site-packages/azure/cli/core/commands/init.py", line 726, in _run_jobs_serially
│ results.append(self._run_job(expanded_arg, cmd_copy))
│ File "/home/nub2kor/.local/lib/python3.8/site-packages/azure/cli/core/commands/init.py", line 697, in _run_job
│ result = cmd_copy(params)
│ File "/home/nub2kor/.local/lib/python3.8/site-packages/azure/cli/core/commands/init.py", line 333, in call
│ return self.handler(*args, **kwargs)
│ File "/home/nub2kor/.local/lib/python3.8/site-packages/azure/cli/core/commands/command_operation.py", line 112, in handler
│ client = self.client_factory(self.cli_ctx, command_args) if self.client_factory else None
│ File "/home/nub2kor/.local/lib/python3.8/site-packages/azure/cli/command_modules/storage/_client_factory.py", line 138, in cf_sa
│ return storage_client_factory(cli_ctx).storage_accounts
│ File "/home/nub2kor/.local/lib/python3.8/site-packages/azure/mgmt/storage/_storage_management_client.py", line 832, in storage_accounts
│ raise ValueError("API version {} does not have operation group 'storage_accounts'".format(api_version))
│ ValueError: API version 2022-05-01 does not have operation group
│ 'storage_accounts'
│ To open an issue, please run: 'az feedback'

Steps to Reproduce

  1. terraform apply

How much impact is this issue causing?

Medium

Logs

No response

Additional Information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@austinvalle
Copy link
Member

Hi there @bpriyas92 👋🏻 ,

The error provided seems to be resulting from the Azure CLI command itself: ValueError: API version 2022-05-01 does not have operation group 'storage_accounts'. At a glance, I don't see any terraform/null provider specific syntax that would be causing your error.

I see you've opened an issue in the Azure CLI repository already, which seems like the appropriate place to resolve your problem, so I'm going to close this report.

If you receive new information on your issue that you believe is relevant to the null provider, please open a new issue with that context, thanks!

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants