2021-02-24 12:55:26 +00:00
|
|
|
// GENERATED, DO NOT EDIT THIS FILE
|
|
|
|
package github
|
|
|
|
|
2021-05-11 12:32:33 +00:00
|
|
|
import (
|
|
|
|
"github.com/cloudskiff/driftctl/pkg/resource"
|
|
|
|
"github.com/zclconf/go-cty/cty"
|
|
|
|
)
|
2021-03-25 11:13:52 +00:00
|
|
|
|
2021-02-24 12:55:26 +00:00
|
|
|
const GithubTeamResourceType = "github_team"
|
|
|
|
|
|
|
|
type GithubTeam struct {
|
2021-03-25 11:13:52 +00:00
|
|
|
CreateDefaultMaintainer *bool `cty:"create_default_maintainer"`
|
|
|
|
Description *string `cty:"description"`
|
|
|
|
Etag *string `cty:"etag" computed:"true" diff:"-"`
|
|
|
|
Id string `cty:"id" computed:"true"`
|
|
|
|
LdapDn *string `cty:"ldap_dn"`
|
|
|
|
MembersCount *int `cty:"members_count" computed:"true"`
|
|
|
|
Name *string `cty:"name"`
|
|
|
|
NodeId *string `cty:"node_id" computed:"true"`
|
|
|
|
ParentTeamId *int `cty:"parent_team_id"`
|
|
|
|
Privacy *string `cty:"privacy"`
|
|
|
|
Slug *string `cty:"slug" computed:"true"`
|
|
|
|
CtyVal *cty.Value `diff:"-"`
|
2021-02-24 12:55:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GithubTeam) TerraformId() string {
|
|
|
|
return r.Id
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GithubTeam) TerraformType() string {
|
|
|
|
return GithubTeamResourceType
|
|
|
|
}
|
2021-03-25 11:13:52 +00:00
|
|
|
|
|
|
|
func (r *GithubTeam) CtyValue() *cty.Value {
|
|
|
|
return r.CtyVal
|
|
|
|
}
|
2021-05-11 12:32:33 +00:00
|
|
|
|
|
|
|
func initGithubTeamMetaData(resourceSchemaRepository resource.SchemaRepositoryInterface) {
|
2021-05-24 15:19:06 +00:00
|
|
|
resourceSchemaRepository.SetNormalizeFunc(GithubTeamResourceType, func(res *resource.AbstractResource) {
|
|
|
|
val := res.Attrs
|
2021-05-11 12:32:33 +00:00
|
|
|
if defaultMaintainer, exist := val.Get("create_default_maintainer"); !exist || defaultMaintainer == nil {
|
|
|
|
(*val)["create_default_maintainer"] = false
|
|
|
|
}
|
|
|
|
val.SafeDelete([]string{"etag"})
|
|
|
|
})
|
|
|
|
}
|