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

dependencies Update digitaltwins api version to 2020-12-01 #16044

Merged
merged 4 commits into from
Mar 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/services/digitaltwins/client/client.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package client

import (
"github.com/Azure/azure-sdk-for-go/services/digitaltwins/mgmt/2020-10-31/digitaltwins"
"github.com/Azure/azure-sdk-for-go/services/digitaltwins/mgmt/2020-12-01/digitaltwins"
"github.com/hashicorp/terraform-provider-azurerm/internal/common"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"time"

"github.com/Azure/azure-sdk-for-go/services/digitaltwins/mgmt/2020-10-31/digitaltwins"
"github.com/Azure/azure-sdk-for-go/services/digitaltwins/mgmt/2020-12-01/digitaltwins"
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/digitaltwins/parse"
Expand Down Expand Up @@ -105,11 +105,12 @@ func resourceDigitalTwinsEndpointEventGridCreateUpdate(d *pluginsdk.ResourceData

properties := digitaltwins.EndpointResource{
Properties: &digitaltwins.EventGrid{
EndpointType: digitaltwins.EndpointTypeEventGrid,
TopicEndpoint: utils.String(d.Get("eventgrid_topic_endpoint").(string)),
AccessKey1: utils.String(d.Get("eventgrid_topic_primary_access_key").(string)),
AccessKey2: utils.String(d.Get("eventgrid_topic_secondary_access_key").(string)),
DeadLetterSecret: utils.String(d.Get("dead_letter_storage_secret").(string)),
EndpointType: digitaltwins.EndpointTypeEventGrid,
AuthenticationType: digitaltwins.KeyBased,
TopicEndpoint: utils.String(d.Get("eventgrid_topic_endpoint").(string)),
AccessKey1: utils.String(d.Get("eventgrid_topic_primary_access_key").(string)),
AccessKey2: utils.String(d.Get("eventgrid_topic_secondary_access_key").(string)),
DeadLetterSecret: utils.String(d.Get("dead_letter_storage_secret").(string)),
},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"time"

"github.com/Azure/azure-sdk-for-go/services/digitaltwins/mgmt/2020-10-31/digitaltwins"
"github.com/Azure/azure-sdk-for-go/services/digitaltwins/mgmt/2020-12-01/digitaltwins"
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/digitaltwins/parse"
Expand Down Expand Up @@ -103,6 +103,7 @@ func resourceDigitalTwinsEndpointEventHubCreateUpdate(d *pluginsdk.ResourceData,
properties := digitaltwins.EndpointResource{
Properties: &digitaltwins.EventHub{
EndpointType: digitaltwins.EndpointTypeEventHub,
AuthenticationType: digitaltwins.KeyBased,
ConnectionStringPrimaryKey: utils.String(d.Get("eventhub_primary_connection_string").(string)),
ConnectionStringSecondaryKey: utils.String(d.Get("eventhub_secondary_connection_string").(string)),
DeadLetterSecret: utils.String(d.Get("dead_letter_storage_secret").(string)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"time"

"github.com/Azure/azure-sdk-for-go/services/digitaltwins/mgmt/2020-10-31/digitaltwins"
"github.com/Azure/azure-sdk-for-go/services/digitaltwins/mgmt/2020-12-01/digitaltwins"
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/digitaltwins/parse"
Expand Down Expand Up @@ -103,6 +103,7 @@ func resourceDigitalTwinsEndpointServiceBusCreateUpdate(d *pluginsdk.ResourceDat
properties := digitaltwins.EndpointResource{
Properties: &digitaltwins.ServiceBus{
EndpointType: digitaltwins.EndpointTypeServiceBus,
AuthenticationType: digitaltwins.KeyBased,
PrimaryConnectionString: utils.String(d.Get("servicebus_primary_connection_string").(string)),
SecondaryConnectionString: utils.String(d.Get("servicebus_secondary_connection_string").(string)),
DeadLetterSecret: utils.String(d.Get("dead_letter_storage_secret").(string)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"time"

"github.com/Azure/azure-sdk-for-go/services/digitaltwins/mgmt/2020-10-31/digitaltwins"
"github.com/Azure/azure-sdk-for-go/services/digitaltwins/mgmt/2020-12-01/digitaltwins"
"github.com/hashicorp/go-azure-helpers/resourcemanager/location"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
Expand Down Expand Up @@ -149,8 +149,13 @@ func resourceDigitalTwinsInstanceUpdate(d *pluginsdk.ResourceData, meta interfac
props.Tags = tags.Expand(d.Get("tags").(map[string]interface{}))
}

if _, err := client.Update(ctx, id.ResourceGroup, id.Name, props); err != nil {
return fmt.Errorf("updating Digital Twins Instance %q (Resource Group %q): %+v", id.Name, id.ResourceGroup, err)
future, err := client.Update(ctx, id.ResourceGroup, id.Name, props)
if err != nil {
return fmt.Errorf("updating %s: %+v", *id, err)
}

if err := future.WaitForCompletionRef(ctx, client.Client); err != nil {
return fmt.Errorf("waiting for update of %s: %+v", *id, err)
}

return resourceDigitalTwinsInstanceRead(d, meta)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading