pulumi / pulumi-azure-native

Azure Native Provider
Apache License 2.0
129 stars 35 forks source link

Blob containers always differ even though nothing has changed #627

Open yarinm opened 3 years ago

yarinm commented 3 years ago

My blob storage containers are created like this:

_, err = storage.NewBlobContainer(ctx, "disk-blob-container"+resourceSuffix, &storage.BlobContainerArgs{
        AccountName:       account.Name,
        ContainerName:     pulumi.String("disks"),
        PublicAccess:      &publicAccessNone,
        ResourceGroupName: rg.Name,
    }, pulumi.Provider(p))

And during each update I keep seeing them as different and that triggers unnecessary updates:

 disk-blob-container updated [diff: +defaultEncryptionScope,denyEncryptionScopeOverride] 

To remedy this, I've added , pulumi.IgnoreChanges([]string{"defaultEncryptionScope", "denyEncryptionScopeOverride"}) until this is fixed

yarinm commented 3 years ago

Another thing that always differs, provider's clientSecret:

pulumi:providers:azure-native credentials updating [diff: ~clientSecret] 

I'm defining it like this:

    p, err := azurenative.NewProvider(ctx, "credentials", &azurenative.ProviderArgs{
        ClientId:       pulumi.String(azureConfig.Credentials.Id),
        ClientSecret:   pulumi.String(azureConfig.Credentials.Secret),
        SubscriptionId: pulumi.String(azureConfig.SubscriptionID),
        TenantId:       pulumi.String(azureConfig.Credentials.TenantId),
        Environment:    azureEnvToPulumiName(azureConfig.Environment),
    }, pulumi.AdditionalSecretOutputs([]string{"clientSecret"}), pulumi.Aliases([]pulumi.Alias{{
        Type: pulumi.String("pulumi:providers:azure-nextgen"),
    }}))
yarinm commented 3 years ago

@mikhailshilkov another weird diff that happens :

azure-native:containerservice/v20210201:ManagedCluster aks updating [diff: ] 

This time it doesn't state anything