From d9d735615e2bf8c9c88d609285ebdfbe804d71d5 Mon Sep 17 00:00:00 2001 From: Martin Guibert Date: Wed, 30 Jun 2021 20:42:02 +0200 Subject: [PATCH] split github_team_supplier --- pkg/remote/github/github_team_enumerator.go | 50 + pkg/remote/github/github_team_supplier.go | 59 - .../github/github_team_supplier_test.go | 86 - pkg/remote/github/init.go | 4 +- .../github_teams_empty/schema.golden.json | 2686 ----------------- .../github_teams_multiple/schema.golden.json | 2686 ----------------- pkg/remote/github_team_scanner_test.go | 102 + .../github_teams_empty/results.golden.json | 0 .../github_team-4556811.res.golden.json | 0 .../github_team-4556812.res.golden.json | 0 .../github_team-4556814.res.golden.json | 0 .../github_teams_multiple/results.golden.json | 0 test/terraform/provider.go | 13 + 13 files changed, 168 insertions(+), 5518 deletions(-) create mode 100644 pkg/remote/github/github_team_enumerator.go delete mode 100644 pkg/remote/github/github_team_supplier.go delete mode 100644 pkg/remote/github/github_team_supplier_test.go delete mode 100755 pkg/remote/github/test/github_teams_empty/schema.golden.json delete mode 100755 pkg/remote/github/test/github_teams_multiple/schema.golden.json create mode 100644 pkg/remote/github_team_scanner_test.go rename pkg/remote/{github => }/test/github_teams_empty/results.golden.json (100%) rename pkg/remote/{github => }/test/github_teams_multiple/github_team-4556811.res.golden.json (100%) rename pkg/remote/{github => }/test/github_teams_multiple/github_team-4556812.res.golden.json (100%) rename pkg/remote/{github => }/test/github_teams_multiple/github_team-4556814.res.golden.json (100%) rename pkg/remote/{github => }/test/github_teams_multiple/results.golden.json (100%) diff --git a/pkg/remote/github/github_team_enumerator.go b/pkg/remote/github/github_team_enumerator.go new file mode 100644 index 00000000..a258748d --- /dev/null +++ b/pkg/remote/github/github_team_enumerator.go @@ -0,0 +1,50 @@ +package github + +import ( + "fmt" + + remoteerror "github.com/cloudskiff/driftctl/pkg/remote/error" + tf "github.com/cloudskiff/driftctl/pkg/remote/terraform" + "github.com/cloudskiff/driftctl/pkg/resource" + "github.com/cloudskiff/driftctl/pkg/resource/github" +) + +type GithubTeamEnumerator struct { + repository GithubRepository + factory resource.ResourceFactory + providerConfig tf.TerraformProviderConfig +} + +func NewGithubTeamEnumerator(repo GithubRepository, factory resource.ResourceFactory, providerConfig tf.TerraformProviderConfig) *GithubTeamEnumerator { + return &GithubTeamEnumerator{ + repository: repo, + factory: factory, + providerConfig: providerConfig, + } +} + +func (g *GithubTeamEnumerator) SupportedType() resource.ResourceType { + return github.GithubTeamResourceType +} + +func (g *GithubTeamEnumerator) Enumerate() ([]resource.Resource, error) { + resourceList, err := g.repository.ListTeams() + if err != nil { + return nil, remoteerror.NewResourceEnumerationError(err, string(g.SupportedType())) + } + + results := make([]resource.Resource, len(resourceList)) + + for _, team := range resourceList { + results = append( + results, + g.factory.CreateAbstractResource( + string(g.SupportedType()), + fmt.Sprintf("%d", team.DatabaseId), + map[string]interface{}{}, + ), + ) + } + + return results, err +} diff --git a/pkg/remote/github/github_team_supplier.go b/pkg/remote/github/github_team_supplier.go deleted file mode 100644 index dd753bc5..00000000 --- a/pkg/remote/github/github_team_supplier.go +++ /dev/null @@ -1,59 +0,0 @@ -package github - -import ( - "fmt" - - remoteerror "github.com/cloudskiff/driftctl/pkg/remote/error" - "github.com/cloudskiff/driftctl/pkg/resource" - resourcegithub "github.com/cloudskiff/driftctl/pkg/resource/github" - "github.com/cloudskiff/driftctl/pkg/terraform" - "github.com/sirupsen/logrus" - "github.com/zclconf/go-cty/cty" -) - -type GithubTeamSupplier struct { - reader terraform.ResourceReader - deserializer *resource.Deserializer - repository GithubRepository - runner *terraform.ParallelResourceReader -} - -func NewGithubTeamSupplier(provider *GithubTerraformProvider, repository GithubRepository, deserializer *resource.Deserializer) *GithubTeamSupplier { - return &GithubTeamSupplier{ - provider, - deserializer, - repository, - terraform.NewParallelResourceReader(provider.Runner().SubRunner()), - } -} - -func (s GithubTeamSupplier) Resources() ([]resource.Resource, error) { - - resourceList, err := s.repository.ListTeams() - - if err != nil { - return nil, remoteerror.NewResourceEnumerationError(err, resourcegithub.GithubTeamResourceType) - } - - for _, team := range resourceList { - team := team - s.runner.Run(func() (cty.Value, error) { - completeResource, err := s.reader.ReadResource(terraform.ReadResourceArgs{ - Ty: resourcegithub.GithubTeamResourceType, - ID: fmt.Sprintf("%d", team.DatabaseId), - }) - if err != nil { - logrus.Warnf("Error reading %d[%s]: %+v", team.DatabaseId, resourcegithub.GithubTeamResourceType, err) - return cty.NilVal, err - } - return *completeResource, nil - }) - } - - results, err := s.runner.Wait() - if err != nil { - return nil, err - } - - return s.deserializer.Deserialize(resourcegithub.GithubTeamResourceType, results) -} diff --git a/pkg/remote/github/github_team_supplier_test.go b/pkg/remote/github/github_team_supplier_test.go deleted file mode 100644 index 2b0630a3..00000000 --- a/pkg/remote/github/github_team_supplier_test.go +++ /dev/null @@ -1,86 +0,0 @@ -package github - -import ( - "context" - "testing" - - "github.com/cloudskiff/driftctl/pkg/parallel" - "github.com/cloudskiff/driftctl/pkg/resource" - resourcegithub "github.com/cloudskiff/driftctl/pkg/resource/github" - "github.com/cloudskiff/driftctl/pkg/terraform" - "github.com/cloudskiff/driftctl/test" - "github.com/cloudskiff/driftctl/test/goldenfile" - dritftctlmocks "github.com/cloudskiff/driftctl/test/mocks" - testresource "github.com/cloudskiff/driftctl/test/resource" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" -) - -func TestGithubTeamSupplier_Resources(t *testing.T) { - cases := []struct { - test string - dirName string - mocks func(client *MockGithubRepository) - err error - }{ - { - test: "no github teams", - dirName: "github_teams_empty", - mocks: func(client *MockGithubRepository) { - client.On("ListTeams").Return([]Team{}, nil) - }, - err: nil, - }, - { - test: "Multiple github teams with parent", - dirName: "github_teams_multiple", - mocks: func(client *MockGithubRepository) { - client.On("ListTeams").Return([]Team{ - {DatabaseId: 4556811}, // github_team.team1 - {DatabaseId: 4556812}, // github_team.team2 - {DatabaseId: 4556814}, // github_team.with_parent - }, nil) - }, - err: nil, - }, - } - for _, c := range cases { - shouldUpdate := c.dirName == *goldenfile.Update - - providerLibrary := terraform.NewProviderLibrary() - supplierLibrary := resource.NewSupplierLibrary() - - repo := testresource.InitFakeSchemaRepository(terraform.GITHUB, "4.4.0") - resourcegithub.InitResourcesMetadata(repo) - factory := terraform.NewTerraformResourceFactory(repo) - - deserializer := resource.NewDeserializer(factory) - - mockedRepo := MockGithubRepository{} - c.mocks(&mockedRepo) - - if shouldUpdate { - provider, err := InitTestGithubProvider(providerLibrary) - if err != nil { - t.Fatal(err) - } - - supplierLibrary.AddSupplier(NewGithubTeamSupplier(provider, &mockedRepo, deserializer)) - } - - t.Run(c.test, func(tt *testing.T) { - provider := dritftctlmocks.NewMockedGoldenTFProvider(c.dirName, providerLibrary.Provider(terraform.GITHUB), shouldUpdate) - s := &GithubTeamSupplier{ - provider, - deserializer, - &mockedRepo, - terraform.NewParallelResourceReader(parallel.NewParallelRunner(context.TODO(), 10)), - } - got, err := s.Resources() - assert.Equal(tt, c.err, err) - - mock.AssertExpectationsForObjects(tt) - test.CtyTestDiff(got, c.dirName, provider, deserializer, shouldUpdate, tt) - }) - } -} diff --git a/pkg/remote/github/init.go b/pkg/remote/github/init.go index cde306e2..2bb583fc 100644 --- a/pkg/remote/github/init.go +++ b/pkg/remote/github/init.go @@ -44,8 +44,10 @@ func Init(version string, alerter *alerter.Alerter, deserializer := resource.NewDeserializer(factory) providerLibrary.AddProvider(terraform.GITHUB, provider) + remoteLibrary.AddEnumerator(NewGithubTeamEnumerator(repository, factory, provider.Config)) + remoteLibrary.AddDetailsFetcher(github.GithubTeamResourceType, common.NewGenericDetailFetcher(github.GithubTeamResourceType, provider, deserializer)) + supplierLibrary.AddSupplier(NewGithubRepositorySupplier(provider, repository, deserializer)) - supplierLibrary.AddSupplier(NewGithubTeamSupplier(provider, repository, deserializer)) supplierLibrary.AddSupplier(NewGithubMembershipSupplier(provider, repository, deserializer)) supplierLibrary.AddSupplier(NewGithubTeamMembershipSupplier(provider, repository, deserializer)) supplierLibrary.AddSupplier(NewGithubBranchProtectionSupplier(provider, repository, deserializer)) diff --git a/pkg/remote/github/test/github_teams_empty/schema.golden.json b/pkg/remote/github/test/github_teams_empty/schema.golden.json deleted file mode 100755 index e1968e7f..00000000 --- a/pkg/remote/github/test/github_teams_empty/schema.golden.json +++ /dev/null @@ -1,2686 +0,0 @@ -{ - "github_actions_organization_secret": { - "Version": 0, - "Block": { - "Attributes": { - "created_at": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "plaintext_value": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": true, - "Deprecated": false - }, - "secret_name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "selected_repository_ids": { - "Type": [ - "set", - "number" - ], - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "updated_at": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "visibility": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_actions_secret": { - "Version": 0, - "Block": { - "Attributes": { - "created_at": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "plaintext_value": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": true, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "secret_name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "updated_at": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_branch": { - "Version": 0, - "Block": { - "Attributes": { - "branch": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "ref": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "sha": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "source_branch": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "source_sha": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_branch_default": { - "Version": 0, - "Block": { - "Attributes": { - "branch": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_branch_protection": { - "Version": 1, - "Block": { - "Attributes": { - "allows_deletions": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "allows_force_pushes": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "enforce_admins": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "pattern": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "push_restrictions": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "repository_id": { - "Type": "string", - "Description": "Node ID or name of repository", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "require_signed_commits": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": { - "required_pull_request_reviews": { - "Attributes": { - "dismiss_stale_reviews": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "dismissal_restrictions": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "require_code_owner_reviews": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "required_approving_review_count": { - "Type": "number", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false, - "Nesting": 3, - "MinItems": 0, - "MaxItems": 0 - }, - "required_status_checks": { - "Attributes": { - "contexts": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "strict": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false, - "Nesting": 3, - "MinItems": 0, - "MaxItems": 0 - } - }, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_branch_protection_v3": { - "Version": 0, - "Block": { - "Attributes": { - "branch": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "enforce_admins": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "require_signed_commits": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": { - "required_pull_request_reviews": { - "Attributes": { - "dismiss_stale_reviews": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "dismissal_teams": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "dismissal_users": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "include_admins": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "require_code_owner_reviews": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "required_approving_review_count": { - "Type": "number", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false, - "Nesting": 3, - "MinItems": 0, - "MaxItems": 1 - }, - "required_status_checks": { - "Attributes": { - "contexts": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "include_admins": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "strict": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false, - "Nesting": 3, - "MinItems": 0, - "MaxItems": 1 - }, - "restrictions": { - "Attributes": { - "apps": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "teams": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "users": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false, - "Nesting": 3, - "MinItems": 0, - "MaxItems": 1 - } - }, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_issue_label": { - "Version": 0, - "Block": { - "Attributes": { - "color": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "description": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_membership": { - "Version": 0, - "Block": { - "Attributes": { - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "role": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "username": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_organization_block": { - "Version": 0, - "Block": { - "Attributes": { - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "username": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_organization_project": { - "Version": 0, - "Block": { - "Attributes": { - "body": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_organization_webhook": { - "Version": 1, - "Block": { - "Attributes": { - "active": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "events": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": { - "configuration": { - "Attributes": { - "content_type": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "insecure_ssl": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "secret": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": true, - "Deprecated": false - }, - "url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": true, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false, - "Nesting": 3, - "MinItems": 0, - "MaxItems": 1 - } - }, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_project_card": { - "Version": 0, - "Block": { - "Attributes": { - "card_id": { - "Type": "number", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "column_id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "note": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_project_column": { - "Version": 0, - "Block": { - "Attributes": { - "column_id": { - "Type": "number", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "project_id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_repository": { - "Version": 0, - "Block": { - "Attributes": { - "allow_merge_commit": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "allow_rebase_merge": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "allow_squash_merge": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "archive_on_destroy": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "archived": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "auto_init": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "default_branch": { - "Type": "string", - "Description": "Can only be set after initial repository creation, and only if the target branch exists", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "delete_branch_on_merge": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "description": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "full_name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "git_clone_url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "gitignore_template": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "has_downloads": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "has_issues": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "has_projects": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "has_wiki": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "homepage_url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "html_url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "http_clone_url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "is_template": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "license_template": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "node_id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "private": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "repo_id": { - "Type": "number", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "ssh_clone_url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "svn_url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "topics": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "visibility": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "vulnerability_alerts": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": { - "pages": { - "Attributes": { - "cname": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "custom_404": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "html_url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "status": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": { - "source": { - "Attributes": { - "branch": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "path": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false, - "Nesting": 3, - "MinItems": 1, - "MaxItems": 1 - } - }, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false, - "Nesting": 3, - "MinItems": 0, - "MaxItems": 1 - }, - "template": { - "Attributes": { - "owner": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false, - "Nesting": 3, - "MinItems": 0, - "MaxItems": 1 - } - }, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_repository_collaborator": { - "Version": 0, - "Block": { - "Attributes": { - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "invitation_id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "permission": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "permission_diff_suppression": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "username": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_repository_deploy_key": { - "Version": 0, - "Block": { - "Attributes": { - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "key": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "read_only": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "title": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_repository_file": { - "Version": 0, - "Block": { - "Attributes": { - "branch": { - "Type": "string", - "Description": "The branch name, defaults to \"main\"", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "commit_author": { - "Type": "string", - "Description": "The commit author name, defaults to the authenticated user's name", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "commit_email": { - "Type": "string", - "Description": "The commit author email address, defaults to the authenticated user's email address", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "commit_message": { - "Type": "string", - "Description": "The commit message when creating or updating the file", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "commit_sha": { - "Type": "string", - "Description": "The SHA of the commit that modified the file", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "content": { - "Type": "string", - "Description": "The file's content", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "file": { - "Type": "string", - "Description": "The file path to manage", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "overwrite_on_create": { - "Type": "bool", - "Description": "Enable overwriting existing files, defaults to \"false\"", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "The repository name", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "sha": { - "Type": "string", - "Description": "The blob SHA of the file", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_repository_milestone": { - "Version": 0, - "Block": { - "Attributes": { - "description": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "due_date": { - "Type": "string", - "Description": "in yyyy-mm-dd format", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "number": { - "Type": "number", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "owner": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "state": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "title": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_repository_project": { - "Version": 0, - "Block": { - "Attributes": { - "body": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_repository_webhook": { - "Version": 1, - "Block": { - "Attributes": { - "active": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "events": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": { - "configuration": { - "Attributes": { - "content_type": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "insecure_ssl": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "secret": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": true, - "Deprecated": false - }, - "url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": true, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false, - "Nesting": 3, - "MinItems": 0, - "MaxItems": 1 - } - }, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_team": { - "Version": 0, - "Block": { - "Attributes": { - "create_default_maintainer": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "description": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "ldap_dn": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "members_count": { - "Type": "number", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "node_id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "parent_team_id": { - "Type": "number", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "privacy": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "slug": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_team_membership": { - "Version": 0, - "Block": { - "Attributes": { - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "role": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "team_id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "username": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_team_repository": { - "Version": 0, - "Block": { - "Attributes": { - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "permission": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "team_id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_team_sync_group_mapping": { - "Version": 0, - "Block": { - "Attributes": { - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "team_slug": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": { - "group": { - "Attributes": { - "group_description": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "group_id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "group_name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false, - "Nesting": 4, - "MinItems": 0, - "MaxItems": 0 - } - }, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_user_gpg_key": { - "Version": 0, - "Block": { - "Attributes": { - "armored_public_key": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "key_id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_user_invitation_accepter": { - "Version": 0, - "Block": { - "Attributes": { - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "invitation_id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_user_ssh_key": { - "Version": 0, - "Block": { - "Attributes": { - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "key": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "title": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - } -} \ No newline at end of file diff --git a/pkg/remote/github/test/github_teams_multiple/schema.golden.json b/pkg/remote/github/test/github_teams_multiple/schema.golden.json deleted file mode 100755 index e1968e7f..00000000 --- a/pkg/remote/github/test/github_teams_multiple/schema.golden.json +++ /dev/null @@ -1,2686 +0,0 @@ -{ - "github_actions_organization_secret": { - "Version": 0, - "Block": { - "Attributes": { - "created_at": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "plaintext_value": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": true, - "Deprecated": false - }, - "secret_name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "selected_repository_ids": { - "Type": [ - "set", - "number" - ], - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "updated_at": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "visibility": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_actions_secret": { - "Version": 0, - "Block": { - "Attributes": { - "created_at": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "plaintext_value": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": true, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "secret_name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "updated_at": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_branch": { - "Version": 0, - "Block": { - "Attributes": { - "branch": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "ref": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "sha": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "source_branch": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "source_sha": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_branch_default": { - "Version": 0, - "Block": { - "Attributes": { - "branch": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_branch_protection": { - "Version": 1, - "Block": { - "Attributes": { - "allows_deletions": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "allows_force_pushes": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "enforce_admins": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "pattern": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "push_restrictions": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "repository_id": { - "Type": "string", - "Description": "Node ID or name of repository", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "require_signed_commits": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": { - "required_pull_request_reviews": { - "Attributes": { - "dismiss_stale_reviews": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "dismissal_restrictions": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "require_code_owner_reviews": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "required_approving_review_count": { - "Type": "number", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false, - "Nesting": 3, - "MinItems": 0, - "MaxItems": 0 - }, - "required_status_checks": { - "Attributes": { - "contexts": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "strict": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false, - "Nesting": 3, - "MinItems": 0, - "MaxItems": 0 - } - }, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_branch_protection_v3": { - "Version": 0, - "Block": { - "Attributes": { - "branch": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "enforce_admins": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "require_signed_commits": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": { - "required_pull_request_reviews": { - "Attributes": { - "dismiss_stale_reviews": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "dismissal_teams": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "dismissal_users": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "include_admins": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "require_code_owner_reviews": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "required_approving_review_count": { - "Type": "number", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false, - "Nesting": 3, - "MinItems": 0, - "MaxItems": 1 - }, - "required_status_checks": { - "Attributes": { - "contexts": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "include_admins": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "strict": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false, - "Nesting": 3, - "MinItems": 0, - "MaxItems": 1 - }, - "restrictions": { - "Attributes": { - "apps": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "teams": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "users": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false, - "Nesting": 3, - "MinItems": 0, - "MaxItems": 1 - } - }, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_issue_label": { - "Version": 0, - "Block": { - "Attributes": { - "color": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "description": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_membership": { - "Version": 0, - "Block": { - "Attributes": { - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "role": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "username": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_organization_block": { - "Version": 0, - "Block": { - "Attributes": { - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "username": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_organization_project": { - "Version": 0, - "Block": { - "Attributes": { - "body": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_organization_webhook": { - "Version": 1, - "Block": { - "Attributes": { - "active": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "events": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": { - "configuration": { - "Attributes": { - "content_type": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "insecure_ssl": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "secret": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": true, - "Deprecated": false - }, - "url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": true, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false, - "Nesting": 3, - "MinItems": 0, - "MaxItems": 1 - } - }, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_project_card": { - "Version": 0, - "Block": { - "Attributes": { - "card_id": { - "Type": "number", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "column_id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "note": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_project_column": { - "Version": 0, - "Block": { - "Attributes": { - "column_id": { - "Type": "number", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "project_id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_repository": { - "Version": 0, - "Block": { - "Attributes": { - "allow_merge_commit": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "allow_rebase_merge": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "allow_squash_merge": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "archive_on_destroy": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "archived": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "auto_init": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "default_branch": { - "Type": "string", - "Description": "Can only be set after initial repository creation, and only if the target branch exists", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "delete_branch_on_merge": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "description": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "full_name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "git_clone_url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "gitignore_template": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "has_downloads": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "has_issues": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "has_projects": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "has_wiki": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "homepage_url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "html_url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "http_clone_url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "is_template": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "license_template": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "node_id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "private": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "repo_id": { - "Type": "number", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "ssh_clone_url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "svn_url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "topics": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "visibility": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "vulnerability_alerts": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": { - "pages": { - "Attributes": { - "cname": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "custom_404": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "html_url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "status": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": { - "source": { - "Attributes": { - "branch": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "path": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false, - "Nesting": 3, - "MinItems": 1, - "MaxItems": 1 - } - }, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false, - "Nesting": 3, - "MinItems": 0, - "MaxItems": 1 - }, - "template": { - "Attributes": { - "owner": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false, - "Nesting": 3, - "MinItems": 0, - "MaxItems": 1 - } - }, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_repository_collaborator": { - "Version": 0, - "Block": { - "Attributes": { - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "invitation_id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "permission": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "permission_diff_suppression": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "username": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_repository_deploy_key": { - "Version": 0, - "Block": { - "Attributes": { - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "key": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "read_only": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "title": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_repository_file": { - "Version": 0, - "Block": { - "Attributes": { - "branch": { - "Type": "string", - "Description": "The branch name, defaults to \"main\"", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "commit_author": { - "Type": "string", - "Description": "The commit author name, defaults to the authenticated user's name", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "commit_email": { - "Type": "string", - "Description": "The commit author email address, defaults to the authenticated user's email address", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "commit_message": { - "Type": "string", - "Description": "The commit message when creating or updating the file", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "commit_sha": { - "Type": "string", - "Description": "The SHA of the commit that modified the file", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "content": { - "Type": "string", - "Description": "The file's content", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "file": { - "Type": "string", - "Description": "The file path to manage", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "overwrite_on_create": { - "Type": "bool", - "Description": "Enable overwriting existing files, defaults to \"false\"", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "The repository name", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "sha": { - "Type": "string", - "Description": "The blob SHA of the file", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_repository_milestone": { - "Version": 0, - "Block": { - "Attributes": { - "description": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "due_date": { - "Type": "string", - "Description": "in yyyy-mm-dd format", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "number": { - "Type": "number", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "owner": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "state": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "title": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_repository_project": { - "Version": 0, - "Block": { - "Attributes": { - "body": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_repository_webhook": { - "Version": 1, - "Block": { - "Attributes": { - "active": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "events": { - "Type": [ - "set", - "string" - ], - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": { - "configuration": { - "Attributes": { - "content_type": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "insecure_ssl": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "secret": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": true, - "Deprecated": false - }, - "url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": true, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false, - "Nesting": 3, - "MinItems": 0, - "MaxItems": 1 - } - }, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_team": { - "Version": 0, - "Block": { - "Attributes": { - "create_default_maintainer": { - "Type": "bool", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "description": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "ldap_dn": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "members_count": { - "Type": "number", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "node_id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "parent_team_id": { - "Type": "number", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "privacy": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "slug": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_team_membership": { - "Version": 0, - "Block": { - "Attributes": { - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "role": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "team_id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "username": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_team_repository": { - "Version": 0, - "Block": { - "Attributes": { - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "permission": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "repository": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "team_id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_team_sync_group_mapping": { - "Version": 0, - "Block": { - "Attributes": { - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "team_slug": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": { - "group": { - "Attributes": { - "group_description": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "group_id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "group_name": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false, - "Nesting": 4, - "MinItems": 0, - "MaxItems": 0 - } - }, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_user_gpg_key": { - "Version": 0, - "Block": { - "Attributes": { - "armored_public_key": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "key_id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_user_invitation_accepter": { - "Version": 0, - "Block": { - "Attributes": { - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "invitation_id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - }, - "github_user_ssh_key": { - "Version": 0, - "Block": { - "Attributes": { - "etag": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "id": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": true, - "Computed": true, - "Sensitive": false, - "Deprecated": false - }, - "key": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "title": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": true, - "Optional": false, - "Computed": false, - "Sensitive": false, - "Deprecated": false - }, - "url": { - "Type": "string", - "Description": "", - "DescriptionKind": 0, - "Required": false, - "Optional": false, - "Computed": true, - "Sensitive": false, - "Deprecated": false - } - }, - "BlockTypes": {}, - "Description": "", - "DescriptionKind": 0, - "Deprecated": false - } - } -} \ No newline at end of file diff --git a/pkg/remote/github_team_scanner_test.go b/pkg/remote/github_team_scanner_test.go new file mode 100644 index 00000000..d9a5c6ca --- /dev/null +++ b/pkg/remote/github_team_scanner_test.go @@ -0,0 +1,102 @@ +package remote + +import ( + "testing" + + "github.com/cloudskiff/driftctl/mocks" + "github.com/cloudskiff/driftctl/pkg/remote/cache" + "github.com/cloudskiff/driftctl/pkg/remote/common" + "github.com/cloudskiff/driftctl/pkg/remote/github" + tf "github.com/cloudskiff/driftctl/pkg/remote/terraform" + githubres "github.com/cloudskiff/driftctl/pkg/resource/github" + "github.com/cloudskiff/driftctl/pkg/terraform" + testresource "github.com/cloudskiff/driftctl/test/resource" + tftest "github.com/cloudskiff/driftctl/test/terraform" + + "github.com/cloudskiff/driftctl/pkg/resource" + "github.com/cloudskiff/driftctl/test" + "github.com/cloudskiff/driftctl/test/goldenfile" + "github.com/stretchr/testify/assert" +) + +func TestScanGithubTeam(t *testing.T) { + + tests := []struct { + test string + dirName string + mocks func(repository *github.MockGithubRepository) + err error + }{ + { + test: "no github teams", + dirName: "github_teams_empty", + mocks: func(client *github.MockGithubRepository) { + client.On("ListTeams").Return([]github.Team{}, nil) + }, + err: nil, + }, + { + test: "Multiple github teams with parent", + dirName: "github_teams_multiple", + mocks: func(client *github.MockGithubRepository) { + client.On("ListTeams").Return([]github.Team{ + {DatabaseId: 4556811}, // github_team.team1 + {DatabaseId: 4556812}, // github_team.team2 + {DatabaseId: 4556814}, // github_team.with_parent + }, nil) + }, + err: nil, + }, + } + + schemaRepository := testresource.InitFakeSchemaRepository("github", "4.4.0") + githubres.InitResourcesMetadata(schemaRepository) + factory := terraform.NewTerraformResourceFactory(schemaRepository) + deserializer := resource.NewDeserializer(factory) + alerter := &mocks.AlerterInterface{} + + for _, c := range tests { + t.Run(c.test, func(tt *testing.T) { + shouldUpdate := c.dirName == *goldenfile.Update + + scanOptions := ScannerOptions{Deep: true} + + providerLibrary := terraform.NewProviderLibrary() + remoteLibrary := common.NewRemoteLibrary() + + mockedRepo := github.MockGithubRepository{} + c.mocks(&mockedRepo) + var repo github.GithubRepository = &mockedRepo + + realProvider, err := tftest.InitTestGithubProvider(providerLibrary, "4.4.0") + if err != nil { + t.Fatal(err) + } + provider := tftest.NewFakeTerraformProvider(realProvider) + provider.WithResponse(c.dirName) + + if shouldUpdate { + err := realProvider.Init() + if err != nil { + t.Fatal(err) + } + provider.ShouldUpdate() + repo = github.NewGithubRepository(realProvider.GetConfig(), cache.New(0)) + } + + remoteLibrary.AddEnumerator(github.NewGithubTeamEnumerator(repo, factory, tf.TerraformProviderConfig{ + Name: "test", + DefaultAlias: "eu-west-3", + })) + remoteLibrary.AddDetailsFetcher(githubres.GithubTeamResourceType, common.NewGenericDetailFetcher(githubres.GithubTeamResourceType, provider, deserializer)) + + s := NewScanner(nil, remoteLibrary, alerter, scanOptions) + got, err := s.Resources() + assert.Equal(tt, err, c.err) + if err != nil { + return + } + test.TestAgainstGoldenFile(got, githubres.GithubTeamResourceType, c.dirName, provider, deserializer, shouldUpdate, tt) + }) + } +} diff --git a/pkg/remote/github/test/github_teams_empty/results.golden.json b/pkg/remote/test/github_teams_empty/results.golden.json similarity index 100% rename from pkg/remote/github/test/github_teams_empty/results.golden.json rename to pkg/remote/test/github_teams_empty/results.golden.json diff --git a/pkg/remote/github/test/github_teams_multiple/github_team-4556811.res.golden.json b/pkg/remote/test/github_teams_multiple/github_team-4556811.res.golden.json similarity index 100% rename from pkg/remote/github/test/github_teams_multiple/github_team-4556811.res.golden.json rename to pkg/remote/test/github_teams_multiple/github_team-4556811.res.golden.json diff --git a/pkg/remote/github/test/github_teams_multiple/github_team-4556812.res.golden.json b/pkg/remote/test/github_teams_multiple/github_team-4556812.res.golden.json similarity index 100% rename from pkg/remote/github/test/github_teams_multiple/github_team-4556812.res.golden.json rename to pkg/remote/test/github_teams_multiple/github_team-4556812.res.golden.json diff --git a/pkg/remote/github/test/github_teams_multiple/github_team-4556814.res.golden.json b/pkg/remote/test/github_teams_multiple/github_team-4556814.res.golden.json similarity index 100% rename from pkg/remote/github/test/github_teams_multiple/github_team-4556814.res.golden.json rename to pkg/remote/test/github_teams_multiple/github_team-4556814.res.golden.json diff --git a/pkg/remote/github/test/github_teams_multiple/results.golden.json b/pkg/remote/test/github_teams_multiple/results.golden.json similarity index 100% rename from pkg/remote/github/test/github_teams_multiple/results.golden.json rename to pkg/remote/test/github_teams_multiple/results.golden.json diff --git a/test/terraform/provider.go b/test/terraform/provider.go index ac1eaef3..df0dd52d 100644 --- a/test/terraform/provider.go +++ b/test/terraform/provider.go @@ -5,6 +5,7 @@ import ( "github.com/cloudskiff/driftctl/pkg/output" "github.com/cloudskiff/driftctl/pkg/remote/aws" + "github.com/cloudskiff/driftctl/pkg/remote/github" "github.com/cloudskiff/driftctl/pkg/terraform" ) @@ -18,3 +19,15 @@ func InitTestAwsProvider(providerLibrary *terraform.ProviderLibrary, version str providerLibrary.AddProvider(terraform.AWS, provider) return provider, nil } + +func InitTestGithubProvider(providerLibrary *terraform.ProviderLibrary, version string) (*github.GithubTerraformProvider, error) { + progress := &output.MockProgress{} + progress.On("Inc").Maybe().Return() + provider, err := github.NewGithubTerraformProvider(version, progress, "") + if err != nil { + return nil, err + } + providerLibrary.AddProvider(terraform.GITHUB, provider) + + return provider, nil +}