You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.
# azurerm_mysql_flexible_server.replica must be replaced
-/+ resource "azurerm_mysql_flexible_server""replica" {
[...]
+ source_server_id = "/subscriptions/XXX/resourceGroups/YYY/providers/Microsoft.DBforMySQL/flexibleServers/mysql-gwc-ZZZ"# forces replacement
Expected Behaviour
source_server_id property to be properly imported.
Actual Behaviour
source_server_id property is not imported.
Next plan/apply forces recreation which is not desired.
Looking at the source code source_server_id is not imported. Looks like there is the same behaviour with PostgreSQL Server resource. Is this somehow expected?
Steps to Reproduce
terraform apply "Primary only" configuration from above
@neil-yechenwei This is still not working correctly with 4.2.0 version.
I just did a simple import of manually created MySQL Flexible Server replica and source_server_id is again empty in the state file.
I am not sure your fix entirely correct, I have no experience with implementing providers but is this line from your fix correct? d.Set("source_server_id", d.Get("source_server_id").(string))
Shouldn't it get value from props. object similarly how rest of the properties are set?
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Is there an existing issue for this?
Community Note
Terraform Version
1.2.8
AzureRM Provider Version
3.116.0
Affected Resource(s)/Data Source(s)
azurerm_mysql_flexible_server
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
source_server_id property to be properly imported.
Actual Behaviour
source_server_id property is not imported.
Next plan/apply forces recreation which is not desired.
Looking at the source code
source_server_id
is not imported. Looks like there is the same behaviour with PostgreSQL Server resource. Is this somehow expected?Steps to Reproduce
terraform apply
"Primary only" configuration from aboveterraform import 'azurerm_mysql_flexible_server.replica' <replica-resource-id>
terraform plan
source_server_id
proeprty was not imported (null
in the state) and that plan tries to recreate replicaImportant Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: