Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
exclude RoleDefinitionID and RoleDefinitionName from RoleAssignment l…
Browse files Browse the repository at this point in the history
…ate-initialization

Signed-off-by: Casey Keyser <[email protected]>
  • Loading branch information
ckeyser2 committed Aug 17, 2022
1 parent 9873d69 commit f710c82
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apis/authorization/v1alpha1/zz_generated_terraformed.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions config/authorization/config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
Copyright 2022 The Crossplane Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package authorization

import (
"github.com/crossplane/terrajet/pkg/config"
)

// Configure configures authorization group
func Configure(p *config.Provider) {
p.AddResourceConfigurator("azurerm_role_assignment", func(r *config.Resource) {
r.LateInitializer = config.LateInitializer{
IgnoredFields: []string{"role_definition_id", "role_definition_name"},
}
})
}
2 changes: 2 additions & 0 deletions config/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

"github.com/crossplane-contrib/provider-jet-azure/config/apimanagement"
"github.com/crossplane-contrib/provider-jet-azure/config/authorization"
"github.com/crossplane-contrib/provider-jet-azure/config/base"
"github.com/crossplane-contrib/provider-jet-azure/config/common"
"github.com/crossplane-contrib/provider-jet-azure/config/cosmosdb"
Expand Down Expand Up @@ -186,6 +187,7 @@ func GetProvider() *tjconfig.Provider {
eventhub.Configure,
mariadb.Configure,
devspace.Configure,
authorization.Configure,
} {
configure(pc)
}
Expand Down

0 comments on commit f710c82

Please sign in to comment.