From 2d8ebe0804d3bd11e34c151cd78e3a9d7f71dc1c Mon Sep 17 00:00:00 2001 From: Martin Guibert Date: Fri, 2 Jul 2021 17:50:53 +0200 Subject: [PATCH] split github membership supplier --- .../github/github_membership_enumerator.go | 45 + .../github/github_membership_supplier.go | 57 - .../github/github_membership_supplier_test.go | 85 - pkg/remote/github/init.go | 4 +- .../schema.golden.json | 2686 ----------------- .../schema.golden.json | 2686 ----------------- pkg/remote/github_membership_scanner_test.go | 97 + .../results.golden.json | 0 ...driftctl-acceptance-tester.res.golden.json | 0 ...p-driftctl-test_eliecharra.res.golden.json | 0 .../results.golden.json | 0 11 files changed, 145 insertions(+), 5515 deletions(-) create mode 100644 pkg/remote/github/github_membership_enumerator.go delete mode 100644 pkg/remote/github/github_membership_supplier.go delete mode 100644 pkg/remote/github/github_membership_supplier_test.go delete mode 100755 pkg/remote/github/test/github_membership_empty/schema.golden.json delete mode 100755 pkg/remote/github/test/github_membership_multiple/schema.golden.json create mode 100644 pkg/remote/github_membership_scanner_test.go rename pkg/remote/{github => }/test/github_membership_empty/results.golden.json (100%) rename pkg/remote/{github => }/test/github_membership_multiple/github_membership-driftctl-test_driftctl-acceptance-tester.res.golden.json (100%) rename pkg/remote/{github => }/test/github_membership_multiple/github_membership-driftctl-test_eliecharra.res.golden.json (100%) rename pkg/remote/{github => }/test/github_membership_multiple/results.golden.json (100%) diff --git a/pkg/remote/github/github_membership_enumerator.go b/pkg/remote/github/github_membership_enumerator.go new file mode 100644 index 00000000..fffd4056 --- /dev/null +++ b/pkg/remote/github/github_membership_enumerator.go @@ -0,0 +1,45 @@ +package github + +import ( + remoteerror "github.com/cloudskiff/driftctl/pkg/remote/error" + "github.com/cloudskiff/driftctl/pkg/resource" + "github.com/cloudskiff/driftctl/pkg/resource/github" +) + +type GithubMembershipEnumerator struct { + Membership GithubRepository + factory resource.ResourceFactory +} + +func NewGithubMembershipEnumerator(repo GithubRepository, factory resource.ResourceFactory) *GithubMembershipEnumerator { + return &GithubMembershipEnumerator{ + Membership: repo, + factory: factory, + } +} + +func (g *GithubMembershipEnumerator) SupportedType() resource.ResourceType { + return github.GithubMembershipResourceType +} + +func (g *GithubMembershipEnumerator) Enumerate() ([]resource.Resource, error) { + ids, err := g.Membership.ListMembership() + if err != nil { + return nil, remoteerror.NewResourceEnumerationError(err, string(g.SupportedType())) + } + + results := make([]resource.Resource, len(ids)) + + for _, id := range ids { + results = append( + results, + g.factory.CreateAbstractResource( + string(g.SupportedType()), + id, + map[string]interface{}{}, + ), + ) + } + + return results, err +} diff --git a/pkg/remote/github/github_membership_supplier.go b/pkg/remote/github/github_membership_supplier.go deleted file mode 100644 index 1b8667e7..00000000 --- a/pkg/remote/github/github_membership_supplier.go +++ /dev/null @@ -1,57 +0,0 @@ -package github - -import ( - 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 GithubMembershipSupplier struct { - reader terraform.ResourceReader - deserializer *resource.Deserializer - repository GithubRepository - runner *terraform.ParallelResourceReader -} - -func NewGithubMembershipSupplier(provider *GithubTerraformProvider, repository GithubRepository, deserializer *resource.Deserializer) *GithubMembershipSupplier { - return &GithubMembershipSupplier{ - provider, - deserializer, - repository, - terraform.NewParallelResourceReader(provider.Runner().SubRunner()), - } -} - -func (s GithubMembershipSupplier) Resources() ([]resource.Resource, error) { - - resourceList, err := s.repository.ListMembership() - - if err != nil { - return nil, remoteerror.NewResourceEnumerationError(err, resourcegithub.GithubMembershipResourceType) - } - - for _, id := range resourceList { - id := id - s.runner.Run(func() (cty.Value, error) { - completeResource, err := s.reader.ReadResource(terraform.ReadResourceArgs{ - Ty: resourcegithub.GithubMembershipResourceType, - ID: id, - }) - if err != nil { - logrus.Warnf("Error reading %s[%s]: %+v", id, resourcegithub.GithubMembershipResourceType, err) - return cty.NilVal, err - } - return *completeResource, nil - }) - } - - results, err := s.runner.Wait() - if err != nil { - return nil, err - } - - return s.deserializer.Deserialize(resourcegithub.GithubMembershipResourceType, results) -} diff --git a/pkg/remote/github/github_membership_supplier_test.go b/pkg/remote/github/github_membership_supplier_test.go deleted file mode 100644 index b002f627..00000000 --- a/pkg/remote/github/github_membership_supplier_test.go +++ /dev/null @@ -1,85 +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 TestGithubMembershipupplier_Resources(t *testing.T) { - cases := []struct { - test string - dirName string - mocks func(client *MockGithubRepository) - err error - }{ - { - test: "no members", - dirName: "github_membership_empty", - mocks: func(client *MockGithubRepository) { - client.On("ListMembership").Return([]string{}, nil) - }, - err: nil, - }, - { - test: "Multiple membership with admin and member roles", - dirName: "github_membership_multiple", - mocks: func(client *MockGithubRepository) { - client.On("ListMembership").Return([]string{ - "driftctl-test:driftctl-acceptance-tester", - "driftctl-test:eliecharra", - }, 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(NewGithubMembershipSupplier(provider, &mockedRepo, deserializer)) - } - - t.Run(c.test, func(tt *testing.T) { - provider := dritftctlmocks.NewMockedGoldenTFProvider(c.dirName, providerLibrary.Provider(terraform.GITHUB), shouldUpdate) - s := &GithubMembershipSupplier{ - 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 a15995c4..3a8618af 100644 --- a/pkg/remote/github/init.go +++ b/pkg/remote/github/init.go @@ -50,7 +50,9 @@ func Init(version string, alerter *alerter.Alerter, remoteLibrary.AddEnumerator(NewGithubRepositoryEnumerator(repository, factory, provider.Config)) remoteLibrary.AddDetailsFetcher(github.GithubRepositoryResourceType, common.NewGenericDetailsFetcher(github.GithubRepositoryResourceType, provider, deserializer)) - supplierLibrary.AddSupplier(NewGithubMembershipSupplier(provider, repository, deserializer)) + remoteLibrary.AddEnumerator(NewGithubMembershipEnumerator(repository, factory)) + remoteLibrary.AddDetailsFetcher(github.GithubMembershipResourceType, common.NewGenericDetailsFetcher(github.GithubMembershipResourceType, provider, deserializer)) + supplierLibrary.AddSupplier(NewGithubTeamMembershipSupplier(provider, repository, deserializer)) supplierLibrary.AddSupplier(NewGithubBranchProtectionSupplier(provider, repository, deserializer)) diff --git a/pkg/remote/github/test/github_membership_empty/schema.golden.json b/pkg/remote/github/test/github_membership_empty/schema.golden.json deleted file mode 100755 index e1968e7f..00000000 --- a/pkg/remote/github/test/github_membership_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_membership_multiple/schema.golden.json b/pkg/remote/github/test/github_membership_multiple/schema.golden.json deleted file mode 100755 index e1968e7f..00000000 --- a/pkg/remote/github/test/github_membership_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_membership_scanner_test.go b/pkg/remote/github_membership_scanner_test.go new file mode 100644 index 00000000..257d102c --- /dev/null +++ b/pkg/remote/github_membership_scanner_test.go @@ -0,0 +1,97 @@ +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" + 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 TestScanGithubMembership(t *testing.T) { + + cases := []struct { + test string + dirName string + mocks func(client *github.MockGithubRepository) + err error + }{ + { + test: "no members", + dirName: "github_membership_empty", + mocks: func(client *github.MockGithubRepository) { + client.On("ListMembership").Return([]string{}, nil) + }, + err: nil, + }, + { + test: "Multiple membership with admin and member roles", + dirName: "github_membership_multiple", + mocks: func(client *github.MockGithubRepository) { + client.On("ListMembership").Return([]string{ + "driftctl-test:driftctl-acceptance-tester", + "driftctl-test:eliecharra", + }, 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 cases { + 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.NewGithubMembershipEnumerator(repo, factory)) + remoteLibrary.AddDetailsFetcher(githubres.GithubMembershipResourceType, common.NewGenericDetailsFetcher(githubres.GithubMembershipResourceType, 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.GithubMembershipResourceType, c.dirName, provider, deserializer, shouldUpdate, tt) + }) + } +} diff --git a/pkg/remote/github/test/github_membership_empty/results.golden.json b/pkg/remote/test/github_membership_empty/results.golden.json similarity index 100% rename from pkg/remote/github/test/github_membership_empty/results.golden.json rename to pkg/remote/test/github_membership_empty/results.golden.json diff --git a/pkg/remote/github/test/github_membership_multiple/github_membership-driftctl-test_driftctl-acceptance-tester.res.golden.json b/pkg/remote/test/github_membership_multiple/github_membership-driftctl-test_driftctl-acceptance-tester.res.golden.json similarity index 100% rename from pkg/remote/github/test/github_membership_multiple/github_membership-driftctl-test_driftctl-acceptance-tester.res.golden.json rename to pkg/remote/test/github_membership_multiple/github_membership-driftctl-test_driftctl-acceptance-tester.res.golden.json diff --git a/pkg/remote/github/test/github_membership_multiple/github_membership-driftctl-test_eliecharra.res.golden.json b/pkg/remote/test/github_membership_multiple/github_membership-driftctl-test_eliecharra.res.golden.json similarity index 100% rename from pkg/remote/github/test/github_membership_multiple/github_membership-driftctl-test_eliecharra.res.golden.json rename to pkg/remote/test/github_membership_multiple/github_membership-driftctl-test_eliecharra.res.golden.json diff --git a/pkg/remote/github/test/github_membership_multiple/results.golden.json b/pkg/remote/test/github_membership_multiple/results.golden.json similarity index 100% rename from pkg/remote/github/test/github_membership_multiple/results.golden.json rename to pkg/remote/test/github_membership_multiple/results.golden.json