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_postgresql_aad_administrator: Fix state migration #17732

Merged
merged 1 commit into from
Jul 25, 2022

Conversation

favoretti
Copy link
Collaborator

Fixes #17727

With 3.14 to 3.15 with OP testcase:

[9:46](⎈ |eastus2-fxs-atlas-nonprod-fxc:ingress-controller)➜  terraform-tests/psql git:(kusto) ✗ $ tp
data.azurerm_client_config.current: Reading...
azurerm_resource_group.example: Refreshing state... [id=/subscriptions/442736d8-39d9-418c-9c0c-2cee7f5126a5/resourceGroups/azurerm-debug]
data.azurerm_client_config.current: Read complete after 0s [id=2022-07-23 07:47:07.200831 +0000 UTC]
azurerm_postgresql_server.example: Refreshing state... [id=/subscriptions/442736d8-39d9-418c-9c0c-2cee7f5126a5/resourceGroups/azurerm-debug/providers/Microsoft.DBforPostgreSQL/servers/azurerm-debug-psqlserver]
╷
│ Error: string is required
│
│   with azurerm_postgresql_active_directory_administrator.example,
│   on main.tf line 32, in resource "azurerm_postgresql_active_directory_administrator" "example":
│   32: resource "azurerm_postgresql_active_directory_administrator" "example" {
│
╵

With 3.14 to my branch:

[9:47](⎈ |eastus2-fxs-atlas-nonprod-fxc:ingress-controller)➜  terraform-tests/psql git:(kusto) ✗ $ tfdev
[9:47](⎈ |eastus2-fxs-atlas-nonprod-fxc:ingress-controller)➜  terraform-tests/psql git:(kusto) ✗ $ tp
╷
│ Warning: Provider development overrides are in effect
│
│ The following provider development overrides are set in the CLI configuration:
│  - hashicorp/azurerm in /Users/vlazarenko/go/bin
│  - hashicorp/kubernetes in /Users/vlazarenko/go/bin
│  - favoretti/adx in /Users/vlazarenko/go/bin
│
│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with published releases.
╵
azurerm_resource_group.example: Refreshing state... [id=/subscriptions/442736d8-39d9-418c-9c0c-2cee7f5126a5/resourceGroups/azurerm-debug]
data.azurerm_client_config.current: Reading...
data.azurerm_client_config.current: Read complete after 0s [id=2022-07-23 07:48:31.214973 +0000 UTC]
azurerm_postgresql_server.example: Refreshing state... [id=/subscriptions/442736d8-39d9-418c-9c0c-2cee7f5126a5/resourceGroups/azurerm-debug/providers/Microsoft.DBforPostgreSQL/servers/azurerm-debug-psqlserver]
azurerm_postgresql_active_directory_administrator.example: Refreshing state... [id=/subscriptions/442736d8-39d9-418c-9c0c-2cee7f5126a5/resourceGroups/azurerm-debug/providers/Microsoft.DBforPostgreSQL/servers/azurerm-debug-psqlserver]

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.

Fixes hashicorp#17727

With 3.14 to 3.15 with OP testcase:
```
[9:46](⎈ |eastus2-fxs-atlas-nonprod-fxc:ingress-controller)➜  terraform-tests/psql git:(kusto) ✗ $ tp
data.azurerm_client_config.current: Reading...
azurerm_resource_group.example: Refreshing state... [id=/subscriptions/442736d8-39d9-418c-9c0c-2cee7f5126a5/resourceGroups/azurerm-debug]
data.azurerm_client_config.current: Read complete after 0s [id=2022-07-23 07:47:07.200831 +0000 UTC]
azurerm_postgresql_server.example: Refreshing state... [id=/subscriptions/442736d8-39d9-418c-9c0c-2cee7f5126a5/resourceGroups/azurerm-debug/providers/Microsoft.DBforPostgreSQL/servers/azurerm-debug-psqlserver]
╷
│ Error: string is required
│
│   with azurerm_postgresql_active_directory_administrator.example,
│   on main.tf line 32, in resource "azurerm_postgresql_active_directory_administrator" "example":
│   32: resource "azurerm_postgresql_active_directory_administrator" "example" {
│
╵
```
With 3.14 to my branch:
```
[9:47](⎈ |eastus2-fxs-atlas-nonprod-fxc:ingress-controller)➜  terraform-tests/psql git:(kusto) ✗ $ tfdev
[9:47](⎈ |eastus2-fxs-atlas-nonprod-fxc:ingress-controller)➜  terraform-tests/psql git:(kusto) ✗ $ tp
╷
│ Warning: Provider development overrides are in effect
│
│ The following provider development overrides are set in the CLI configuration:
│  - hashicorp/azurerm in /Users/vlazarenko/go/bin
│  - hashicorp/kubernetes in /Users/vlazarenko/go/bin
│  - favoretti/adx in /Users/vlazarenko/go/bin
│
│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with published releases.
╵
azurerm_resource_group.example: Refreshing state... [id=/subscriptions/442736d8-39d9-418c-9c0c-2cee7f5126a5/resourceGroups/azurerm-debug]
data.azurerm_client_config.current: Reading...
data.azurerm_client_config.current: Read complete after 0s [id=2022-07-23 07:48:31.214973 +0000 UTC]
azurerm_postgresql_server.example: Refreshing state... [id=/subscriptions/442736d8-39d9-418c-9c0c-2cee7f5126a5/resourceGroups/azurerm-debug/providers/Microsoft.DBforPostgreSQL/servers/azurerm-debug-psqlserver]
azurerm_postgresql_active_directory_administrator.example: Refreshing state... [id=/subscriptions/442736d8-39d9-418c-9c0c-2cee7f5126a5/resourceGroups/azurerm-debug/providers/Microsoft.DBforPostgreSQL/servers/azurerm-debug-psqlserver]

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.
```
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!

@github-actions
Copy link

github-actions bot commented Aug 1, 2022

This functionality has been released in v3.16.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Sep 1, 2022

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants