forked from aristosvo/terraform-provider-azurerm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:terraform-providers/terraform-pro…
…vider-azurerm * 'master' of github.com:terraform-providers/terraform-provider-azurerm: (68 commits) Update changelog for hashicorp#11164 `azurerm_cognitive_account` - Add support for `network_acls` (hashicorp#11164) Update CHANGELOG.md for hashicorp#11069 New Resource: `azurerm_management_group_subscription_association` (hashicorp#11069) tests: limit running VMware tests in teamcity (hashicorp#11167) CHANGELOG.md for hashicorp#10627 azurerm_firewall: support for private_ip_ranges (hashicorp#10627) Update CHANGELOG.md for hashicorp#11083 Upgrade hpc cache API version to 2021-03-01 (hashicorp#11083) CHANGELOG.md for hashicorp#10724 new resource: azurerm_media_live_event (hashicorp#10724) CHANGELOG.md for hashicorp#11108 upgrade go sdk to v52.6.0 (hashicorp#11108) CHANGELOG.md for hashicorp#11139 azurerm_api_management: make certificate_password optional (hashicorp#11139) CHANGELOG.md for hashicorp#10830 r/azurerm_data_factory_linked_service_azure_blob_storage: Fixing managed identity implementation (hashicorp#10830) CHANGELOG.md for hashicorp#11131 azurerm_storage_account - support for 'container_delete_retention_policy' (hashicorp#11131) CHANGELOG.md for hashicorp#11106 ...
- Loading branch information
Showing
265 changed files
with
26,239 additions
and
3,665 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
azurerm/internal/services/apimanagement/testdata/api_management_api_test.cer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIICsjCCAZoCCQCMdt7DvygPtDANBgkqhkiG9w0BAQsFADAbMRkwFwYDVQQDDBBh | ||
cGkudGVycmFmb3JtLmlvMB4XDTE4MDcwNTEwMzMzMFoXDTI4MDcwMjEwMzMzMFow | ||
GzEZMBcGA1UEAwwQYXBpLnRlcnJhZm9ybS5pbzCCASIwDQYJKoZIhvcNAQEBBQAD | ||
ggEPADCCAQoCggEBAKQW332Ol28CsidAheD1aL9Ul8JWnKLdaVxKZ3ssl5CXjPDO | ||
mM7IXk0SgbQnUC8lIlPFZiDGbQ1sB6OTMun6ZZ4ipLp80dtl0roCLtCnDQOBGzCN | ||
ArCYAoXRurjkXEY7tpD0wwtU72+37h3HQ4g0VS6VItJCqJ9QADV+HO2ZWuZTez70 | ||
MhoL6OLfZP7HGYdJDKgfEVNF5XlbVzNAGkDIJFdhjNxyGGu5Nfsm1pfQhAyunkk7 | ||
JVamjUg5IojRdo63IS9wwzMOdeGSAbBcsJfYeCfVg2kupR8q0TmZ+x93RmmOlbSi | ||
66kEYxRzZ9YCQeHJmn1YfJ92BpCUiy9A6Z1iaKUCAwEAATANBgkqhkiG9w0BAQsF | ||
AAOCAQEAJ7JhlecP7J48wI2QHTMbAMkkWBv/iWq1/QIF4ugH3Zb5PorOv+NfhQ0L | ||
lWiw/SzN8Ae95vUixAGYHMSa28oumM5K1OsqKEkVIo1AoBH8nBz+VcTpRD/mHXot | ||
AHPAZt9j5LqeHX+enR6RbINAf3jn+YU3MdVe0MsADdFASVDfjmQP2R7o9aJb/QqO | ||
g3bZBWsiBDEISfyaH2+pgUM7wtwEoFWmEMlgjLK1MRBs1cDZXqnHaCd/rs+NmWV9 | ||
naEu7x5fyQOk4HozkpweR+Jx1sBlTRsa49/qSHt/6ULKfO01/cTs4iF71ykXPbh3 | ||
Kj9cI2uo9aYtXkxkhKrGyUpA7FJqWw== | ||
-----END CERTIFICATE----- |
154 changes: 154 additions & 0 deletions
154
azurerm/internal/services/authorization/azuresdkhacks/definitions.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
package azuresdkhacks | ||
|
||
import ( | ||
"context" | ||
"net/http" | ||
|
||
"github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2020-04-01-preview/authorization" | ||
"github.com/Azure/go-autorest/autorest" | ||
"github.com/Azure/go-autorest/autorest/azure" | ||
) | ||
|
||
type RoleDefinitionsWorkaroundClient struct { | ||
sdkClient *authorization.RoleDefinitionsClient | ||
} | ||
|
||
func NewRoleDefinitionsWorkaroundClient(client *authorization.RoleDefinitionsClient) RoleDefinitionsWorkaroundClient { | ||
return RoleDefinitionsWorkaroundClient{ | ||
sdkClient: client, | ||
} | ||
} | ||
|
||
// CreateOrUpdate creates or updates a role definition. | ||
// Parameters: | ||
// scope - the scope of the role definition. | ||
// roleDefinitionID - the ID of the role definition. | ||
// roleDefinition - the values for the role definition. | ||
func (client RoleDefinitionsWorkaroundClient) CreateOrUpdate(ctx context.Context, scope string, roleDefinitionID string, roleDefinition authorization.RoleDefinition) (result RoleDefinitionUpdateResponse, err error) { | ||
req, err := client.sdkClient.CreateOrUpdatePreparer(ctx, scope, roleDefinitionID, roleDefinition) | ||
if err != nil { | ||
err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "CreateOrUpdate", nil, "Failure preparing request") | ||
return | ||
} | ||
|
||
resp, err := client.sdkClient.CreateOrUpdateSender(req) | ||
if err != nil { | ||
result.Response = autorest.Response{Response: resp} | ||
err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "CreateOrUpdate", resp, "Failure sending request") | ||
return | ||
} | ||
|
||
result, err = client.CreateOrUpdateResponder(resp) | ||
if err != nil { | ||
err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "CreateOrUpdate", resp, "Failure responding to request") | ||
} | ||
|
||
return | ||
} | ||
|
||
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always | ||
// closes the http.Response Body. | ||
func (client RoleDefinitionsWorkaroundClient) CreateOrUpdateResponder(resp *http.Response) (result RoleDefinitionUpdateResponse, err error) { | ||
err = autorest.Respond( | ||
resp, | ||
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), | ||
autorest.ByUnmarshallingJSON(&result), | ||
autorest.ByClosing()) | ||
result.Response = autorest.Response{Response: resp} | ||
return | ||
} | ||
|
||
// Get get role definition by name (GUID). | ||
// Parameters: | ||
// scope - the scope of the role definition. | ||
// roleDefinitionID - the ID of the role definition. | ||
func (client RoleDefinitionsWorkaroundClient) Get(ctx context.Context, scope string, roleDefinitionID string) (result RoleDefinitionGetResponse, err error) { | ||
req, err := client.sdkClient.GetPreparer(ctx, scope, roleDefinitionID) | ||
if err != nil { | ||
err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "Get", nil, "Failure preparing request") | ||
return | ||
} | ||
|
||
resp, err := client.sdkClient.GetSender(req) | ||
if err != nil { | ||
result.Response = autorest.Response{Response: resp} | ||
err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "Get", resp, "Failure sending request") | ||
return | ||
} | ||
|
||
result, err = client.GetResponder(resp) | ||
if err != nil { | ||
err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "Get", resp, "Failure responding to request") | ||
} | ||
|
||
return | ||
} | ||
|
||
// GetResponder handles the response to the Get request. The method always | ||
// closes the http.Response Body. | ||
func (client RoleDefinitionsWorkaroundClient) GetResponder(resp *http.Response) (result RoleDefinitionGetResponse, err error) { | ||
err = autorest.Respond( | ||
resp, | ||
azure.WithErrorUnlessStatusCode(http.StatusOK), | ||
autorest.ByUnmarshallingJSON(&result), | ||
autorest.ByClosing()) | ||
result.Response = autorest.Response{Response: resp} | ||
return | ||
} | ||
|
||
// RoleDefinition role definition. | ||
type RoleDefinitionGetResponse struct { | ||
autorest.Response `json:"-"` | ||
// ID - READ-ONLY; The role definition ID. | ||
ID *string `json:"id,omitempty"` | ||
// Name - READ-ONLY; The role definition name. | ||
Name *string `json:"name,omitempty"` | ||
// Type - READ-ONLY; The role definition type. | ||
Type *string `json:"type,omitempty"` | ||
// RoleDefinitionProperties - Role definition properties. | ||
*RoleDefinitionProperties `json:"properties,omitempty"` | ||
} | ||
|
||
type RoleDefinitionUpdateResponse struct { | ||
autorest.Response `json:"-"` | ||
// ID - READ-ONLY; The role definition ID. | ||
ID *string `json:"id,omitempty"` | ||
// Name - READ-ONLY; The role definition name. | ||
Name *string `json:"name,omitempty"` | ||
// Type - READ-ONLY; The role definition type. | ||
Type *string `json:"type,omitempty"` | ||
// RoleDefinitionProperties - Role definition properties. | ||
*RoleDefinitionProperties `json:"properties,omitempty"` | ||
} | ||
|
||
// RoleDefinitionProperties role definition properties. | ||
type RoleDefinitionProperties struct { | ||
// RoleName - The role name. | ||
RoleName *string `json:"roleName,omitempty"` | ||
// Description - The role definition description. | ||
Description *string `json:"description,omitempty"` | ||
// RoleType - The role type. | ||
RoleType *string `json:"type,omitempty"` | ||
// Permissions - Role definition permissions. | ||
Permissions *[]Permission `json:"permissions,omitempty"` | ||
// AssignableScopes - Role definition assignable scopes. | ||
AssignableScopes *[]string `json:"assignableScopes,omitempty"` | ||
|
||
// not exposed in the sdk | ||
CreatedOn *string `json:"createdOn,omitempty"` | ||
UpdatedOn *string `json:"updatedOn,omitempty"` | ||
CreatedBy *string `json:"createdBy,omitempty"` | ||
UpdatedBy *string `json:"updatedBy,omitempty"` | ||
} | ||
|
||
// Permission role definition permissions. | ||
type Permission struct { | ||
// Actions - Allowed actions. | ||
Actions *[]string `json:"actions,omitempty"` | ||
// NotActions - Denied actions. | ||
NotActions *[]string `json:"notActions,omitempty"` | ||
// DataActions - Allowed Data actions. | ||
DataActions *[]string `json:"dataActions,omitempty"` | ||
// NotDataActions - Denied Data actions. | ||
NotDataActions *[]string `json:"notDataActions,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.