-
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_mobile_network_data_network
; New DataSource: azurerm_mobile_network_data_network
#20338
Conversation
…`azurerm_mobile_network_data_network`
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 ⛈️
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.
Thanks @ziyeqf I've left two minor comments here but otherwise this LGTM!
internal/services/mobilenetwork/mobile_network_data_network_resource_test.go
Outdated
Show resolved
Hide resolved
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.
Thanks @ziyeqf LGTM!
Looks like this has some conflicts from merging the previous mobilenetwork PR, but we can marge this once these get resolved 👍 |
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 @ziyeqf
Thanks for pushing those changes - I've taken a look through and left some comments inline, if we can fix those up then this should otherwise be good to go 👍
Thanks!
internal/services/mobilenetwork/mobile_network_data_network_resource.go
Outdated
Show resolved
Hide resolved
internal/services/mobilenetwork/mobile_network_data_network_resource.go
Outdated
Show resolved
Hide resolved
return fmt.Errorf("deleting %s: %+v", id, err) | ||
} | ||
|
||
if err := resourceMobileNetworkChildWaitForDeletion(ctx, id.ID(), func() (*http.Response, error) { |
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.
is there an API bug tracking this, so we know when this is safe to remove?
It's worth noting that these workarounds shouldn't be needed in time with the new base layer, since that should both check the LRO and continue polling until the resource is fully provisioned/gone
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.
I just know it should because some infra issue.. actually what I need is some delay, the resource has already been 404, but when delete the parent resource, it will get an error.. I can open an issue but I dont think it could be fixed..
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.
just opened an issue for this..Azure/azure-rest-api-specs#22691
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.
Also, it might be better to add the workaround on delete function of azurerm_mobile_network
instead of on children resources, WDYT?
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.
One of the design guarantees of Terraform is that it won't mark a resource as provisioned/gone until the resource is fully provisioned/removed - so we'd need this to be present within the child resources rather than the parent azurerm_mobile_network
resource
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 @ziyeqf
Thanks for pushing those changes - taking a look through here this is mostly looking good to me now, I've left some minor comments inline (and called out a few FYI's, which aren't blockers) but if we can fix those up this should otherwise be good to go 👍
Thanks!
"github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/datanetwork" | ||
"github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/mobilenetwork" | ||
"github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/service" | ||
"github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/simgroup" |
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 isn't something we need to change now, but I wanted to call out that hashicorp/go-azure-sdk
supports Meta Clients for each API Version - so if an entire Service is using a single API Version (as is the case here) - rather than defining the Client and the Resources to use inline (as we're doing here) we can instead use the Meta Client as per datadog
to automatically have access to all clients, rather than defining these by hand.
Again, this isn't something we need to change now, but should make it easier to import the Client one-time (since we try and stick to a single API Version for each Service where possible) rather than adding these across different PR's :)
internal/services/mobilenetwork/mobile_network_data_network_resource.go
Outdated
Show resolved
Hide resolved
internal/services/mobilenetwork/mobile_network_data_network_resource.go
Outdated
Show resolved
Hide resolved
internal/services/mobilenetwork/mobile_network_data_network_resource.go
Outdated
Show resolved
Hide resolved
return fmt.Errorf("deleting %s: %+v", id, err) | ||
} | ||
|
||
if err := resourceMobileNetworkChildWaitForDeletion(ctx, id.ID(), func() (*http.Response, error) { |
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.
One of the design guarantees of Terraform is that it won't mark a resource as provisioned/gone until the resource is fully provisioned/removed - so we'd need this to be present within the child resources rather than the parent azurerm_mobile_network
resource
internal/services/mobilenetwork/mobile_network_data_network_resource.go
Outdated
Show resolved
Hide resolved
test
|
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.
Thanks @ziyeqf - LGTM ☎️
This functionality has been released in v3.46.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. |
an overall list is below. Detail of this RP could be found here
Though these PRs may have conflicts in merge sequence, but I think it should not block the review progress...
Over view
Test