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

Container registry change of SKU destroys and recreates #1256

Closed
twem opened this issue May 18, 2018 · 2 comments · Fixed by #1264
Closed

Container registry change of SKU destroys and recreates #1256

twem opened this issue May 18, 2018 · 2 comments · Fixed by #1264

Comments

@twem
Copy link

twem commented May 18, 2018

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 Version

# terraform -v
Terraform v0.11.7
+ provider.azurerm v1.5.0

Affected Resource(s)

  • azurerm_container_registry

Terraform Configuration Files

Create as SKU standard

resource "azurerm_resource_group" "acr-rg" {
  name      = "${var.registry_name}-acr-rg"
  location  = "${var.location}"
}

resource "azurerm_container_registry" "acr" {
  name                = "${var.registry_name}acr"
  resource_group_name = "${azurerm_resource_group.acr-rg.name}"
  location            = "${azurerm_resource_group.acr-rg.location}"
  admin_enabled       = "false"
  sku                 = "Standard"
}

Update to SKU Premium

resource "azurerm_resource_group" "acr-rg" {
  name      = "${var.registry_name}-acr-rg"
  location  = "${var.location}"
}

resource "azurerm_container_registry" "acr" {
  name                = "${var.registry_name}acr"
  resource_group_name = "${azurerm_resource_group.acr-rg.name}"
  location            = "${azurerm_resource_group.acr-rg.location}"
  admin_enabled       = "false"
  sku                 = "Premium"
}

Debug Output


Terraform will perform the following actions:

-/+ azurerm_container_registry.acr (new resource required)
      id:                  "/subscriptions/xxxxx/resourceGroups/xxx-acr-rg/providers/Microsoft.ContainerRegistry/registries/xxxxacr" => <computed> (forces new resource)
      admin_enabled:       "false" => "false"
      admin_password:      "" => <computed>
      admin_username:      "" => <computed>
      location:            "uksouth" => "uksouth"
      login_server:        "xxxxacr.azurecr.io" => <computed>
      name:                "xxxxacr" => "xxxxacr"
      resource_group_name: "xxx-acr-rg" => "xxx-acr-rg"
      sku:                 "Standard" => "Premium" (forces new resource)
      tags.%:              "0" => <computed>


Plan: 1 to add, 0 to change, 1 to destroy.

Panic Output

Expected Behavior

Update SKU from Standard to Premium
You are able to change up and down SKU's via the Azure portal

Actual Behavior

Destroys the standard registry and creates a new premium registry.

Steps to Reproduce

  1. terraform apply
  2. Update confirm from standard to premium
  3. terraform apply

Important Factoids

References

  • #0000
@katbyte
Copy link
Collaborator

katbyte commented May 25, 2018

Hey @twem ,

Just wanted to let you know we have released v1.6.0 of the provider fixing this issue 🙂

@katbyte katbyte added this to the 1.6.0 milestone May 25, 2018
@ghost
Copy link

ghost commented Mar 31, 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!

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

Successfully merging a pull request may close this issue.

3 participants