Skip to content

Commit

Permalink
Merge pull request hashicorp#12698 from terraform-providers/b/eventhu…
Browse files Browse the repository at this point in the history
…bs-azure-sdk-usages

eventhubs: removing direct usages on the Azure SDK for Eventhub
  • Loading branch information
tombuildsstuff authored Jul 23, 2021
2 parents 20efaf8 + 25b4279 commit f29e106
Show file tree
Hide file tree
Showing 20 changed files with 9 additions and 10,535 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"strconv"
"time"

"github.com/Azure/azure-sdk-for-go/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub"
"github.com/hashicorp/go-azure-helpers/response"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf"
Expand Down Expand Up @@ -284,8 +283,8 @@ func resourceEventHubNamespaceDisasterRecoveryConfigWaitForState(ctx context.Con
return fmt.Errorf("context had no deadline")
}
stateConf := &pluginsdk.StateChangeConf{
Pending: []string{string(eventhub.ProvisioningStateDRAccepted)},
Target: []string{string(eventhub.ProvisioningStateDRSucceeded)},
Pending: []string{string(disasterrecoveryconfigs.ProvisioningStateDRAccepted)},
Target: []string{string(disasterrecoveryconfigs.ProvisioningStateDRSucceeded)},
MinTimeout: 30 * time.Second,
Timeout: time.Until(deadline),
Refresh: func() (interface{}, string, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"strings"
"time"

"github.com/Azure/azure-sdk-for-go/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub"
"github.com/hashicorp/go-azure-helpers/response"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf"
Expand Down Expand Up @@ -112,7 +111,7 @@ func resourceEventHubNamespace() *pluginsdk.Resource {
Type: pluginsdk.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{
string(eventhub.SystemAssigned),
string(namespaces.ManagedServiceIdentityTypeSystemAssigned),
}, false),
},

Expand Down Expand Up @@ -144,13 +143,12 @@ func resourceEventHubNamespace() *pluginsdk.Resource {
ConfigMode: pluginsdk.SchemaConfigModeAttr,
Elem: &pluginsdk.Resource{
Schema: map[string]*pluginsdk.Schema{

"default_action": {
Type: pluginsdk.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{
string(eventhub.Allow),
string(eventhub.Deny),
string(networkrulesets.DefaultActionAllow),
string(networkrulesets.DefaultActionDeny),
}, false),
},

Expand Down Expand Up @@ -201,9 +199,9 @@ func resourceEventHubNamespace() *pluginsdk.Resource {
"action": {
Type: pluginsdk.TypeString,
Optional: true,
Default: string(eventhub.NetworkRuleIPActionAllow),
Default: string(networkrulesets.NetworkRuleIPActionAllow),
ValidateFunc: validation.StringInSlice([]string{
string(eventhub.NetworkRuleIPActionAllow),
string(networkrulesets.NetworkRuleIPActionAllow),
}, false),
},
},
Expand Down
5 changes: 2 additions & 3 deletions azurerm/internal/services/eventhub/eventhub_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"log"
"time"

"github.com/Azure/azure-sdk-for-go/services/preview/eventhub/mgmt/2018-01-01-preview/eventhub"
"github.com/hashicorp/go-azure-helpers/response"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf"
Expand Down Expand Up @@ -91,8 +90,8 @@ func resourceEventHub() *pluginsdk.Resource {
Required: true,
DiffSuppressFunc: suppress.CaseDifference,
ValidateFunc: validation.StringInSlice([]string{
string(eventhub.Avro),
string(eventhub.AvroDeflate),
string(eventhubs.EncodingCaptureDescriptionAvro),
string(eventhubs.EncodingCaptureDescriptionAvroDeflate),
}, true),
},
"interval_in_seconds": {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit f29e106

Please sign in to comment.