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

storage_container deployment errors with 204 No Content #4208

Closed
bytejunkie opened this issue Sep 2, 2019 · 5 comments
Closed

storage_container deployment errors with 204 No Content #4208

bytejunkie opened this issue Sep 2, 2019 · 5 comments

Comments

@bytejunkie
Copy link
Contributor

bytejunkie commented Sep 2, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

Terraform 0.12.6 and 0.12.7
AZureRM 1.31.0 and 1.33.1

Affected Resource(s)

  • azurerm_storage_container

Terraform Configuration Files

data "azurerm_resource_group" "PlatformRG" {
  name = format("%s-%s-%s-%s-%s", var.company_name, var.product_name, var.environment_name, var.environment_instance, var.environment_region_code)
}
data "azurerm_storage_account" "strg01" {
  name                = lower(replace(format("%s%s", data.azurerm_resource_group.PlatformRG.name, "strg01"), "-", ""))
  resource_group_name = data.azurerm_resource_group.PlatformRG.name
}
resource "azurerm_storage_container" "public_containers" {
  name                  = var.public_container_list[count.index]
  resource_group_name   = data.azurerm_resource_group.PlatformRG.name
  storage_account_name  = data.azurerm_storage_account.strg01.name
  container_access_type = "container"

  count = length(var.public_container_list)
}

Debug Output

Error: Error creating storage queue on Azure: storage: status code from service response is 204 No Content; was expecting 201 Created. Inner error: storage: service returned error: StatusCode=204, ErrorCode=204
No Content, ErrorMessage=no response body was available for error status code, RequestInitiated=Mon, 02 Sep 2019 12:02:12 GMT, RequestId=f5dd7f17-9003-000d-6d86-611ea9000000, API Version=2016-05-31, QueryParameterName=, QueryParameterValue=

on storage_containers.tf line 28, in resource "azurerm_storage_queue" "queue_count":
28: resource "azurerm_storage_queue" "queue_count" {

Panic Output

Expected Behavior

Storage Containers should have been added to the storage account

Actual Behavior

at the apply stage, the deployment crashes outputting the error above. storage_containers appear to be undeployed.

Steps to Reproduce

  1. terraform apply

Important Factoids

This isnt intermittent, it happens every time. It isn't down to the storage firewall, we see it with the firewall off, on, and on with build server public IP address in.

We also don't see this locally with our dev deployment script which we use to test the module before using it in deployments.

So this looks to be localised to our deployment pipelines, which look like
AzDo > local build agent > Powershell > Runs terraform init, plan, apply

References

  • #0000
@mybayern1974
Copy link
Collaborator

@bytejunkie , I cannot repro the symptom by using exactly the same .tf config you paste here. Things worked in my env by using that config. In order to help you troubleshoot, would you wanna check the got error message "...Error creating storage queue..." It's strange to have this error coz your config did not intend to provision a Storage Queue. Specifically, "on storage_containers.tf line 28, in resource "azurerm_storage_queue"", would you wanna share here what your line 28 is, or paste here the complete config file you are using?

@bytejunkie
Copy link
Contributor Author

@mybayern1974 the file above as you've guessed isnt the full, i cut it down to make it simple and then copied the wrong part of the error message in.

im working with msft this evening to troubleshott this one, as we're seeing some weird ip addresses in what should be a really simple flow. suspect some NAT somewhere is forcing the storage account to drop the change request and the TF error message doesnt make sense as TF just doesnt understand what happened.

will update once i have more.

@mybayern1974
Copy link
Collaborator

@tracypholmes , I would suggest close this issue for now and assume @bytejunkie could possibly reopen/re-issue one if problems continue.

@bytejunkie
Copy link
Contributor Author

I have seen this since, with a run of the same template, over already deployed storage containers, but with new containers to be deployed in the plan.
When i've tried to dig into it, i just can't get it to repeat.
I've since upgraded TF agent and provider and am not getting it, so I agree, it makes sense to close and reopen with more info if it re-occurs.

@ghost
Copy link

ghost commented Mar 29, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@hashicorp hashicorp locked and limited conversation to collaborators Mar 29, 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

3 participants