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

AzureRM Storage Account - InvalidApiVersionParameter #11404

Closed
kisamoto opened this issue Jan 25, 2017 · 5 comments
Closed

AzureRM Storage Account - InvalidApiVersionParameter #11404

kisamoto opened this issue Jan 25, 2017 · 5 comments

Comments

@kisamoto
Copy link

kisamoto commented Jan 25, 2017

When trying to create azurerm_storage_account resource in North Europe region (unconfirmed for other regions) get an InvalidApiVersionParameter error.

Terraform Version

Terraform v0.8.4

Terraform config

resource "azurerm_storage_account" "openshift" {
  name                = "${format("tfopenshift%s", var.environment)}"
  location            = "${var.region}"
  resource_group_name = "${module.vpc.resource_group_id}"
  account_type        = "Standard_GRS"
  account_kind        = "BlobStorage"
  access_tier         = "Hot"

  tags {
    environment = "${var.environment}"
  }
}
variable "region" {
  type        = "string"
  description = "Azure region to create this virtual network in"
  default     = "North Europe"
}

Affected Resource(s)

  • azurerm_storage_account

Expected Behavior

azurerm_storage_account resource should be created.

Actual Behavior

Terraform errors out

* azurerm_storage_account.openshift: Error creating Azure Storage Account 'tfopenshiftdev': storage.AccountsClient#Create: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="InvalidApiVersionParameter" Message="The api-version '2016-01-01' is invalid. The supported versions are '2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'."

Steps to Reproduce

  1. Configure environment for AzureRM provider
  2. Try to create azurerm_storage_account resource
@tombuildsstuff
Copy link
Contributor

Hi @kisamoto

Thanks for reporting this issue - apologies for the delayed response here.

In order to look into this, I've had to update your code sample ever so slightly (to reference a resource group, rather than a module):

$ tree
.
├── terraform.tf
├── terraform.tfstate
└── variables.tf

0 directories, 3 files

$ cat terraform.tf
resource "azurerm_resource_group" "test" {
  name = "examplerg"
  location = "${var.region}"
}

resource "azurerm_storage_account" "openshift" {
  name                = "${format("tfopenshift%s", var.environment)}"
  location            = "${var.region}"
  resource_group_name = "${azurerm_resource_group.test.name}"
  account_type        = "Standard_GRS"
  account_kind        = "BlobStorage"
  access_tier         = "Hot"

  tags {
    environment = "${var.environment}"
  }
}

$ cat variables.tf
variable "environment" {
  default = "pro"
}
variable "region" {
  default = "North Europe"
}

When I run terraform plan & terraform apply in the North Europe region this works as expected. Digging into the code - we're making use of the same version of the API as when this was opened (2016-01-01); as such I have a feeling this may have been a temporary change at Azure's end.

Is it possible to confirm if you're still seeing this issue? If so, is there anything atypical about the Azure Subscription / Service Principal, such as limited ACL's?

Thanks!

@kisamoto
Copy link
Author

kisamoto commented Apr 6, 2017

Hi @tombuildsstuff

Thanks for replying.
I can confirm this is no longer occurring and shall close this issue.

Many thanks for taking the time. Keep up the excellent work!

@kisamoto kisamoto closed this as completed Apr 6, 2017
@discordianfish
Copy link

Just run into the same issue but while creating a DNS record in west europe:

* azurerm_dns_a_record.tectonic-etcd.0: Error creating DNS A Record: InvalidApiVersionParameter (400) - The api-version '2015-05-04-preview' is invalid. The supported versions are '2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'.

Any chance the sdk version terraform uses is using that possibly deprecated API version?

@discordianfish
Copy link

My issue is hashicorp/terraform-provider-azurerm#192

@ghost
Copy link

ghost commented Apr 8, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants