-
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
New Resource: azurerm_cosmosdb_postgresql_cluster
#21090
New Resource: azurerm_cosmosdb_postgresql_cluster
#21090
Conversation
internal/services/postgresqlhsc/postgresql_hyperscale_cluster_resource.go
Outdated
Show resolved
Hide resolved
@katbyte , thanks for your comment. I updated PR. Please take another look. Thanks. |
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.
Hey @neil-yechenwei. Thanks for this PR. It looks mostly good but there are a few potential crashes and some code we should shrink down if we can.
} | ||
|
||
if props := model.Properties; props != nil { | ||
state.AdministratorLoginPassword = metadata.ResourceData.Get("administrator_login_password").(string) |
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.
We shouldn't need to set these values in state if the api isn't returning them
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.
TF would fail with below error after it's removed. I remember the colleague from your team previously suggested me to read it from tf file. So I assume we need to keep it.
=== RUN TestAccCosmosDbPostgreSQLCluster_basic
=== PAUSE TestAccCosmosDbPostgreSQLCluster_basic
=== CONT TestAccCosmosDbPostgreSQLCluster_basic
testcase.go:110: Step 1/2 error: After applying this test step, the plan was not empty.
stdout:
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# azurerm_cosmosdb_postgresql_cluster.test will be updated in-place
~ resource "azurerm_cosmosdb_postgresql_cluster" "test" {
+ administrator_login_password = (sensitive value)
id = "/subscriptions/xx-xx-xxx-xx/resourceGroups/acctestRG-pshsc-230426160316468761/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/acctestcluster230426160316468761"
name = "acctestcluster230426160316468761"
# (15 unchanged attributes hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
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.
Oh. That's interesting. I haven't seen that before. I wonder whats going on there. But no worries, we can keep it that way!
|
||
if props := model.Properties; props != nil { | ||
state.AdministratorLoginPassword = metadata.ResourceData.Get("administrator_login_password").(string) | ||
state.SourceResourceId = metadata.ResourceData.Get("source_resource_id").(string) |
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.
And here
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.
See above reason
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.
@neil-yechenwei this is returned from the API - is this coming back as nil
/ is this an API bug?
internal/services/cosmos/cosmosdb_postgresql_cluster_resource.go
Outdated
Show resolved
Hide resolved
internal/services/cosmos/cosmosdb_postgresql_cluster_resource.go
Outdated
Show resolved
Hide resolved
internal/services/cosmos/cosmosdb_postgresql_cluster_resource.go
Outdated
Show resolved
Hide resolved
internal/services/cosmos/cosmosdb_postgresql_cluster_resource.go
Outdated
Show resolved
Hide resolved
internal/services/cosmos/cosmosdb_postgresql_cluster_resource.go
Outdated
Show resolved
Hide resolved
internal/services/cosmos/cosmosdb_postgresql_cluster_resource.go
Outdated
Show resolved
Hide resolved
@mbfrahry , thanks for your comments. I updated PR. Please take another look. Thanks.
|
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.
LGTM! Thanks for those changes @neil-yechenwei
This functionality has been released in v3.54.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! |
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. |
fixes #19375