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 replaced during upgrade under PRC #2330

Closed
VenelinMartinov opened this issue Aug 19, 2024 · 1 comment · Fixed by #2331 or #2306
Closed

Storage Container replaced during upgrade under PRC #2330

VenelinMartinov opened this issue Aug 19, 2024 · 1 comment · Fixed by #2331 or #2306
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@VenelinMartinov
Copy link
Contributor

Describe what happened

The following example causes a replacement without any changes to the program in the storage:Container resource when upgrading from 5.60.0 to 5.87.0

This reproduces in TF when upgrading from 3.85.0 to 3.117.0 when run with terraform plan -refresh=false

provider "azurerm" {
  features {}
  version = "3.85.0"
}

resource "azurerm_resource_group" "exampleResourceGroup" {
  name     = "exampleResourceGroup123"
  location = "East US"
}

resource "azurerm_storage_account" "exampleAccount" {
  name                     = "examplestorageaccount123"
  resource_group_name      = azurerm_resource_group.exampleResourceGroup.name
  location                 = azurerm_resource_group.exampleResourceGroup.location
  account_tier             = "Standard"
  account_replication_type = "LRS"
  tags = {
    environment = "staging"
  }
}

resource "azurerm_storage_container" "exampleContainer" {
  name                  = "examplecontainer123"
  storage_account_name  = azurerm_storage_account.exampleAccount.name
  container_access_type = "private"
}

Sample program

name: azure_2322_2
runtime: yaml
outputs: {}
resources:
  prov:
    type: pulumi:providers:azure
    options:
      version: 5.60.0
    defaultProvider: true

  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: East US

  exampleAccount:
    type: azure:storage:Account
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      location: ${exampleResourceGroup.location}
      accountTier: Standard
      accountReplicationType: LRS
      tags:
        environment: staging
  exampleContainer:
    type: azure:storage:Container
    properties:
      storageAccountName: ${exampleAccount.name}
      containerAccessType: private

Log output

No response

Affected Resource(s)

No response

Output of pulumi about

.

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@VenelinMartinov VenelinMartinov added the kind/bug Some behavior is incorrect or out of spec label Aug 19, 2024
@VenelinMartinov VenelinMartinov self-assigned this Aug 19, 2024
VenelinMartinov added a commit that referenced this issue Aug 19, 2024
This prevents the storage Container resource from being replaced under
PRC when upgrading the provider.

Note this is an intentional divergence from the TF provider but the TF
behaviour here is bad and we are not taking up a patch for this.

Note this is already covered by Test_storage, see failure in
https://github.com/pulumi/pulumi-azure/actions/runs/10178181276/job/28152031872?pr=2306

Similar to #2325

fixes #2330
stacked on #2306
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Aug 19, 2024
@pulumi-bot
Copy link
Contributor

This issue has been addressed in PR #2306 and shipped in release v5.88.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
2 participants