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: updating to v0.21.0 of github.com/hashicorp/go-azure-helpers #15043

Merged
merged 3 commits into from
Jan 24, 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 go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ require (
github.com/google/go-cmp v0.5.6
github.com/google/uuid v1.1.2
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-azure-helpers v0.19.1
github.com/hashicorp/go-azure-helpers v0.21.0
github.com/hashicorp/go-getter v1.5.4
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/go-plugin v1.4.2 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-azure-helpers v0.12.0/go.mod h1:Zc3v4DNeX6PDdy7NljlYpnrdac1++qNW0I4U+ofGwpg=
github.com/hashicorp/go-azure-helpers v0.19.1 h1:wDVQGxpXXVdzgkkdG09Me1ZnIOQGGu+qntgPJVrA2GM=
github.com/hashicorp/go-azure-helpers v0.19.1/go.mod h1:lZo52hYeyEoo4qpUUruaEec13bFyu8ldjX2zTFzVzss=
github.com/hashicorp/go-azure-helpers v0.21.0 h1:wp8IIrpYBln+MaMqySsSVqpoe2te+19sI1xmSIsATxo=
github.com/hashicorp/go-azure-helpers v0.21.0/go.mod h1:Z2IvHhrwmpdDU5Mdld+vETChcenndWcY1bws4Hsn+Wk=
github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU=
github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg=
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
Expand Down Expand Up @@ -357,8 +357,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/manicminer/hamilton v0.35.0 h1:K72BHXLhlO+H/evI5iburLDfVe19bDaXO+hEIQEVkdg=
github.com/manicminer/hamilton v0.35.0/go.mod h1:IOYn2Dc9SUiZ7Ryw6c8Ay795vPPMnrCZe3MktS447dc=
github.com/manicminer/hamilton v0.37.0 h1:lQ+7Whyr4dG3SkfEmc4Rm2pM6KRbNa1e3O9RWVE+eD8=
github.com/manicminer/hamilton v0.37.0/go.mod h1:IOYn2Dc9SUiZ7Ryw6c8Ay795vPPMnrCZe3MktS447dc=
github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
Expand Down
2 changes: 1 addition & 1 deletion internal/clients/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func Build(ctx context.Context, builder ClientBuilder) (*Client, error) {
}

// Key Vault Endpoints
keyVaultAuth := builder.AuthConfig.BearerAuthorizerCallback(ctx, sender, oauthConfig)
keyVaultAuth := builder.AuthConfig.ADALBearerAuthorizerCallback(ctx, sender, oauthConfig)

// Batch Management Endpoints
batchManagementAuth, err := builder.AuthConfig.GetADALToken(ctx, sender, oauthConfig, env.BatchManagementEndpoint)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ import (
"time"

"github.com/hashicorp/go-azure-helpers/lang/response"
tagsHelper "github.com/hashicorp/go-azure-helpers/resourcemanager/tags"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/go-azure-helpers/resourcemanager/tags"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
azValidate "github.com/hashicorp/terraform-provider-azurerm/helpers/validate"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/location"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/analysisservices/sdk/2017-08-01/servers"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/analysisservices/validate"
"github.com/hashicorp/terraform-provider-azurerm/internal/tags"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation"
"github.com/hashicorp/terraform-provider-azurerm/internal/timeouts"
Expand Down Expand Up @@ -128,7 +128,7 @@ func resourceAnalysisServicesServer() *pluginsdk.Resource {
Computed: true,
},

"tags": tags.Schema(),
"tags": commonschema.Tags(),
},
}
}
Expand Down Expand Up @@ -162,7 +162,7 @@ func resourceAnalysisServicesServerCreate(d *pluginsdk.ResourceData, meta interf
Name: d.Get("sku").(string),
},
Properties: serverProperties,
Tags: tagsHelper.Expand(d.Get("tags").(map[string]interface{})),
Tags: tags.Expand(d.Get("tags").(map[string]interface{})),
}

if err := client.CreateThenPoll(ctx, id, analysisServicesServer); err != nil {
Expand Down Expand Up @@ -225,7 +225,7 @@ func resourceAnalysisServicesServerRead(d *pluginsdk.ResourceData, meta interfac
}
}

if err := tags.FlattenAndSet(d, tagsHelper.Flatten(model.Tags)); err != nil {
if err := tags.FlattenAndSet(d, model.Tags); err != nil {
return err
}
}
Expand Down Expand Up @@ -278,7 +278,7 @@ func resourceAnalysisServicesServerUpdate(d *pluginsdk.ResourceData, meta interf
Sku: &servers.ResourceSku{
Name: sku,
},
Tags: tagsHelper.Expand(t),
Tags: tags.Expand(t),
Properties: serverProperties,
}

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

"github.com/hashicorp/go-azure-helpers/lang/response"
tagsHelper "github.com/hashicorp/go-azure-helpers/resourcemanager/tags"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/go-azure-helpers/resourcemanager/tags"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/location"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/appconfiguration/sdk/2020-06-01/configurationstores"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/appconfiguration/validate"
"github.com/hashicorp/terraform-provider-azurerm/internal/tags"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
"github.com/hashicorp/terraform-provider-azurerm/internal/timeouts"
)
Expand Down Expand Up @@ -141,7 +141,7 @@ func dataSourceAppConfiguration() *pluginsdk.Resource {
},
},

"tags": tags.SchemaDataSource(),
"tags": commonschema.TagsDataSource(),
},
}
}
Expand Down Expand Up @@ -186,7 +186,7 @@ func dataSourceAppConfigurationRead(d *pluginsdk.ResourceData, meta interface{})
d.Set("secondary_read_key", accessKeys.secondaryReadKey)
d.Set("secondary_write_key", accessKeys.secondaryWriteKey)

return tags.FlattenAndSet(d, tagsHelper.Flatten(model.Tags))
return tags.FlattenAndSet(d, model.Tags)
}

return nil
Expand Down
12 changes: 6 additions & 6 deletions internal/services/appconfiguration/app_configuration_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import (
"time"

"github.com/hashicorp/go-azure-helpers/lang/response"
tagsHelper "github.com/hashicorp/go-azure-helpers/resourcemanager/tags"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/go-azure-helpers/resourcemanager/tags"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/identity"
"github.com/hashicorp/terraform-provider-azurerm/internal/location"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/appconfiguration/sdk/2020-06-01/configurationstores"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/appconfiguration/validate"
"github.com/hashicorp/terraform-provider-azurerm/internal/tags"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation"
"github.com/hashicorp/terraform-provider-azurerm/internal/timeouts"
Expand Down Expand Up @@ -169,7 +169,7 @@ func resourceAppConfiguration() *pluginsdk.Resource {
},
},

"tags": tags.Schema(),
"tags": commonschema.Tags(),
},
}
}
Expand Down Expand Up @@ -200,7 +200,7 @@ func resourceAppConfigurationCreate(d *pluginsdk.ResourceData, meta interface{})
Sku: configurationstores.Sku{
Name: d.Get("sku").(string),
},
Tags: tagsHelper.Expand(d.Get("tags").(map[string]interface{})),
Tags: tags.Expand(d.Get("tags").(map[string]interface{})),
}

identity, err := expandAppConfigurationIdentity(d.Get("identity").([]interface{}))
Expand Down Expand Up @@ -232,7 +232,7 @@ func resourceAppConfigurationUpdate(d *pluginsdk.ResourceData, meta interface{})
Sku: &configurationstores.Sku{
Name: d.Get("sku").(string),
},
Tags: tagsHelper.Expand(d.Get("tags").(map[string]interface{})),
Tags: tags.Expand(d.Get("tags").(map[string]interface{})),
}

if d.HasChange("identity") {
Expand Down Expand Up @@ -296,7 +296,7 @@ func resourceAppConfigurationRead(d *pluginsdk.ResourceData, meta interface{}) e
return fmt.Errorf("setting `identity`: %+v", err)
}

return tags.FlattenAndSet(d, tagsHelper.Flatten(model.Tags))
return tags.FlattenAndSet(d, model.Tags)
}

return nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (
"time"

"github.com/hashicorp/go-azure-helpers/lang/response"
tagsHelper "github.com/hashicorp/go-azure-helpers/resourcemanager/tags"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/go-azure-helpers/resourcemanager/tags"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/location"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/attestation/parse"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/attestation/sdk/2020-10-01/attestationproviders"
"github.com/hashicorp/terraform-provider-azurerm/internal/tags"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
"github.com/hashicorp/terraform-provider-azurerm/internal/timeouts"
)
Expand Down Expand Up @@ -44,7 +44,7 @@ func dataSourceAttestationProvider() *pluginsdk.Resource {
Computed: true,
},

"tags": tags.SchemaDataSource(),
"tags": commonschema.TagsDataSource(),
},
}
}
Expand Down Expand Up @@ -79,7 +79,7 @@ func dataSourceArmAttestationProviderRead(d *pluginsdk.ResourceData, meta interf
d.Set("attestation_uri", props.AttestUri)
d.Set("trust_model", props.TrustModel)
}
return tags.FlattenAndSet(d, tagsHelper.Flatten(resp.Model.Tags))
return tags.FlattenAndSet(d, resp.Model.Tags)
}

return nil
Expand Down
12 changes: 6 additions & 6 deletions internal/services/attestation/attestation_provider_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ import (
"time"

"github.com/hashicorp/go-azure-helpers/lang/response"
tagsHelper "github.com/hashicorp/go-azure-helpers/resourcemanager/tags"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/go-azure-helpers/resourcemanager/tags"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/location"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/attestation/parse"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/attestation/sdk/2020-10-01/attestationproviders"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/attestation/validate"
"github.com/hashicorp/terraform-provider-azurerm/internal/tags"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
"github.com/hashicorp/terraform-provider-azurerm/internal/timeouts"
)
Expand Down Expand Up @@ -59,7 +59,7 @@ func resourceAttestationProvider() *pluginsdk.Resource {
ValidateFunc: validate.IsCert,
},

"tags": tags.Schema(),
"tags": commonschema.Tags(),

"attestation_uri": {
Type: pluginsdk.TypeString,
Expand Down Expand Up @@ -99,7 +99,7 @@ func resourceAttestationProviderCreate(d *pluginsdk.ResourceData, meta interface
Properties: attestationproviders.AttestationServiceCreationSpecificParams{
// AttestationPolicy was deprecated in October of 2019
},
Tags: tagsHelper.Expand(d.Get("tags").(map[string]interface{})),
Tags: tags.Expand(d.Get("tags").(map[string]interface{})),
}

// NOTE: This maybe an slice in a future release or even a slice of slices
Expand Down Expand Up @@ -155,7 +155,7 @@ func resourceAttestationProviderRead(d *pluginsdk.ResourceData, meta interface{}
d.Set("attestation_uri", props.AttestUri)
d.Set("trust_model", props.TrustModel)
}
return tags.FlattenAndSet(d, tagsHelper.Flatten(model.Tags))
return tags.FlattenAndSet(d, model.Tags)
}

return nil
Expand All @@ -173,7 +173,7 @@ func resourceAttestationProviderUpdate(d *pluginsdk.ResourceData, meta interface

updateParams := attestationproviders.AttestationServicePatchParams{}
if d.HasChange("tags") {
updateParams.Tags = tagsHelper.Expand(d.Get("tags").(map[string]interface{}))
updateParams.Tags = tags.Expand(d.Get("tags").(map[string]interface{}))
}

if _, err := client.Update(ctx, *id, updateParams); err != nil {
Expand Down
11 changes: 5 additions & 6 deletions internal/services/databricks/databricks_workspace_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ import (
"time"

"github.com/hashicorp/go-azure-helpers/lang/response"
tagsHelper "github.com/hashicorp/go-azure-helpers/resourcemanager/tags"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/go-azure-helpers/resourcemanager/tags"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/databricks/sdk/2021-04-01-preview/workspaces"
"github.com/hashicorp/terraform-provider-azurerm/internal/tags"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
"github.com/hashicorp/terraform-provider-azurerm/internal/timeouts"
)
Expand All @@ -28,7 +27,7 @@ func dataSourceDatabricksWorkspace() *pluginsdk.Resource {
Required: true,
},

"resource_group_name": azure.SchemaResourceGroupNameForDataSource(),
"resource_group_name": commonschema.ResourceGroupNameForDataSource(),

"sku": {
Type: pluginsdk.TypeString,
Expand All @@ -45,7 +44,7 @@ func dataSourceDatabricksWorkspace() *pluginsdk.Resource {
Computed: true,
},

"tags": tags.Schema(),
"tags": commonschema.Tags(),
},
}
}
Expand Down Expand Up @@ -76,7 +75,7 @@ func dataSourceDatabricksWorkspaceRead(d *pluginsdk.ResourceData, meta interface
d.Set("workspace_id", model.Properties.WorkspaceId)
d.Set("workspace_url", model.Properties.WorkspaceUrl)

return tags.FlattenAndSet(d, tagsHelper.Flatten(model.Tags))
return tags.FlattenAndSet(d, model.Tags)
}
return nil
}
19 changes: 10 additions & 9 deletions internal/services/databricks/databricks_workspace_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import (
"time"

"github.com/hashicorp/go-azure-helpers/lang/response"
tagsHelper "github.com/hashicorp/go-azure-helpers/resourcemanager/tags"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/go-azure-helpers/resourcemanager/location"
"github.com/hashicorp/go-azure-helpers/resourcemanager/tags"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
Expand All @@ -21,7 +23,6 @@ import (
loadBalancerParse "github.com/hashicorp/terraform-provider-azurerm/internal/services/loadbalancer/parse"
resourcesParse "github.com/hashicorp/terraform-provider-azurerm/internal/services/resource/parse"
storageValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/storage/validate"
"github.com/hashicorp/terraform-provider-azurerm/internal/tags"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation"
"github.com/hashicorp/terraform-provider-azurerm/internal/timeouts"
Expand Down Expand Up @@ -55,9 +56,9 @@ func resourceDatabricksWorkspace() *pluginsdk.Resource {
ValidateFunc: validate.WorkspaceName,
},

"location": azure.SchemaLocation(),
"location": commonschema.Location(),

"resource_group_name": azure.SchemaResourceGroupName(),
"resource_group_name": commonschema.ResourceGroupName(),

"sku": {
Type: pluginsdk.TypeString,
Expand Down Expand Up @@ -267,7 +268,7 @@ func resourceDatabricksWorkspace() *pluginsdk.Resource {
},
},

"tags": tags.Schema(),
"tags": commonschema.Tags(),
},

CustomizeDiff: pluginsdk.CustomizeDiffShim(func(ctx context.Context, d *pluginsdk.ResourceDiff, v interface{}) error {
Expand Down Expand Up @@ -336,9 +337,9 @@ func resourceDatabricksWorkspaceCreateUpdate(d *pluginsdk.ResourceData, meta int
var backendPoolName, loadBalancerId string
skuName := d.Get("sku").(string)
managedResourceGroupName := d.Get("managed_resource_group_name").(string)
location := azure.NormalizeLocation(d.Get("location").(string))
location := location.Normalize(d.Get("location").(string))
backendPool := d.Get("load_balancer_backend_address_pool_id").(string)
expandedTags := tagsHelper.Expand(d.Get("tags").(map[string]interface{}))
expandedTags := tags.Expand(d.Get("tags").(map[string]interface{}))

if backendPool != "" {
backendPoolId, err := loadBalancerParse.LoadBalancerBackendAddressPoolID(backendPool)
Expand Down Expand Up @@ -447,7 +448,7 @@ func resourceDatabricksWorkspaceCreateUpdate(d *pluginsdk.ResourceData, meta int
ManagedResourceGroupId: managedResourceGroupID,
Parameters: customParams,
},
Tags: tagsHelper.Expand(d.Get("tags").(map[string]interface{})),
Tags: tags.Expand(d.Get("tags").(map[string]interface{})),
}

if requireNsgRules != "" {
Expand Down Expand Up @@ -601,7 +602,7 @@ func resourceDatabricksWorkspaceRead(d *pluginsdk.ResourceData, meta interface{}
d.Set("managed_services_cmk_key_vault_key_id", key.ID())
}
}
return tags.FlattenAndSet(d, tagsHelper.Flatten(model.Tags))
return tags.FlattenAndSet(d, model.Tags)
}

return nil
Expand Down
Loading