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

Provider produced inconsistent result with Azure_Ephemeral_OS_Disk as the storage type #74

Closed
j7lloyd opened this issue Jun 3, 2024 · 4 comments · Fixed by #79
Closed
Labels
bug Something isn't working

Comments

@j7lloyd
Copy link

j7lloyd commented Jun 3, 2024

Error: Provider produced inconsistent result after apply
│
│ When applying changes to citrix_machine_catalog.catalog_name, provider "provider[\"registry.terraform.io/citrix/citrix\"]" produced an unexpected new value:        
│ .provisioning_scheme: inconsistent values for sensitive attribute.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

Subsequently, running terraform plan indicates that the resource is tainted and must be replaced:

      ~ provisioning_scheme      = {
          ~ azure_machine_config           = {
              ~ storage_type              = "Standard_LRS" -> "Azure_Ephemeral_OS_Disk"
                # (7 unchanged attributes hidden)
            }
            # (7 unchanged attributes hidden)
        }
        # (5 unchanged attributes hidden)
@aneeshk-citrix
Copy link
Collaborator

Hi @j7lloyd,

Thank you for reporting this issue. During what action do you see this issue? Create/Import/Update? Can you also share the terraform config, masking any sensitive attributes?

Thanks,
Aneesh

@j7lloyd
Copy link
Author

j7lloyd commented Jun 3, 2024

Initially, the error arises during the creation of a machine catalog. However, an update necessitates the replacement of the resource, trapping me in a vicious cycle. Despite experimenting with different configurations, the outcome consistently persists when storage_type is set to 'Azure_Ephemeral_OS_Disk'. Hence, the fix outlined in PR #75 guarantees that the storage_type remains unchanged in this situation.

@j7lloyd
Copy link
Author

j7lloyd commented Jun 4, 2024

I have conducted further testing today and found that this issue occurs when I use a machine_profile_vm – or at least it doesn't error when I use a machine_profile_template_spec – after which, the StorageType value is set to "Standard_LRS" in CustomProperties, as follows:

<CustomProperties xmlns="http://schemas.citrix.com/2014/xd/machinecreation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Property xsi:type="StringProperty" Name="Zones" Value="1" />
    <Property xsi:type="StringProperty" Name="UseEphemeralOsDisk" Value="true" />
    <Property xsi:type="StringProperty" Name="UseManagedDisks" Value="true" />
    <Property xsi:type="StringProperty" Name="LicenseType" Value="Windows_Client" />
    <Property xsi:type="StringProperty" Name="UseSharedImageGallery" Value="true" />
    <Property xsi:type="StringProperty" Name="SharedImageGalleryReplicaRatio" Value="40" />
    <Property xsi:type="StringProperty" Name="SharedImageGalleryReplicaMaximum" Value="10" />
    <Property xsi:type="StringProperty" Name="DiskEncryptionSetId" Value="**removed**" />
    <Property xsi:type="StringProperty" Name="SchemaVersion" Value="2" />
    <Property xsi:type="StringProperty" Name="OsType" Value="Windows" />
    <Property xsi:type="StringProperty" Name="StorageType" Value="Standard_LRS" />
</CustomProperties>

Consequently, I have updated PR #75 to avoid refreshing the StorageType property when UseEphemeralOsDisk is "true".

@aneeshk-citrix
Copy link
Collaborator

Hi @j7lloyd,

Thanks for bringing up this issue and also for opening the corresponding PR. We will have this fix included in the next release.

Aneesh

@aneeshk-citrix aneeshk-citrix added the bug Something isn't working label Jun 5, 2024
@xushengl xushengl mentioned this issue Jun 17, 2024
@xushengl xushengl linked a pull request Jun 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants