opentofu/vendor/github.com/jen20/riviera/azure/get_resource_provider.go
Peter McAtominey 0284138440 provider/azurerm: support non public clouds (#11026)
* vendor: update jen20/riviera to pull in endpoints change

* provider/auzrerm: support non public clouds

Ran tests below with ARM_ENVIRONMENT=german and changes the location to Germany
Central in the test config. The virtual network tests cover both Riviera (resource
groups) and the official SDK client.

TF_ACC=1 go test ./builtin/providers/azurerm -v -run TestAccAzureRMVirtualNetwork_ -timeout 120m
=== RUN   TestAccAzureRMVirtualNetwork_importBasic
--- PASS: TestAccAzureRMVirtualNetwork_importBasic (81.84s)
=== RUN   TestAccAzureRMVirtualNetwork_basic
--- PASS: TestAccAzureRMVirtualNetwork_basic (78.14s)
=== RUN   TestAccAzureRMVirtualNetwork_disappears
--- PASS: TestAccAzureRMVirtualNetwork_disappears (78.45s)
=== RUN   TestAccAzureRMVirtualNetwork_withTags
--- PASS: TestAccAzureRMVirtualNetwork_withTags (81.78s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/azurerm	320.310s
2017-01-04 12:00:14 +00:00

27 lines
620 B
Go

package azure
import "fmt"
type GetResourceProviderResponse struct {
ID *string `mapstructure:"id"`
Namespace *string `mapstructure:"namespace"`
RegistrationState *string `mapstructure:"registrationState"`
}
type GetResourceProvider struct {
Namespace string `json:"-"`
}
func (command GetResourceProvider) APIInfo() APIInfo {
return APIInfo{
APIVersion: resourceGroupAPIVersion,
Method: "GET",
URLPathFunc: func() string {
return fmt.Sprintf("providers/%s", command.Namespace)
},
ResponseTypeFunc: func() interface{} {
return &GetResourceProviderResponse{}
},
}
}