-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
r/storage_share: switching the state migration over to 0.12 format #3882
Conversation
``` $ go test -v ./azurerm/ -run=TestAzureRMStorageShareMigrateState === RUN TestAzureRMStorageShareMigrateStateV0ToV1 2019/07/19 13:33:46 [DEBUG] Updating ID from "share1" to "share1/group1/account1" 2019/07/19 13:33:46 [DEBUG] Updating ID from "share1" to "share1/group1/account1" 2019/07/19 13:33:46 [DEBUG] Updating ID from "share1" to "share1/group1/account1" 2019/07/19 13:33:46 [DEBUG] Updating ID from "share1" to "share1/group1/account1" --- PASS: TestAzureRMStorageShareMigrateStateV0ToV1 (0.00s) resource_arm_storage_share_migration_test.go:20: [DEBUG] Testing with Cloud "AzureChinaCloud" resource_arm_storage_share_migration_test.go:49: [DEBUG] Ok! resource_arm_storage_share_migration_test.go:20: [DEBUG] Testing with Cloud "AzureGermanCloud" resource_arm_storage_share_migration_test.go:49: [DEBUG] Ok! resource_arm_storage_share_migration_test.go:20: [DEBUG] Testing with Cloud "AzurePublicCloud" resource_arm_storage_share_migration_test.go:49: [DEBUG] Ok! resource_arm_storage_share_migration_test.go:20: [DEBUG] Testing with Cloud "AzureUSGovernmentCloud" resource_arm_storage_share_migration_test.go:49: [DEBUG] Ok! === RUN TestAzureRMStorageShareMigrateStateV1ToV2 2019/07/19 13:33:46 [DEBUG] Updating Resource ID from "share1/group1/account1" to "https://account1.file.core.chinacloudapi.cn/share1" 2019/07/19 13:33:46 [DEBUG] Updating Resource ID from "share1/group1/account1" to "https://account1.file.core.cloudapi.de/share1" 2019/07/19 13:33:46 [DEBUG] Updating Resource ID from "share1/group1/account1" to "https://account1.file.core.windows.net/share1" 2019/07/19 13:33:46 [DEBUG] Updating Resource ID from "share1/group1/account1" to "https://account1.file.core.usgovcloudapi.net/share1" --- PASS: TestAzureRMStorageShareMigrateStateV1ToV2 (0.00s) resource_arm_storage_share_migration_test.go:62: [DEBUG] Testing with Cloud "AzureChinaCloud" resource_arm_storage_share_migration_test.go:91: [DEBUG] Ok! resource_arm_storage_share_migration_test.go:62: [DEBUG] Testing with Cloud "AzureGermanCloud" resource_arm_storage_share_migration_test.go:91: [DEBUG] Ok! resource_arm_storage_share_migration_test.go:62: [DEBUG] Testing with Cloud "AzurePublicCloud" resource_arm_storage_share_migration_test.go:91: [DEBUG] Ok! resource_arm_storage_share_migration_test.go:62: [DEBUG] Testing with Cloud "AzureUSGovernmentCloud" resource_arm_storage_share_migration_test.go:91: [DEBUG] Ok! PASS ok github.com/terraform-providers/terraform-provider-azurerm/azurerm 0.038s ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me! 🚀
Type: schema.TypeString, | ||
Required: true, | ||
ForceNew: true, | ||
ValidateFunc: validateArmStorageShareName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I believe you can remove extraneous elements like ValidateFunc
, ForceNew
, Required
, etc. from these old schema definitions since the state upgraders only need the type information, but either which way though!
This has been released in version 1.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 = "~> 1.32.0"
}
# ... other configuration ... |
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! |
The 0.12 SDK uses a different State Migration System to the 0.11 SDK - as such I've ported this over to the new State Migration system (and retroactively included the V0 schema for posterity)