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

azurerm_storage_share set metadata Computed and set acl start and expiry Optional #8811

Merged
merged 4 commits into from
Oct 12, 2020

Conversation

yupwei68
Copy link
Contributor

@yupwei68 yupwei68 commented Oct 9, 2020

Fix azurerm_storage_sync_cloud_endpoint acctest problems, #8540

Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @yupwei68, can you go into a little detail about why we're making MetaData computed. I can see that you're doing a lifecycle ignore in the PR you linked but I didn't see how it was affecting that resource.

Also can you write a test to confirm that we can create a storage share with an ACL but not setting expiry and start. We'll also want to update the documentation as well

@yupwei68
Copy link
Contributor Author

Hi @mbfrahry here's the metadata will be changed once we have created a azurerm_storage_sync_cloud_endpoint with reference to it.

 After applying this step and refreshing, the plan was not empty:
        
        DIFF:
        
        UPDATE: azurerm_storage_share.test
          ...
          metadata.azurebackupprotected:     "False" => ""
          metadata.postbackupuri:            "/subscriptions/.../resourceGroups/.../providers/microsoft.storagesync/storageSyncServices/.../syncGroups/.../cloudEndpoints/.../postbackup?api-version=2017-06-05-preview" => ""
          metadata.postrestoreuri:           "/subscriptions/..../resourceGroups/.../providers/microsoft.storagesync/storageSyncServices/.../syncGroups/.../cloudEndpoints/..../postrestore?api-version=2017-06-05-preview" => ""
          metadata.prebackupuri:             "/subscriptions/.../resourceGroups/.../providers/microsoft.storagesync/storageSyncServices/.../syncGroups/.../cloudEndpoints/.../prebackup?api-version=2017-06-05-preview" => ""
          metadata.prerestoreuri:            "/subscriptions/.../resourceGroups/.../providers/microsoft.storagesync/storageSyncServices/.../syncGroups/.../cloudEndpoints/.../prerestore?api-version=2017-06-05-preview" => ""
          metadata.restoreheartbeaturi:      "/subscriptions/.../resourceGroups/.../providers/microsoft.storagesync/storageSyncServices/.../syncGroups/.../cloudEndpoints/.../restoreheartbeat?api-version=2017-06-05-preview" => ""
          metadata.syncgroup:                "..." => ""
          metadata.syncservice:              "..." => ""
          metadata.syncsignature:            "...." => ""
          ...
        

@ghost ghost added size/S and removed size/XS labels Oct 10, 2020
@yupwei68
Copy link
Contributor Author

@mbfrahry THanks for your comments. An additional test has been added. Please continue reviewing.
=== RUN TestAccAzureRMStorageShare_aclGhostedRecall
=== PAUSE TestAccAzureRMStorageShare_aclGhostedRecall
=== CONT TestAccAzureRMStorageShare_aclGhostedRecall
--- PASS: TestAccAzureRMStorageShare_aclGhostedRecall (134.55s)

@ghost ghost added the documentation label Oct 12, 2020
Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for taking the time to explain the metadata issue @yupwei68

@mbfrahry mbfrahry merged commit 3577636 into hashicorp:master Oct 12, 2020
mbfrahry added a commit that referenced this pull request Oct 12, 2020
@mbfrahry mbfrahry added this to the v2.32.0 milestone Oct 12, 2020
@ghost
Copy link

ghost commented Oct 15, 2020

This has been released in version 2.32.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.32.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Nov 12, 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 as resolved and limited conversation to collaborators Nov 12, 2020
@yupwei68 yupwei68 deleted the wyp-str-share branch January 25, 2021 02:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants