-
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_data_factory_linked_service_odata
#11556
New Resource: azurerm_data_factory_linked_service_odata
#11556
Conversation
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 @pomverte - In addtion to the comments i've left inline, the tests are failing with:
Test ended in panic.
------- Stdout: -------
=== RUN TestAccDataFactoryLinkedServiceOData_anon_auth
=== PAUSE TestAccDataFactoryLinkedServiceOData_anon_auth
=== CONT TestAccDataFactoryLinkedServiceOData_anon_auth
------- Stderr: -------
2021/05/03 19:31:10 [DEBUG] not using binary driver name, it's no longer needed
2021/05/03 19:31:10 [DEBUG] not using binary driver name, it's no longer needed
panic: runtime error: index out of range [0] with length 0
goroutine 469 [running]:
github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/datafactory.authenticationProperties(0xc0036e39d0, 0x5e6aa60)
/opt/teamcity-agent/work/a73be106926a7472/azurerm/internal/services/datafactory/data_factory_linked_service_odata_resource.go:249 +0x485
github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/datafactory.resourceArmDataFactoryLinkedServiceODataCreateUpdate(0xc0036e39d0, 0x5656440, 0xc00118a000, 0x0, 0x0)
/opt/teamcity-agent/work/a73be106926a7472/azurerm/internal/services/datafactory/data_factory_linked_service_odata_resource.go:151 +0x22b
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Apply(0xc001845860, 0xc001d43860, 0xc0016a4940, 0x5656440, 0xc00118a000, 0x5685a01, 0xc00327d7c8, 0xc001a5c1e0)
/opt/teamcity-agent/work/a73be106926a7472/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource.go:320 +0x375
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).Apply(0xc0030cd200, 0xc000e6fa38, 0xc001d43860, 0xc0016a4940, 0xc001a5a088, 0xc0032d9f90, 0x5688ce0)
/opt/teamcity-agent/work/a73be106926a7472/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/provider.go:294 +0x99
github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ApplyResourceChange(0xc0019216f8, 0x65f27f0, 0xc001a52ba0, 0xc0036e3260, 0xc0019216f8, 0xc001a52ba0, 0xc001b00ba0)
/opt/teamcity-agent/work/a73be106926a7472/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin/grpc_provider.go:895 +0x8a5
github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ApplyResourceChange_Handler(0x5b6a4a0, 0xc0019216f8, 0x65f27f0, 0xc001a52ba0, 0xc002400f60, 0x0, 0x65f27f0, 0xc001a52ba0, 0xc001a56700, 0x359)
/opt/teamcity-agent/work/a73be106926a7472/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5/tfplugin5.pb.go:3305 +0x214
google.golang.org/grpc.(*Server).processUnaryRPC(0xc00127f6c0, 0x6639398, 0xc003058900, 0xc001250f00, 0xc001ccbc50, 0x9a5e6e0, 0x0, 0x0, 0x0)
/opt/teamcity-agent/work/a73be106926a7472/vendor/google.golang.org/grpc/server.go:1194 +0x52b
google.golang.org/grpc.(*Server).handleStream(0xc00127f6c0, 0x6639398, 0xc003058900, 0xc001250f00, 0x0)
/opt/teamcity-agent/work/a73be106926a7472/vendor/google.golang.org/grpc/server.go:1517 +0xd0c
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000d5c130, 0xc00127f6c0, 0x6639398, 0xc003058900, 0xc001250f00)
/opt/teamcity-agent/work/a73be106926a7472/vendor/google.golang.org/grpc/server.go:859 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
/opt/teamcity-agent/work/a73be106926a7472/vendor/google.golang.org/grpc/server.go:857 +0x1fd
azurerm/internal/services/datafactory/data_factory_linked_service_odata_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/datafactory/data_factory_linked_service_odata_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/datafactory/data_factory_linked_service_odata_resource_test.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/datafactory/data_factory_linked_service_odata_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/datafactory/data_factory_linked_service_odata_resource.go
Outdated
Show resolved
Hide resolved
5127b7b
to
2f9efcc
Compare
Thanks @katbyte for the reviews, could you help me to run test for debug ? Commands ran:
Is there a way to get more logs from the error ?
|
} | ||
|
||
if v, ok := d.GetOk("parameters"); ok { | ||
odataLinkedService.Parameters = expandDataFactoryParameters(v.(map[string]interface{})) |
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.
the crash is here because Parameters is nil because nothings been set yet, you'll need to init it above
azurerm/internal/services/datafactory/data_factory_linked_service_odata_resource.go
Outdated
Show resolved
Hide resolved
0b3ee24
to
295b5b1
Compare
295b5b1
to
4a62bd8
Compare
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.
Looks like the tests are failing:
est ended in panic.
------- Stdout: -------
=== RUN TestAccDataFactoryLinkedServiceOData_basic_update
=== PAUSE TestAccDataFactoryLinkedServiceOData_basic_update
=== CONT TestAccDataFactoryLinkedServiceOData_basic_update
------- Stderr: -------
2021/05/18 20:43:14 [DEBUG] not using binary driver name, it's no longer needed
2021/05/18 20:43:14 [DEBUG] not using binary driver name, it's no longer needed
panic: runtime error: index out of range [0] with length 0
goroutine 484 [running]:
github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/datafactory.authenticationProperties(0xc001b89b20, 0x5f2f76a)
/opt/teamcity-agent/work/a73be106926a7472/azurerm/internal/services/datafactory/data_factory_linked_service_odata_resource.go:275 +0x425
github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/datafactory.resourceArmDataFactoryLinkedServiceODataCreateUpdate(0xc001b89b20, 0x570c9e0, 0xc0002aa300, 0x0, 0x0)
/opt/teamcity-agent/work/a73be106926a7472/azurerm/internal/services/datafactory/data_factory_linked_service_odata_resource.go:148 +0x27d
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Apply(0xc002942000, 0xc0018f0af0, 0xc000b4cd80, 0x570c9e0, 0xc0002aa300, 0x573c401, 0xc001f12c28, 0xc00242e840)
/opt/teamcity-agent/work/a73be106926a7472/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource.go:320 +0x375
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).Apply(0xc003656780, 0xc0013bfa38, 0xc0018f0af0, 0xc000b4cd80, 0xc002c9ebc8, 0xc0021fa3a0, 0x573f640)
/opt/teamcity-agent/work/a73be106926a7472/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/provider.go:294 +0x99
github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ApplyResourceChange(0xc001d268d8, 0x66c84f0, 0xc00216cea0, 0xc001b89500, 0xc001d268d8, 0xc00216cea0, 0xc001909ba0)
/opt/teamcity-agent/work/a73be106926a7472/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin/grpc_provider.go:895 +0x8a5
github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ApplyResourceChange_Handler(0x5c28400, 0xc001d268d8, 0x66c84f0, 0xc0
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!
I just fixed the crashes and moved some of the logic around so it'll be easier to expand on if we need to enable some more features. Thanks for opening this PR!
azurerm_data_factory_linked_service_odata
This functionality has been released in v2.64.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. |
Add support for Terraform configuration for Azure Data Factory Linked Service of type OData.
New resource
azurerm_data_factory_linked_service_odata
Documentation : https://docs.microsoft.com/en-us/azure/data-factory/connector-odata
First try: #7704