diff --git a/GNUmakefile b/GNUmakefile index 4d39de3b47..911782492c 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -74,8 +74,7 @@ endif @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME) website-lint: - @echo "==> Checking website against linters..." - @misspell -error -source=text website/ + @$(MAKE) docs-check website-test: ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO))) @@ -84,4 +83,22 @@ ifeq (,$(wildcard $(GOPATH)/src/$(WEBSITE_REPO))) endif @$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider-test PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME) -.PHONY: build test testacc fmt lint lintcheck tools website website-lint website-test sweep +docs-generate: + go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs generate --provider-name github + +docs-validate: + go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs validate + +docs-check: docs-generate docs-validate + @echo "==> Checking provider docs for drift..." + @test -z "$$(git status --short --untracked-files=all -- docs)" || \ + ( echo "Generated docs are out of date. Run 'make docs-generate' and commit the results."; \ + git status --short --untracked-files=all -- docs; \ + exit 1 ) + +docs-migrate: + go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs migrate --provider-name github \ + --templates-dir templates \ + --examples-dir examples + +.PHONY: build test testacc fmt lint lintcheck tools website website-lint website-test sweep docs-generate docs-validate docs-check docs-migrate diff --git a/website/docs/d/actions_environment_public_key.html.markdown b/docs/data-sources/actions_environment_public_key.md similarity index 53% rename from website/docs/d/actions_environment_public_key.html.markdown rename to docs/data-sources/actions_environment_public_key.md index c7d6ae0ae6..29eb8b01b8 100644 --- a/website/docs/d/actions_environment_public_key.html.markdown +++ b/docs/data-sources/actions_environment_public_key.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_actions_environment_public_key" description: |- Get information on a GitHub Actions Environment Public Key. @@ -7,13 +6,11 @@ description: |- # github_actions_environment_public_key -Use this data source to retrieve information about a GitHub Actions public key of a specific environment. This data source is required to be used with other GitHub secrets interactions. -Note that the provider `token` must have admin rights to a repository to retrieve the action public keys of it's environments. - +Use this data source to retrieve information about a GitHub Actions public key of a specific environment. This data source is required to be used with other GitHub secrets interactions. Note that the provider `token` must have admin rights to a repository to retrieve the action public keys of it's environments. ## Example Usage -```hcl +```terraform data "github_actions_environment_public_key" "example" { repository = "example_repo" environment = "example_environment" @@ -22,10 +19,10 @@ data "github_actions_environment_public_key" "example" { ## Argument Reference - * `repository` - (Required) Name of the repository to get public key from. - * `environment` - (Required) Name of the environment to get public key from. +* `repository` - (Required) Name of the repository to get public key from. +* `environment` - (Required) Name of the environment to get public key from. ## Attributes Reference - * `key_id` - ID of the key that has been retrieved. - * `key` - Actual key retrieved. +* `key_id` - ID of the key that has been retrieved. +* `key` - Actual key retrieved. diff --git a/website/docs/d/actions_environment_secrets.html.markdown b/docs/data-sources/actions_environment_secrets.md similarity index 66% rename from website/docs/d/actions_environment_secrets.html.markdown rename to docs/data-sources/actions_environment_secrets.md index bc5a09990e..a47ba76f55 100644 --- a/website/docs/d/actions_environment_secrets.html.markdown +++ b/docs/data-sources/actions_environment_secrets.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_actions_environment_secrets" description: |- Get Actions secrets of the repository environment @@ -11,7 +10,7 @@ Use this data source to retrieve the list of secrets of the repository environme ## Example Usage -```hcl +```terraform data "github_actions_environment_secrets" "example" { name = "exampleRepo" environment = "exampleEnvironment" @@ -22,7 +21,7 @@ data "github_actions_environment_secrets" "example" { ## Attributes Reference - * `secrets` - list of secrets for the environment - * `name` - Name of the secret - * `created_at` - Timestamp of the secret creation - * `updated_at` - Timestamp of the secret last update +* `secrets` - list of secrets for the environment + * `name` - Name of the secret + * `created_at` - Timestamp of the secret creation + * `updated_at` - Timestamp of the secret last update diff --git a/website/docs/d/actions_environment_variables.html.markdown b/docs/data-sources/actions_environment_variables.md similarity index 62% rename from website/docs/d/actions_environment_variables.html.markdown rename to docs/data-sources/actions_environment_variables.md index f68df5b3c4..c0044c54e7 100644 --- a/website/docs/d/actions_environment_variables.html.markdown +++ b/docs/data-sources/actions_environment_variables.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_actions_environment_variables" description: |- Get Actions variables of the repository environment @@ -11,7 +10,7 @@ Use this data source to retrieve the list of variables of the repository environ ## Example Usage -```hcl +```terraform data "github_actions_environment_variables" "example" { name = "exampleRepo" environment = "exampleEnvironment" @@ -22,8 +21,8 @@ data "github_actions_environment_variables" "example" { ## Attributes Reference - * `variables` - list of variables for the environment - * `name` - Name of the variable - * `value` - Value of the variable - * `created_at` - Timestamp of the variable creation - * `updated_at` - Timestamp of the variable last update \ No newline at end of file +* `variables` - list of variables for the environment + * `name` - Name of the variable + * `value` - Value of the variable + * `created_at` - Timestamp of the variable creation + * `updated_at` - Timestamp of the variable last update diff --git a/website/docs/d/actions_organization_oidc_subject_claim_customization_template.html.markdown b/docs/data-sources/actions_organization_oidc_subject_claim_customization_template.md similarity index 60% rename from website/docs/d/actions_organization_oidc_subject_claim_customization_template.html.markdown rename to docs/data-sources/actions_organization_oidc_subject_claim_customization_template.md index 30da16efd7..8cd608d5bc 100644 --- a/website/docs/d/actions_organization_oidc_subject_claim_customization_template.html.markdown +++ b/docs/data-sources/actions_organization_oidc_subject_claim_customization_template.md @@ -1,17 +1,16 @@ --- -layout: "github" -page_title: "GitHub: actions_organization_oidc_subject_claim_customization_template" +page_title: "GitHub: github_actions_organization_oidc_subject_claim_customization_template" description: |- Get a GitHub Actions organization OpenID Connect customization template --- -# actions_organization_oidc_subject_claim_customization_template +# github_actions_organization_oidc_subject_claim_customization_template Use this data source to retrieve the OpenID Connect subject claim customization template for an organization ## Example Usage -```hcl +```terraform data "github_actions_organization_oidc_subject_claim_customization_template" "example" { } ``` @@ -20,4 +19,4 @@ data "github_actions_organization_oidc_subject_claim_customization_template" "ex ## Attributes Reference - * `include_claim_keys` - The list of OpenID Connect claim keys. +* `include_claim_keys` - The list of OpenID Connect claim keys. diff --git a/website/docs/d/actions_organization_public_key.html.markdown b/docs/data-sources/actions_organization_public_key.md similarity index 61% rename from website/docs/d/actions_organization_public_key.html.markdown rename to docs/data-sources/actions_organization_public_key.md index 624a8c58b8..d86e1cb922 100644 --- a/website/docs/d/actions_organization_public_key.html.markdown +++ b/docs/data-sources/actions_organization_public_key.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_actions_organization_public_key" description: |- Get information on a GitHub Actions Organization Public Key. @@ -7,16 +6,15 @@ description: |- # github_actions_organization_public_key -Use this data source to retrieve information about a GitHub Actions Organization public key. This data source is required to be used with other GitHub secrets interactions. -Note that the provider `token` must have admin rights to an organization to retrieve it's action public key. +Use this data source to retrieve information about a GitHub Actions Organization public key. This data source is required to be used with other GitHub secrets interactions. Note that the provider `token` must have admin rights to an organization to retrieve it's action public key. ## Example Usage -```hcl +```terraform data "github_actions_organization_public_key" "example" {} ``` ## Attributes Reference - * `key_id` - ID of the key that has been retrieved. - * `key` - Actual key retrieved. +* `key_id` - ID of the key that has been retrieved. +* `key` - Actual key retrieved. diff --git a/website/docs/d/actions_organization_registration_token.html.markdown b/docs/data-sources/actions_organization_registration_token.md similarity index 62% rename from website/docs/d/actions_organization_registration_token.html.markdown rename to docs/data-sources/actions_organization_registration_token.md index 937afccfb9..c3bd8dd2be 100644 --- a/website/docs/d/actions_organization_registration_token.html.markdown +++ b/docs/data-sources/actions_organization_registration_token.md @@ -1,17 +1,16 @@ --- -layout: "github" -page_title: "GitHub: actions_organization_registration_token" +page_title: "GitHub: github_actions_organization_registration_token" description: |- Get a GitHub Actions organization registration token. --- -# actions_registration_token +# github_actions_organization_registration_token Use this data source to retrieve a GitHub Actions organization registration token. This token can then be used to register a self-hosted runner. ## Example Usage -```hcl +```terraform data "github_actions_organization_registration_token" "example" { } ``` @@ -20,5 +19,5 @@ data "github_actions_organization_registration_token" "example" { ## Attributes Reference - * `token` - The token that has been retrieved. - * `expires_at` - The token expiration date. +* `token` - The token that has been retrieved. +* `expires_at` - The token expiration date. diff --git a/website/docs/d/actions_organization_secrets.html.markdown b/docs/data-sources/actions_organization_secrets.md similarity index 59% rename from website/docs/d/actions_organization_secrets.html.markdown rename to docs/data-sources/actions_organization_secrets.md index 840ab2cfc9..6b4ec5c634 100644 --- a/website/docs/d/actions_organization_secrets.html.markdown +++ b/docs/data-sources/actions_organization_secrets.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_actions_organization_secrets" description: |- Get actions secrets of the organization @@ -11,7 +10,7 @@ Use this data source to retrieve the list of secrets of the organization. ## Example Usage -```hcl +```terraform data "github_actions_organization_secrets" "example" { } ``` @@ -20,9 +19,8 @@ data "github_actions_organization_secrets" "example" { ## Attributes Reference - * `secrets` - list of secrets for the repository - * `name` - Secret name - * `visibility` - Secret visibility - * `created_at` - Timestamp of the secret creation - * `updated_at` - Timestamp of the secret last update - +* `secrets` - list of secrets for the repository + * `name` - Secret name + * `visibility` - Secret visibility + * `created_at` - Timestamp of the secret creation + * `updated_at` - Timestamp of the secret last update diff --git a/website/docs/d/actions_organization_variables.html.markdown b/docs/data-sources/actions_organization_variables.md similarity index 53% rename from website/docs/d/actions_organization_variables.html.markdown rename to docs/data-sources/actions_organization_variables.md index c04d51cec4..24955f8d46 100644 --- a/website/docs/d/actions_organization_variables.html.markdown +++ b/docs/data-sources/actions_organization_variables.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_actions_organization_variables" description: |- Get Actions variables of the organization @@ -11,7 +10,7 @@ Use this data source to retrieve the list of variables of the organization. ## Example Usage -```hcl +```terraform data "github_actions_organization_variables" "example" { } ``` @@ -20,9 +19,9 @@ data "github_actions_organization_variables" "example" { ## Attributes Reference - * `variables` - list of variables for the repository - * `name` - Name of the variable - * `value` - Value of the variable - * `visibility` - Visibility of the variable - * `created_at` - Timestamp of the variable creation - * `updated_at` - Timestamp of the variable last update \ No newline at end of file +* `variables` - list of variables for the repository + * `name` - Name of the variable + * `value` - Value of the variable + * `visibility` - Visibility of the variable + * `created_at` - Timestamp of the variable creation + * `updated_at` - Timestamp of the variable last update diff --git a/website/docs/d/actions_public_key.html.markdown b/docs/data-sources/actions_public_key.md similarity index 56% rename from website/docs/d/actions_public_key.html.markdown rename to docs/data-sources/actions_public_key.md index 8fae079e53..90853953e1 100644 --- a/website/docs/d/actions_public_key.html.markdown +++ b/docs/data-sources/actions_public_key.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_actions_public_key" description: |- Get information on a GitHub Actions Public Key. @@ -7,12 +6,11 @@ description: |- # github_actions_public_key -Use this data source to retrieve information about a GitHub Actions public key. This data source is required to be used with other GitHub secrets interactions. -Note that the provider `token` must have admin rights to a repository to retrieve it's action public key. +Use this data source to retrieve information about a GitHub Actions public key. This data source is required to be used with other GitHub secrets interactions. Note that the provider `token` must have admin rights to a repository to retrieve it's action public key. ## Example Usage -```hcl +```terraform data "github_actions_public_key" "example" { repository = "example_repo" } @@ -20,10 +18,9 @@ data "github_actions_public_key" "example" { ## Argument Reference - * `repository` - (Required) Name of the repository to get public key from. +* `repository` - (Required) Name of the repository to get public key from. ## Attributes Reference - * `key_id` - ID of the key that has been retrieved. - * `key` - Actual key retrieved. - +* `key_id` - ID of the key that has been retrieved. +* `key` - Actual key retrieved. diff --git a/website/docs/d/actions_registration_token.html.markdown b/docs/data-sources/actions_registration_token.md similarity index 56% rename from website/docs/d/actions_registration_token.html.markdown rename to docs/data-sources/actions_registration_token.md index 26598437a2..4d626b6dbf 100644 --- a/website/docs/d/actions_registration_token.html.markdown +++ b/docs/data-sources/actions_registration_token.md @@ -1,17 +1,16 @@ --- -layout: "github" -page_title: "GitHub: actions_registration_token" +page_title: "GitHub: github_actions_registration_token" description: |- Get a GitHub Actions repository registration token. --- -# actions_registration_token +# github_actions_registration_token Use this data source to retrieve a GitHub Actions repository registration token. This token can then be used to register a self-hosted runner. ## Example Usage -```hcl +```terraform data "github_actions_registration_token" "example" { repository = "example_repo" } @@ -19,9 +18,9 @@ data "github_actions_registration_token" "example" { ## Argument Reference - * `repository` - (Required) Name of the repository to get a GitHub Actions registration token for. +* `repository` - (Required) Name of the repository to get a GitHub Actions registration token for. ## Attributes Reference - * `token` - The token that has been retrieved. - * `expires_at` - The token expiration date. +* `token` - The token that has been retrieved. +* `expires_at` - The token expiration date. diff --git a/website/docs/d/actions_repository_oidc_subject_claim_customization_template.html.markdown b/docs/data-sources/actions_repository_oidc_subject_claim_customization_template.md similarity index 62% rename from website/docs/d/actions_repository_oidc_subject_claim_customization_template.html.markdown rename to docs/data-sources/actions_repository_oidc_subject_claim_customization_template.md index 7dfefdec32..62a094b227 100644 --- a/website/docs/d/actions_repository_oidc_subject_claim_customization_template.html.markdown +++ b/docs/data-sources/actions_repository_oidc_subject_claim_customization_template.md @@ -1,17 +1,16 @@ --- -layout: "github" -page_title: "GitHub: actions_repository_oidc_subject_claim_customization_template" +page_title: "GitHub: github_actions_repository_oidc_subject_claim_customization_template" description: |- Get a GitHub Actions repository's OpenID Connect customization template --- -# actions_repository_oidc_subject_claim_customization_template +# github_actions_repository_oidc_subject_claim_customization_template Use this data source to retrieve the OpenID Connect subject claim customization template for a repository ## Example Usage -```hcl +```terraform data "github_actions_repository_oidc_subject_claim_customization_template" "example" { name = "example_repository" } @@ -23,5 +22,5 @@ data "github_actions_repository_oidc_subject_claim_customization_template" "exam ## Attributes Reference - * `use_default` - Whether the repository uses the default template. - * `include_claim_keys` - The list of OpenID Connect claim keys. +* `use_default` - Whether the repository uses the default template. +* `include_claim_keys` - The list of OpenID Connect claim keys. diff --git a/website/docs/d/actions_secrets.html.markdown b/docs/data-sources/actions_secrets.md similarity index 50% rename from website/docs/d/actions_secrets.html.markdown rename to docs/data-sources/actions_secrets.md index fbb83a1dae..dbe14a8f72 100644 --- a/website/docs/d/actions_secrets.html.markdown +++ b/docs/data-sources/actions_secrets.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_actions_secrets" description: |- Get actions secrets for a repository @@ -11,7 +10,7 @@ Use this data source to retrieve the list of secrets for a GitHub repository. ## Example Usage -```hcl +```terraform data "github_actions_secrets" "example" { name = "example" } @@ -19,13 +18,12 @@ data "github_actions_secrets" "example" { ## Argument Reference - * `name` - (Optional) The name of the repository. - * `full_name` - (Optional) Full name of the repository (in `org/name` format). +* `name` - (Optional) The name of the repository. +* `full_name` - (Optional) Full name of the repository (in `org/name` format). ## Attributes Reference - * `secrets` - list of secrets for the repository - * `name` - Secret name - * `created_at` - Timestamp of the secret creation - * `updated_at` - Timestamp of the secret last update - +* `secrets` - list of secrets for the repository + * `name` - Secret name + * `created_at` - Timestamp of the secret creation + * `updated_at` - Timestamp of the secret last update diff --git a/docs/data-sources/actions_variables.md b/docs/data-sources/actions_variables.md new file mode 100644 index 0000000000..0ea10adfc9 --- /dev/null +++ b/docs/data-sources/actions_variables.md @@ -0,0 +1,30 @@ +--- +page_title: "GitHub: github_actions_variables" +description: |- + Get Actions variables for a repository +--- + +# github\_actions\_variables + +Use this data source to retrieve the list of variables for a GitHub repository. + +## Example Usage + +```terraform +data "github_actions_variables" "example" { + name = "example" +} +``` + +## Argument Reference + +* `name` - (Optional) The name of the repository. +* `full_name` - (Optional) Full name of the repository (in `org/name` format). + +## Attributes Reference + +* `variables` - list of variables for the repository + * `name` - Name of the variable + * `value` - Value of the variable + * `created_at` - Timestamp of the variable creation + * `updated_at` - Timestamp of the variable last update diff --git a/website/docs/d/app.html.markdown b/docs/data-sources/app.md similarity index 95% rename from website/docs/d/app.html.markdown rename to docs/data-sources/app.md index 45c52c87b2..ef98069676 100644 --- a/website/docs/d/app.html.markdown +++ b/docs/data-sources/app.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_app" description: |- Get information about an app. @@ -11,7 +10,7 @@ Use this data source to retrieve information about an app. ## Example Usage -```hcl +```terraform data "github_app" "foobar" { slug = "foobar" } @@ -23,7 +22,6 @@ The following arguments are supported: * `slug` - (Required) The URL-friendly name of your GitHub App. - ## Attribute Reference The following additional attributes are exported: diff --git a/website/docs/d/app_token.html.markdown b/docs/data-sources/app_token.md similarity index 97% rename from website/docs/d/app_token.html.markdown rename to docs/data-sources/app_token.md index b224b5f609..39e7438ff4 100644 --- a/website/docs/d/app_token.html.markdown +++ b/docs/data-sources/app_token.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_app_token" description: |- Generate a GitHub APP JWT. @@ -11,7 +10,7 @@ Use this data source to generate a [GitHub App JWT](https://docs.github.com/en/a ## Example Usage -```hcl +```terraform data "github_app_token" "this" { app_id = "123456" installation_id = "78910" diff --git a/website/docs/d/branch.html.markdown b/docs/data-sources/branch.md similarity index 97% rename from website/docs/d/branch.html.markdown rename to docs/data-sources/branch.md index b7348f57dd..13111f88bf 100644 --- a/website/docs/d/branch.html.markdown +++ b/docs/data-sources/branch.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_branch" description: |- Get information about a repository branch. @@ -11,7 +10,7 @@ Use this data source to retrieve information about a repository branch. ## Example Usage -```hcl +```terraform data "github_branch" "development" { repository = "example" branch = "development" diff --git a/website/docs/d/branch_protection_rules.html.markdown b/docs/data-sources/branch_protection_rules.md similarity index 88% rename from website/docs/d/branch_protection_rules.html.markdown rename to docs/data-sources/branch_protection_rules.md index 5189ddbca6..89d9bc5443 100644 --- a/website/docs/d/branch_protection_rules.html.markdown +++ b/docs/data-sources/branch_protection_rules.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_branch_protection_rules" description: |- Get information about a repository branch protection rules. @@ -11,7 +10,7 @@ Use this data source to retrieve a list of repository branch protection rules. ## Example Usage -```hcl +```terraform data "github_branch_protection_rules" "example" { repository = "example" } @@ -27,4 +26,4 @@ The following arguments are supported: * `rules` - Collection of Branch Protection Rules. Each of the results conforms to the following scheme: - * `pattern` - Identifies the protection rule pattern. + * `pattern` - Identifies the protection rule pattern. diff --git a/website/docs/d/codespaces_organization_public_key.html.markdown b/docs/data-sources/codespaces_organization_public_key.md similarity index 69% rename from website/docs/d/codespaces_organization_public_key.html.markdown rename to docs/data-sources/codespaces_organization_public_key.md index 2cc891ddc3..e46c958ce1 100644 --- a/website/docs/d/codespaces_organization_public_key.html.markdown +++ b/docs/data-sources/codespaces_organization_public_key.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_codespaces_organization_public_key" description: |- Get information on a GitHub Codespaces Organization Public Key. @@ -7,16 +6,15 @@ description: |- # github_codespaces_organization_public_key -Use this data source to retrieve information about a GitHub Codespaces Organization public key. This data source is required to be used with other GitHub secrets interactions. -Note that the provider `token` must have admin rights to an organization to retrieve it's Codespaces public key. +Use this data source to retrieve information about a GitHub Codespaces Organization public key. This data source is required to be used with other GitHub secrets interactions. Note that the provider `token` must have admin rights to an organization to retrieve it's Codespaces public key. ## Example Usage -```hcl +```terraform data "github_codespaces_organization_public_key" "example" {} ``` ## Attributes Reference * `key_id` - ID of the key that has been retrieved. -* `key` - Actual key retrieved. +* `key` - Actual key retrieved. diff --git a/website/docs/d/codespaces_organization_secrets.html.markdown b/docs/data-sources/codespaces_organization_secrets.md similarity index 61% rename from website/docs/d/codespaces_organization_secrets.html.markdown rename to docs/data-sources/codespaces_organization_secrets.md index 1368cc1d0e..33a4ce450f 100644 --- a/website/docs/d/codespaces_organization_secrets.html.markdown +++ b/docs/data-sources/codespaces_organization_secrets.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_codespaces_organization_secrets" description: |- Get codespaces secrets of the organization @@ -11,7 +10,7 @@ Use this data source to retrieve the list of codespaces secrets of the organizat ## Example Usage -```hcl +```terraform data "github_codespaces_organization_secrets" "example" { } ``` @@ -20,9 +19,8 @@ data "github_codespaces_organization_secrets" "example" { ## Attributes Reference - * `secrets` - list of secrets for the repository - * `name` - Secret name - * `visibility` - Secret visibility - * `created_at` - Timestamp of the secret creation - * `updated_at` - Timestamp of the secret last update - +* `secrets` - list of secrets for the repository + * `name` - Secret name + * `visibility` - Secret visibility + * `created_at` - Timestamp of the secret creation + * `updated_at` - Timestamp of the secret last update diff --git a/website/docs/d/codespaces_public_key.html.markdown b/docs/data-sources/codespaces_public_key.md similarity index 73% rename from website/docs/d/codespaces_public_key.html.markdown rename to docs/data-sources/codespaces_public_key.md index 69bf492d94..7f720f8589 100644 --- a/website/docs/d/codespaces_public_key.html.markdown +++ b/docs/data-sources/codespaces_public_key.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_codespaces_public_key" description: |- Get information on a GitHub Codespaces Public Key. @@ -7,12 +6,11 @@ description: |- # github_codespaces_public_key -Use this data source to retrieve information about a GitHub Codespaces public key. This data source is required to be used with other GitHub secrets interactions. -Note that the provider `token` must have admin rights to a repository to retrieve it's Codespaces public key. +Use this data source to retrieve information about a GitHub Codespaces public key. This data source is required to be used with other GitHub secrets interactions. Note that the provider `token` must have admin rights to a repository to retrieve it's Codespaces public key. ## Example Usage -```hcl +```terraform data "github_codespaces_public_key" "example" { repository = "example_repo" } @@ -25,4 +23,4 @@ data "github_codespaces_public_key" "example" { ## Attributes Reference * `key_id` - ID of the key that has been retrieved. -* `key` - Actual key retrieved. +* `key` - Actual key retrieved. diff --git a/website/docs/d/codespaces_secrets.html.markdown b/docs/data-sources/codespaces_secrets.md similarity index 57% rename from website/docs/d/codespaces_secrets.html.markdown rename to docs/data-sources/codespaces_secrets.md index 5574013514..ff81c14d50 100644 --- a/website/docs/d/codespaces_secrets.html.markdown +++ b/docs/data-sources/codespaces_secrets.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_codespaces_secrets" description: |- Get codespaces secrets for a repository @@ -11,7 +10,7 @@ Use this data source to retrieve the list of codespaces secrets for a GitHub rep ## Example Usage -```hcl +```terraform data "github_codespaces_secrets" "example" { name = "example_repository" } @@ -23,13 +22,12 @@ data "github_codespaces_secrets" "example_2" { ## Argument Reference - * `name` - (Optional) The name of the repository. - * `full_name` - (Optional) Full name of the repository (in `org/name` format). +* `name` - (Optional) The name of the repository. +* `full_name` - (Optional) Full name of the repository (in `org/name` format). ## Attributes Reference - * `secrets` - list of codespaces secrets for the repository - * `name` - Secret name - * `created_at` - Timestamp of the secret creation - * `updated_at` - Timestamp of the secret last update - +* `secrets` - list of codespaces secrets for the repository + * `name` - Secret name + * `created_at` - Timestamp of the secret creation + * `updated_at` - Timestamp of the secret last update diff --git a/website/docs/d/codespaces_user_public_key.html.markdown b/docs/data-sources/codespaces_user_public_key.md similarity index 69% rename from website/docs/d/codespaces_user_public_key.html.markdown rename to docs/data-sources/codespaces_user_public_key.md index e3f757ad51..36bf2e9610 100644 --- a/website/docs/d/codespaces_user_public_key.html.markdown +++ b/docs/data-sources/codespaces_user_public_key.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_codespaces_user_public_key" description: |- Get information on a GitHub Codespaces User Public Key. @@ -7,16 +6,15 @@ description: |- # github_codespaces_user_public_key -Use this data source to retrieve information about a GitHub Codespaces User public key. This data source is required to be used with other GitHub secrets interactions. -Note that the provider `token` must have admin rights to an user to retrieve it's Codespaces public key. +Use this data source to retrieve information about a GitHub Codespaces User public key. This data source is required to be used with other GitHub secrets interactions. Note that the provider `token` must have admin rights to an user to retrieve it's Codespaces public key. ## Example Usage -```hcl +```terraform data "github_codespaces_user_public_key" "example" {} ``` ## Attributes Reference * `key_id` - ID of the key that has been retrieved. -* `key` - Actual key retrieved. +* `key` - Actual key retrieved. diff --git a/website/docs/d/codespaces_user_secrets.html.markdown b/docs/data-sources/codespaces_user_secrets.md similarity index 58% rename from website/docs/d/codespaces_user_secrets.html.markdown rename to docs/data-sources/codespaces_user_secrets.md index fbce1d1415..3e8487fa47 100644 --- a/website/docs/d/codespaces_user_secrets.html.markdown +++ b/docs/data-sources/codespaces_user_secrets.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_codespaces_user_secrets" description: |- Get codespaces secrets of the user @@ -11,7 +10,7 @@ Use this data source to retrieve the list of codespaces secrets of the user. ## Example Usage -```hcl +```terraform data "github_codespaces_user_secrets" "example" { } ``` @@ -20,9 +19,8 @@ data "github_codespaces_user_secrets" "example" { ## Attributes Reference - * `secrets` - list of secrets for the repository - * `name` - Secret name - * `visibility` - Secret visibility - * `created_at` - Timestamp of the secret creation - * `updated_at` - Timestamp of the secret last update - +* `secrets` - list of secrets for the repository + * `name` - Secret name + * `visibility` - Secret visibility + * `created_at` - Timestamp of the secret creation + * `updated_at` - Timestamp of the secret last update diff --git a/website/docs/d/collaborators.html.markdown b/docs/data-sources/collaborators.md similarity index 70% rename from website/docs/d/collaborators.html.markdown rename to docs/data-sources/collaborators.md index ce8b47ef5c..ded00fe5d9 100644 --- a/website/docs/d/collaborators.html.markdown +++ b/docs/data-sources/collaborators.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_collaborators" description: |- Get the collaborators for a given repository. @@ -11,7 +10,7 @@ Use this data source to retrieve the collaborators for a given repository. ## Example Usage -```hcl +```terraform data "github_collaborators" "test" { owner = "example_owner" repository = "example_repository" @@ -20,19 +19,19 @@ data "github_collaborators" "test" { ## Arguments Reference - * `owner` - (Required) The organization that owns the repository. +* `owner` - (Required) The organization that owns the repository. - * `repository` - (Required) The name of the repository. +* `repository` - (Required) The name of the repository. - * `affiliation` - (Optional) Filter collaborators returned by their affiliation. Can be one of: `outside`, `direct`, `all`. Defaults to `all`. +* `affiliation` - (Optional) Filter collaborators returned by their affiliation. Can be one of: `outside`, `direct`, `all`. Defaults to `all`. - * `permission` - (Optional) Filter collaborators returned by their permission. Can be one of: `pull`, `triage`, `push`, `maintain`, `admin`. Defaults to not doing any filtering on permission. +* `permission` - (Optional) Filter collaborators returned by their permission. Can be one of: `pull`, `triage`, `push`, `maintain`, `admin`. Defaults to not doing any filtering on permission. ## Attributes Reference - * `collaborator` - An Array of GitHub collaborators. Each `collaborator` block consists of the fields documented below. +* `collaborator` - An Array of GitHub collaborators. Each `collaborator` block consists of the fields documented below. -___ +--- The `collaborator` block consists of: diff --git a/website/docs/d/dependabot_organization_public_key.html.markdown b/docs/data-sources/dependabot_organization_public_key.md similarity index 69% rename from website/docs/d/dependabot_organization_public_key.html.markdown rename to docs/data-sources/dependabot_organization_public_key.md index b4a78b91c0..27cdfe20e3 100644 --- a/website/docs/d/dependabot_organization_public_key.html.markdown +++ b/docs/data-sources/dependabot_organization_public_key.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_dependabot_organization_public_key" description: |- Get information on a GitHub Dependabot Organization Public Key. @@ -7,16 +6,15 @@ description: |- # github_dependabot_organization_public_key -Use this data source to retrieve information about a GitHub Dependabot Organization public key. This data source is required to be used with other GitHub secrets interactions. -Note that the provider `token` must have admin rights to an organization to retrieve it's Dependabot public key. +Use this data source to retrieve information about a GitHub Dependabot Organization public key. This data source is required to be used with other GitHub secrets interactions. Note that the provider `token` must have admin rights to an organization to retrieve it's Dependabot public key. ## Example Usage -```hcl +```terraform data "github_dependabot_organization_public_key" "example" {} ``` ## Attributes Reference * `key_id` - ID of the key that has been retrieved. -* `key` - Actual key retrieved. +* `key` - Actual key retrieved. diff --git a/website/docs/d/dependabot_organization_secrets.html.markdown b/docs/data-sources/dependabot_organization_secrets.md similarity index 61% rename from website/docs/d/dependabot_organization_secrets.html.markdown rename to docs/data-sources/dependabot_organization_secrets.md index bf7f624844..34d0c44735 100644 --- a/website/docs/d/dependabot_organization_secrets.html.markdown +++ b/docs/data-sources/dependabot_organization_secrets.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_dependabot_organization_secrets" description: |- Get dependabot secrets of the organization @@ -11,7 +10,7 @@ Use this data source to retrieve the list of dependabot secrets of the organizat ## Example Usage -```hcl +```terraform data "github_dependabot_organization_secrets" "example" { } ``` @@ -20,9 +19,8 @@ data "github_dependabot_organization_secrets" "example" { ## Attributes Reference - * `secrets` - list of secrets for the repository - * `name` - Secret name - * `visibility` - Secret visibility - * `created_at` - Timestamp of the secret creation - * `updated_at` - Timestamp of the secret last update - +* `secrets` - list of secrets for the repository + * `name` - Secret name + * `visibility` - Secret visibility + * `created_at` - Timestamp of the secret creation + * `updated_at` - Timestamp of the secret last update diff --git a/website/docs/d/dependabot_public_key.html.markdown b/docs/data-sources/dependabot_public_key.md similarity index 73% rename from website/docs/d/dependabot_public_key.html.markdown rename to docs/data-sources/dependabot_public_key.md index 80163172d7..db88ffca58 100644 --- a/website/docs/d/dependabot_public_key.html.markdown +++ b/docs/data-sources/dependabot_public_key.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_dependabot_public_key" description: |- Get information on a GitHub Dependabot Public Key. @@ -7,12 +6,11 @@ description: |- # github_dependabot_public_key -Use this data source to retrieve information about a GitHub Dependabot public key. This data source is required to be used with other GitHub secrets interactions. -Note that the provider `token` must have admin rights to a repository to retrieve it's Dependabot public key. +Use this data source to retrieve information about a GitHub Dependabot public key. This data source is required to be used with other GitHub secrets interactions. Note that the provider `token` must have admin rights to a repository to retrieve it's Dependabot public key. ## Example Usage -```hcl +```terraform data "github_dependabot_public_key" "example" { repository = "example_repo" } @@ -25,4 +23,4 @@ data "github_dependabot_public_key" "example" { ## Attributes Reference * `key_id` - ID of the key that has been retrieved. -* `key` - Actual key retrieved. +* `key` - Actual key retrieved. diff --git a/website/docs/d/dependabot_secrets.html.markdown b/docs/data-sources/dependabot_secrets.md similarity index 51% rename from website/docs/d/dependabot_secrets.html.markdown rename to docs/data-sources/dependabot_secrets.md index 7ce26e2227..a30f34d6f4 100644 --- a/website/docs/d/dependabot_secrets.html.markdown +++ b/docs/data-sources/dependabot_secrets.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_dependabot_secrets" description: |- Get dependabot secrets for a repository @@ -11,7 +10,7 @@ Use this data source to retrieve the list of dependabot secrets for a GitHub rep ## Example Usage -```hcl +```terraform data "github_dependabot_secrets" "example" { name = "example" } @@ -19,13 +18,12 @@ data "github_dependabot_secrets" "example" { ## Argument Reference - * `name` - (Optional) The name of the repository. - * `full_name` - (Optional) Full name of the repository (in `org/name` format). +* `name` - (Optional) The name of the repository. +* `full_name` - (Optional) Full name of the repository (in `org/name` format). ## Attributes Reference - * `secrets` - list of dependabot secrets for the repository - * `name` - Secret name - * `created_at` - Timestamp of the secret creation - * `updated_at` - Timestamp of the secret last update - +* `secrets` - list of dependabot secrets for the repository + * `name` - Secret name + * `created_at` - Timestamp of the secret creation + * `updated_at` - Timestamp of the secret last update diff --git a/website/docs/d/enterprise.html.markdown b/docs/data-sources/enterprise.md similarity index 97% rename from website/docs/d/enterprise.html.markdown rename to docs/data-sources/enterprise.md index 251e0ee951..5406b635d2 100644 --- a/website/docs/d/enterprise.html.markdown +++ b/docs/data-sources/enterprise.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "Github: github_enterprise" description: |- Get an enterprise. diff --git a/website/docs/d/external_groups.html.markdown b/docs/data-sources/external_groups.md similarity index 66% rename from website/docs/d/external_groups.html.markdown rename to docs/data-sources/external_groups.md index 0560dd00cd..7a271c641e 100644 --- a/website/docs/d/external_groups.html.markdown +++ b/docs/data-sources/external_groups.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_external_groups" description: |- Retrieve external groups belonging to an organization. @@ -11,7 +10,7 @@ Use this data source to retrieve external groups belonging to an organization. ## Example Usage -```hcl +```terraform data "github_external_groups" "example_external_groups" {} locals { @@ -29,12 +28,10 @@ N/A. This resource will retrieve all the external groups belonging to an organiz ## Attributes Reference - * `external_groups` - an array of external groups belonging to the organization. Each group consists of the fields documented below. +* `external_groups` - an array of external groups belonging to the organization. Each group consists of the fields documented below. -___ - - - * `group_id` - the ID of the group. - * `group_name` - the name of the group. - * `updated_at` - the date the group was last updated. +--- +* `group_id` - the ID of the group. +* `group_name` - the name of the group. +* `updated_at` - the date the group was last updated. diff --git a/website/docs/d/ip_ranges.html.markdown b/docs/data-sources/ip_ranges.md similarity index 99% rename from website/docs/d/ip_ranges.html.markdown rename to docs/data-sources/ip_ranges.md index 58c3ceebc1..a242d9c798 100644 --- a/website/docs/d/ip_ranges.html.markdown +++ b/docs/data-sources/ip_ranges.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_ip_ranges" description: |- Get information on GitHub's IP addresses. @@ -11,7 +10,7 @@ Use this data source to retrieve information about GitHub's IP addresses. ## Example Usage -```hcl +```terraform data "github_ip_ranges" "test" {} ``` diff --git a/website/docs/d/issue_labels.html.markdown b/docs/data-sources/issue_labels.md similarity index 90% rename from website/docs/d/issue_labels.html.markdown rename to docs/data-sources/issue_labels.md index de43a01ba9..479047d7be 100644 --- a/website/docs/d/issue_labels.html.markdown +++ b/docs/data-sources/issue_labels.md @@ -1,18 +1,17 @@ --- -layout: "github" page_title: "GitHub: github_issue_labels" description: |- Get the labels for a given repository. --- -# github_labels +# github_issue_labels Use this data source to retrieve the labels for a given repository. ## Example Usage -```hcl -data "github_labels" "test" { +```terraform +data "github_issue_labels" "test" { repository = "example_repository" } ``` diff --git a/docs/data-sources/membership.md b/docs/data-sources/membership.md new file mode 100644 index 0000000000..1bfe9795e6 --- /dev/null +++ b/docs/data-sources/membership.md @@ -0,0 +1,30 @@ +--- +page_title: "GitHub: github_membership" +description: |- + Get information on user membership in an organization. +--- + +# github_membership + +Use this data source to find out if a user is a member of your organization, as well as what role they have within it. If the user's membership in the organization is pending their acceptance of an invite, the role they would have once they accept will be returned. + +## Example Usage + +```terraform +data "github_membership" "membership_for_some_user" { + username = "SomeUser" +} +``` + +## Argument Reference + +* `username` - (Required) The username to lookup in the organization. + +* `organization` - (Optional) The organization to check for the above username. + +## Attributes Reference + +* `username` - The username. +* `role` - `admin` or `member` -- the role the user has within the organization. +* `etag` - An etag representing the membership object. +* `state` - `active` or `pending` -- the state of membership within the organization. `active` if the member has accepted the invite, or `pending` if the invite is still pending. diff --git a/docs/data-sources/organization.md b/docs/data-sources/organization.md new file mode 100644 index 0000000000..2a567d7f81 --- /dev/null +++ b/docs/data-sources/organization.md @@ -0,0 +1,58 @@ +--- +page_title: "GitHub: github_organization" +description: |- + Get an organization. +--- + +# github_organization + +Use this data source to retrieve basic information about a GitHub Organization. + +## Example Usage + +```terraform +data "github_organization" "example" { + name = "github" +} +``` + +## Argument Reference + +* `name` - (Required) The name of the organization. +* `ignore_archived_repos` - (Optional) Whether or not to include archived repos in the `repositories` list. Defaults to `false`. +* `summary_only` - (Optional) Exclude the repos, members and other attributes from the returned result. Defaults to `false`. + +## Attributes Reference + +* `id` - The ID of the organization +* `node_id` - GraphQL global node ID for use with the v4 API +* `name` - The organization's public profile name +* `orgname` - The organization's name as used in URLs and the API +* `login` - The organization account login +* `description` - The organization account description +* `plan` - The organization account plan name +* `repositories` - (`list`) A list of the full names of the repositories in the organization formatted as `owner/name` strings +* `members` - **Deprecated**: use `users` instead by replacing `github_organization.example.members` to `github_organization.example.users[*].login` which will give you the same value, expect this field to be removed in next major version +* `users` - (`list`) A list with the members of the organization with following fields: + * `id` - The ID of the member + * `login` - The members login + * `email` - Publicly available email + * `role` - Member role `ADMIN`, `MEMBER` +* `two_factor_requirement_enabled` - Whether two-factor authentication is required for all members of the organization. +* `default_repository_permission` - Default permission level members have for organization repositories. +* `members_allowed_repository_creation_type` - The type of repository allowed to be created by members of the organization. Can be one of `ALL`, `PUBLIC`, `PRIVATE`, `NONE`. +* `members_can_create_repositories` - Whether non-admin organization members can create repositories. +* `members_can_create_internal_repositories` - Whether organization members can create internal repositories. +* `members_can_create_private_repositories` - Whether organization members can create private repositories. +* `members_can_create_public_repositories` - Whether organization members can create public repositories. +* `members_can_create_pages` - Whether organization members can create pages sites. +* `members_can_create_public_pages` - Whether organization members can create public pages sites. +* `members_can_create_private_pages` - Whether organization members can create private pages sites. +* `members_can_fork_private_repositories` - Whether organization members can create private repository forks. +* `web_commit_signoff_required` - Whether organization members must sign all commits. +* `advanced_security_enabled_for_new_repositories` - Whether advanced security is enabled for new repositories. +* `dependabot_alerts_enabled_for_new_repositories` - Whether Dependabot alerts is automatically enabled for new repositories. +* `dependabot_security_updates_enabled_for_new_repositories` - Whether Dependabot security updates is automatically enabled for new repositories. +* `dependency_graph_enabled_for_new_repositories` - Whether dependency graph is automatically enabled for new repositories. +* `secret_scanning_enabled_for_new_repositories` - Whether secret scanning is automatically enabled for new repositories. +* `secret_scanning_push_protection_enabled_for_new_repositories` - Whether secret scanning push protection is automatically enabled for new repositories. diff --git a/docs/data-sources/organization_app_installations.md b/docs/data-sources/organization_app_installations.md new file mode 100644 index 0000000000..3396825745 --- /dev/null +++ b/docs/data-sources/organization_app_installations.md @@ -0,0 +1,39 @@ +--- +page_title: "GitHub: github_organization_app_installations" +description: |- + Get information on all GitHub App installations of the organization. +--- + +# github\_organization\_app_installations + +Use this data source to retrieve all GitHub App installations of the organization. + +## Example Usage + +To retrieve *all* GitHub App installations of the organization: + +```terraform +data "github_organization_app_installations" "all" {} +``` + +## Attributes Reference + +* `installations` - List of GitHub App installations in the organization. Each `installation` block consists of the fields documented below. + +--- + +The `installation` block consists of: + +* `id` - The ID of the GitHub App installation. +* `app_slug` - The URL-friendly name of the GitHub App. +* `app_id` - The ID of the GitHub App. +* `repository_selection` - Whether the installation has access to all repositories or only selected ones. Possible values are `all` or `selected`. +* `permissions` - A map of the permissions granted to the GitHub App installation. +* `events` - The list of events the GitHub App installation subscribes to. +* `client_id` - The OAuth client ID of the GitHub App. +* `target_id` - The ID of the account the GitHub App is installed on. +* `target_type` - The type of account the GitHub App is installed on. Possible values are `Organization` or `User`. +* `suspended` - Whether the GitHub App installation is currently suspended. +* `single_file_paths` - The list of single file paths the GitHub App installation has access to. +* `created_at` - The date the GitHub App installation was created. +* `updated_at` - The date the GitHub App installation was last updated. diff --git a/website/docs/d/organization_custom_properties.html.markdown b/docs/data-sources/organization_custom_properties.md similarity index 92% rename from website/docs/d/organization_custom_properties.html.markdown rename to docs/data-sources/organization_custom_properties.md index 783eda2ad0..5fe38dcaad 100644 --- a/website/docs/d/organization_custom_properties.html.markdown +++ b/docs/data-sources/organization_custom_properties.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_organization_custom_properties" description: |- Get information about a GitHub organization custom property @@ -11,7 +10,7 @@ Use this data source to retrieve information about a GitHub organization custom ## Example Usage -```hcl +```terraform data "github_organization_custom_properties" "environment" { property_name = "environment" } @@ -37,4 +36,4 @@ The following arguments are supported: * `allowed_values` - List of allowed values for the custom property. Only populated when `value_type` is `single_select` or `multi_select`. -* `values_editable_by` - Who can edit the values of the custom property. Can be one of `org_actors` or `org_and_repo_actors`. \ No newline at end of file +* `values_editable_by` - Who can edit the values of the custom property. Can be one of `org_actors` or `org_and_repo_actors`. diff --git a/website/docs/d/organization_custom_role.html.markdown b/docs/data-sources/organization_custom_role.md similarity index 97% rename from website/docs/d/organization_custom_role.html.markdown rename to docs/data-sources/organization_custom_role.md index 3e3b1f4429..b99d50cd5b 100644 --- a/website/docs/d/organization_custom_role.html.markdown +++ b/docs/data-sources/organization_custom_role.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_organization_custom_role" description: |- Get a custom role from a GitHub Organization for use in repositories. @@ -15,7 +14,7 @@ Use this data source to retrieve information about a custom role in a GitHub Org ## Example Usage -```hcl +```terraform data "github_organization_custom_role" "example" { name = "example" } diff --git a/website/docs/d/organization_external_identities.markdown b/docs/data-sources/organization_external_identities.md similarity index 85% rename from website/docs/d/organization_external_identities.markdown rename to docs/data-sources/organization_external_identities.md index 3c077b7745..776d5d6b03 100644 --- a/website/docs/d/organization_external_identities.markdown +++ b/docs/data-sources/organization_external_identities.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_organization_external_identities" description: |- Get a list of organization members and their SAML linked external identity NameID @@ -7,12 +6,11 @@ description: |- # github_organization_external_identities -Use this data source to retrieve each organization member's SAML or SCIM user -attributes. +Use this data source to retrieve each organization member's SAML or SCIM user attributes. ## Example Usage -```hcl +```terraform data "github_organization_external_identities" "all" {} ``` @@ -25,10 +23,8 @@ data "github_organization_external_identities" "all" {} Each element in the `identities` block consists of: - `login` - The username of the GitHub user -- `saml_identity` - An Object containing the user's SAML data. This object will - be empty if the user is not managed by SAML. -- `scim_identity` - An Object contining the user's SCIM data. This object will - be empty if the user is not managed by SCIM. +- `saml_identity` - An Object containing the user's SAML data. This object will be empty if the user is not managed by SAML. +- `scim_identity` - An Object contining the user's SCIM data. This object will be empty if the user is not managed by SCIM. --- @@ -43,8 +39,7 @@ If a user is managed by SAML, the `saml_identity` object will contain: If a user is managed by SCIM, the `scim_identity` object will contain: -- `username` - The member's SCIM Username. (will be empty string if user is not - managed by SCIM) +- `username` - The member's SCIM Username. (will be empty string if user is not managed by SCIM) - `groups` - The member's SCIM Groups - `family_name` - The member's SCIM Family Name - `given_name` - The member's SCIM Given Name diff --git a/docs/data-sources/organization_ip_allow_list.md b/docs/data-sources/organization_ip_allow_list.md new file mode 100644 index 0000000000..33dcb90a9b --- /dev/null +++ b/docs/data-sources/organization_ip_allow_list.md @@ -0,0 +1,30 @@ +--- +page_title: "GitHub: github_organization_ip_allow_list" +description: |- + Get the IP allow list of an organization. +--- + +# github_organization_ip_allow_list + +Use this data source to retrieve information about the IP allow list of an organization. The allow list for IP addresses will block access to private resources via the web, API, and Git from any IP addresses that are not on the allow list. + +## Example Usage + +```terraform +data "github_organization_ip_allow_list" "all" {} +``` + +## Attributes Reference + +* `ip_allow_list` - An Array of allowed IP addresses. + +--- + +Each element in the `ip_allow_list` block consists of: + +* `id` - The ID of the IP allow list entry. +* `name` - The name of the IP allow list entry. +* `allow_list_value` - A single IP address or range of IP addresses in CIDR notation. +* `is_active` - Whether the entry is currently active. +* `created_at` - Identifies the date and time when the object was created. +* `updated_at` - Identifies the date and time when the object was last updated. diff --git a/website/docs/d/organization_repository_role.html.markdown b/docs/data-sources/organization_repository_role.md similarity index 84% rename from website/docs/d/organization_repository_role.html.markdown rename to docs/data-sources/organization_repository_role.md index 1ef13f6d08..897d4fc3e6 100644 --- a/website/docs/d/organization_repository_role.html.markdown +++ b/docs/data-sources/organization_repository_role.md @@ -1,11 +1,10 @@ --- -layout: "github" -page_title: "GitHub: github_organization_repository_role Data Source" +page_title: "GitHub: github_organization_repository_role" description: |- Lookup a custom organization repository role. --- -# github_organization_repository_role (Data Source) +# github_organization_repository_role Lookup a custom organization repository role. diff --git a/website/docs/d/organization_repository_roles.html.markdown b/docs/data-sources/organization_repository_roles.md similarity index 86% rename from website/docs/d/organization_repository_roles.html.markdown rename to docs/data-sources/organization_repository_roles.md index 2b65549adb..c8b4ce374a 100644 --- a/website/docs/d/organization_repository_roles.html.markdown +++ b/docs/data-sources/organization_repository_roles.md @@ -1,11 +1,10 @@ --- -layout: "github" -page_title: "GitHub: github_organization_repository_roles Data Source" +page_title: "GitHub: github_organization_repository_roles" description: |- Lookup all custom repository roles in an organization. --- -# github_organization_repository_roles (Data Source) +# github_organization_repository_roles Lookup all custom repository roles in an organization. diff --git a/website/docs/d/organization_role.html.markdown b/docs/data-sources/organization_role.md similarity index 85% rename from website/docs/d/organization_role.html.markdown rename to docs/data-sources/organization_role.md index a6990af53d..b72dfb2e4e 100644 --- a/website/docs/d/organization_role.html.markdown +++ b/docs/data-sources/organization_role.md @@ -1,11 +1,10 @@ --- -layout: "github" -page_title: "GitHub: github_organization_role Data Source" +page_title: "GitHub: github_organization_role" description: |- Lookup a custom organization role. --- -# github_organization_role (Data Source) +# github_organization_role Lookup a custom organization role. diff --git a/website/docs/d/organization_role_teams.html.markdown b/docs/data-sources/organization_role_teams.md similarity index 84% rename from website/docs/d/organization_role_teams.html.markdown rename to docs/data-sources/organization_role_teams.md index 6dfe676109..ceb5516bf3 100644 --- a/website/docs/d/organization_role_teams.html.markdown +++ b/docs/data-sources/organization_role_teams.md @@ -1,11 +1,10 @@ --- -layout: "github" -page_title: "GitHub: github_organization_role_teams Data Source" +page_title: "GitHub: github_organization_role_teams" description: |- Lookup all teams assigned to a custom organization role. --- -# github_organization_role_teams (Data Source) +# github_organization_role_teams Lookup all teams assigned to a custom organization role. diff --git a/website/docs/d/organization_role_users.html.markdown b/docs/data-sources/organization_role_users.md similarity index 82% rename from website/docs/d/organization_role_users.html.markdown rename to docs/data-sources/organization_role_users.md index 6ff6d46668..0ccaef542f 100644 --- a/website/docs/d/organization_role_users.html.markdown +++ b/docs/data-sources/organization_role_users.md @@ -1,11 +1,10 @@ --- -layout: "github" -page_title: "GitHub: github_organization_role_users Data Source" +page_title: "GitHub: github_organization_role_users" description: |- Lookup all users assigned to a custom organization role. --- -# github_organization_role_users (Data Source) +# github_organization_role_users Lookup all users assigned to a custom organization role. diff --git a/website/docs/d/organization_roles.html.markdown b/docs/data-sources/organization_roles.md similarity index 86% rename from website/docs/d/organization_roles.html.markdown rename to docs/data-sources/organization_roles.md index 78890f6d49..6d8887e47c 100644 --- a/website/docs/d/organization_roles.html.markdown +++ b/docs/data-sources/organization_roles.md @@ -1,11 +1,10 @@ --- -layout: "github" -page_title: "GitHub: github_organization_roles Data Source" +page_title: "GitHub: github_organization_roles" description: |- Lookup all custom roles in an organization. --- -# github_organization_roles (Data Source) +# github_organization_roles Lookup all custom roles in an organization. diff --git a/website/docs/d/organization_security_managers.html.markdown b/docs/data-sources/organization_security_managers.md similarity index 85% rename from website/docs/d/organization_security_managers.html.markdown rename to docs/data-sources/organization_security_managers.md index 52b9cb29d7..3636349f69 100644 --- a/website/docs/d/organization_security_managers.html.markdown +++ b/docs/data-sources/organization_security_managers.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_organization_security_managers" description: |- Get the security managers for an organization. @@ -13,13 +12,13 @@ Use this data source to retrieve the security managers for an organization. ## Example Usage -```hcl +```terraform data "github_organization_security_managers" "test" {} ``` ## Attributes Reference -* `teams` - An list of GitHub teams. Each `team` block consists of the fields documented below. +* `teams` - An list of GitHub teams. Each `team` block consists of the fields documented below. ---___ diff --git a/website/docs/d/organization_team_sync_groups.html.markdown b/docs/data-sources/organization_team_sync_groups.md similarity index 72% rename from website/docs/d/organization_team_sync_groups.html.markdown rename to docs/data-sources/organization_team_sync_groups.md index 85b36fb436..ceb464c3bc 100644 --- a/website/docs/d/organization_team_sync_groups.html.markdown +++ b/docs/data-sources/organization_team_sync_groups.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_organization_team_sync_groups" description: |- Get the external identity provider (IdP) groups for an organization. @@ -11,21 +10,20 @@ Use this data source to retrieve the identity provider (IdP) groups for an organ ## Example Usage -```hcl +```terraform data "github_organization_team_sync_groups" "test" {} ``` ## Attributes Reference - * `groups` - An Array of GitHub Identity Provider Groups. Each `group` block consists of the fields documented below. +* `groups` - An Array of GitHub Identity Provider Groups. Each `group` block consists of the fields documented below. -___ +--- The `group` block consists of: * `group_id` - The ID of the IdP group. -* `group_name` - The name of the IdP group. +* `group_name` - The name of the IdP group. * `group_description` - The description of the IdP group. - diff --git a/website/docs/d/organization_teams.html.markdown b/docs/data-sources/organization_teams.md similarity index 56% rename from website/docs/d/organization_teams.html.markdown rename to docs/data-sources/organization_teams.md index f2476738ff..8fb64fe4d3 100644 --- a/website/docs/d/organization_teams.html.markdown +++ b/docs/data-sources/organization_teams.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_organization_teams" description: |- Get information on all GitHub teams of an organization. @@ -13,13 +12,13 @@ Use this data source to retrieve information about all GitHub teams in an organi To retrieve *all* teams of the organization: -```hcl +```terraform data "github_organization_teams" "all" {} ``` To retrieve only the team's at the root of the organization: -```hcl +```terraform data "github_organization_teams" "root_teams" { root_teams_only = true } @@ -27,23 +26,23 @@ data "github_organization_teams" "root_teams" { ## Attributes Reference -* `teams` - (Required) An Array of GitHub Teams. Each `team` block consists of the fields documented below. +* `teams` - (Required) An Array of GitHub Teams. Each `team` block consists of the fields documented below. * `root_teams_only` - (Optional) Only return teams that are at the organization's root, i.e. no nested teams. Defaults to `false`. * `summary_only` - (Optional) Exclude the members and repositories of the team from the returned result. Defaults to `false`. * `results_per_page` - (Optional) Set the number of results per graphql query. Reducing this number can alleviate timeout errors. Accepts a value between 0 - 100. Defaults to `100`. -___ +--- The `team` block consists of: - * `id` - The ID of the team. - * `node_id` - The Node ID of the team. - * `slug` - The slug of the team. - * `name` - The team's full name. - * `description` - The team's description. - * `privacy` - The team's privacy type. - * `members` - List of team members. Not returned if `summary_only = true` - * `repositories` - List of team repositories. Not returned if `summary_only = true` - * `parent_team_id` - The ID of the parent team, if there is one. - * `parent_team_slug` - The slug of the parent team, if there is one. - * `parent` - (**DEPRECATED**) The parent team, use `parent_team_id` or `parent_team_slug` instead. +* `id` - The ID of the team. +* `node_id` - The Node ID of the team. +* `slug` - The slug of the team. +* `name` - The team's full name. +* `description` - The team's description. +* `privacy` - The team's privacy type. +* `members` - List of team members. Not returned if `summary_only = true` +* `repositories` - List of team repositories. Not returned if `summary_only = true` +* `parent_team_id` - The ID of the parent team, if there is one. +* `parent_team_slug` - The slug of the parent team, if there is one. +* `parent` - (**DEPRECATED**) The parent team, use `parent_team_id` or `parent_team_slug` instead. diff --git a/website/docs/d/organization_webhooks.html.markdown b/docs/data-sources/organization_webhooks.md similarity index 56% rename from website/docs/d/organization_webhooks.html.markdown rename to docs/data-sources/organization_webhooks.md index 3ae975322b..b20cf8e7da 100644 --- a/website/docs/d/organization_webhooks.html.markdown +++ b/docs/data-sources/organization_webhooks.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_organization_webhooks" description: |- Get information on all GitHub webhooks of the organization. @@ -13,19 +12,20 @@ Use this data source to retrieve all webhooks of the organization. To retrieve *all* webhooks of the organization: -```hcl +```terraform data "github_organization_webhooks" "all" {} ``` ## Attributes Reference -* `webhooks` - An Array of GitHub Webhooks. Each `webhook` block consists of the fields documented below. -___ +* `webhooks` - An Array of GitHub Webhooks. Each `webhook` block consists of the fields documented below. + +--- The `webhook` block consists of: - * `id` - the ID of the webhook. - * `type` - the type of the webhook. - * `name` - the name of the webhook. - * `url` - the url of the webhook. - * `active` - `true` if the webhook is active. +* `id` - the ID of the webhook. +* `type` - the type of the webhook. +* `name` - the name of the webhook. +* `url` - the url of the webhook. +* `active` - `true` if the webhook is active. diff --git a/website/docs/d/ref.html.markdown b/docs/data-sources/ref.md similarity index 91% rename from website/docs/d/ref.html.markdown rename to docs/data-sources/ref.md index 2e2c2fd853..cec109c0c8 100644 --- a/website/docs/d/ref.html.markdown +++ b/docs/data-sources/ref.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_ref" description: |- Get information about a repository ref. @@ -11,7 +10,7 @@ Use this data source to retrieve information about a repository ref. ## Example Usage -```hcl +```terraform data "github_ref" "development" { owner = "example" repository = "example" @@ -23,7 +22,7 @@ data "github_ref" "development" { The following arguments are supported: -* `owner` - (Required) Owner of the repository. +* `owner` - (Required) Owner of the repository. * `repository` - (Required) The GitHub repository name. diff --git a/docs/data-sources/release.md b/docs/data-sources/release.md new file mode 100644 index 0000000000..973dab137c --- /dev/null +++ b/docs/data-sources/release.md @@ -0,0 +1,85 @@ +--- +page_title: "GitHub: github_release" +description: |- + Get information on a GitHub release. +--- + +# github\_release + +Use this data source to retrieve information about a GitHub release in a specific repository. + +## Example Usage + +To retrieve the latest release that is present in a repository: + +```terraform +data "github_release" "example" { + repository = "example-repository" + owner = "example-owner" + retrieve_by = "latest" +} +``` + +To retrieve a specific release from a repository based on its ID: + +```terraform +data "github_release" "example" { + repository = "example-repository" + owner = "example-owner" + retrieve_by = "id" + id = 12345 +} +``` + +Finally, to retrieve a release based on its tag: + +```terraform +data "github_release" "example" { + repository = "example-repository" + owner = "example-owner" + retrieve_by = "tag" + release_tag = "v1.0.0" +} +``` + +## Argument Reference + +* `repository` - (Required) Name of the repository to retrieve the release from. + +* `owner` - (Required) Owner of the repository. + +* `retrieve_by` - (Required) Describes how to fetch the release. Valid values are `id`, `tag`, `latest`. + +* `release_id` - (Optional) ID of the release to retrieve. Must be specified when `retrieve_by` = `id`. + +* `release_tag` - (Optional) Tag of the release to retrieve. Must be specified when `retrieve_by` = `tag`. + +## Attributes Reference + +* `release_tag` - Tag of release +* `release_id` - ID of release +* `target_commitish` - Commitish value that determines where the Git release is created from +* `name` - Name of release +* `body` - Contents of the description (body) of a release +* `draft` - (`Boolean`) indicates whether the release is a draft +* `prerelease` - (`Boolean`) indicates whether the release is a prerelease +* `created_at` - Date of release creation +* `published_at` - Date of release publishing +* `url` - Base URL of the release +* `html_url` - URL directing to detailed information on the release +* `assets_url` - URL of any associated assets with the release +* `asserts_url` - **Deprecated**: Use `assets_url` resource instead +* `upload_url` - URL that can be used to upload Assets to the release +* `zipball_url` - Download URL of a specific release in `zip` format +* `tarball_url` - Download URL of a specific release in `tar.gz` format +* `assets` - Collection of assets for the release. Each asset conforms to the following schema: + * `id` - ID of the asset + * `url` - URL of the asset + * `node_id` - Node ID of the asset + * `name` - The file name of the asset + * `label` - Label for the asset + * `content_type` - MIME type of the asset + * `size` - Size in byte + * `created_at` - Date the asset was created + * `updated_at` - Date the asset was last updated + * `browser_download_url` - Browser download URL diff --git a/website/docs/d/release_asset.html.markdown b/docs/data-sources/release_asset.md similarity index 82% rename from website/docs/d/release_asset.html.markdown rename to docs/data-sources/release_asset.md index a5b9faa1ec..7ed5c44824 100644 --- a/website/docs/d/release_asset.html.markdown +++ b/docs/data-sources/release_asset.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_release_asset" description: |- Get information on a GitHub release asset. @@ -10,9 +9,10 @@ description: |- Use this data source to retrieve information about a GitHub release asset. ## Example Usage + To retrieve a specific release asset from a repository based on its ID: -```hcl +```terraform data "github_release_asset" "example" { repository = "example-repository" owner = "example-owner" @@ -20,10 +20,9 @@ data "github_release_asset" "example" { } ``` -To retrieve a specific release asset from a repository, and download the file -into a `file` attribute on the data source: +To retrieve a specific release asset from a repository, and download the file into a `file` attribute on the data source: -```hcl +```terraform data "github_release_asset" "example" { repository = "example-repository" owner = "example-owner" @@ -32,10 +31,9 @@ data "github_release_asset" "example" { } ``` - To retrieve the first release asset associated with the latest release in a repository: -```hcl +```terraform data "github_release" "example" { repository = "example-repository" owner = "example-owner" @@ -51,7 +49,7 @@ data "github_release_asset" "example" { To retrieve all release assets associated with the the latest release in a repository: -```hcl +```terraform data "github_release" "example" { repository = "example-repository" owner = "example-owner" @@ -68,10 +66,10 @@ data "github_release_asset" "example" { ## Argument Reference -* `repository` - (Required) Name of the repository to retrieve the release from -* `owner` - (Required) Owner of the repository -* `asset_id` - (Required) ID of the release asset to retrieve -* `download_file_contents` - (Optional) Whether to download the asset file content into the `file_contents` attribute (defaults to `false`) +* `repository` - (Required) Name of the repository to retrieve the release from +* `owner` - (Required) Owner of the repository +* `asset_id` - (Required) ID of the release asset to retrieve +* `download_file_contents` - (Optional) Whether to download the asset file content into the `file_contents` attribute (defaults to `false`) ## Attributes Reference diff --git a/website/docs/d/repositories.html.markdown b/docs/data-sources/repositories.md similarity index 90% rename from website/docs/d/repositories.html.markdown rename to docs/data-sources/repositories.md index a08df0d648..94eeaed68d 100644 --- a/website/docs/d/repositories.html.markdown +++ b/docs/data-sources/repositories.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repositories" description: |- Search for GitHub repositories @@ -7,14 +6,13 @@ description: |- # github_repositories --> **Note:** The data source will return a maximum of `1000` repositories - [as documented in official API docs](https://developer.github.com/v3/search/#about-the-search-api). +-> **Note:** The data source will return a maximum of `1000` repositories [as documented in official API docs](https://developer.github.com/v3/search/#about-the-search-api). Use this data source to retrieve a list of GitHub repositories using a search query. ## Example Usage -```hcl +```terraform data "github_repositories" "example" { query = "org:hashicorp language:Go" include_repo_id = true diff --git a/website/docs/d/repository.html.markdown b/docs/data-sources/repository.md similarity index 99% rename from website/docs/d/repository.html.markdown rename to docs/data-sources/repository.md index 071da23c89..4e1ba2cbf1 100644 --- a/website/docs/d/repository.html.markdown +++ b/docs/data-sources/repository.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repository" description: |- Get details about GitHub repository @@ -11,7 +10,7 @@ Use this data source to retrieve information about a GitHub repository. ## Example Usage -```hcl +```terraform data "github_repository" "example" { full_name = "hashicorp/terraform" } @@ -97,7 +96,7 @@ The following arguments are supported: * `repository_license` - An Array of GitHub repository licenses. Each `repository_license` block consists of the fields documented below. -___ +--- The `repository_license` block consists of: diff --git a/website/docs/d/repository_autolink_references.html.markdown b/docs/data-sources/repository_autolink_references.md similarity index 74% rename from website/docs/d/repository_autolink_references.html.markdown rename to docs/data-sources/repository_autolink_references.md index a219a1bf4f..feba05b752 100644 --- a/website/docs/d/repository_autolink_references.html.markdown +++ b/docs/data-sources/repository_autolink_references.md @@ -1,6 +1,5 @@ --- -layout: "github" -page_title: "GitHub: repository_autolink_references" +page_title: "GitHub: github_repository_autolink_references" description: |- Get autolink references for a Github repository. --- @@ -11,7 +10,7 @@ Use this data source to retrieve autolink references for a repository. ## Example Usage -```hcl +```terraform data "github_repository_autolink_references" "example" { repository = "example-repository" } @@ -24,6 +23,6 @@ data "github_repository_autolink_references" "example" { ## Attributes Reference * `autolink_references` - The list of this repository's autolink references. Each element of `autolink_references` has the following attributes: - * `key_prefix` - Key prefix. - * `target_url_template` - Target url template. - * `is_alphanumeric` - True if alphanumeric. + * `key_prefix` - Key prefix. + * `target_url_template` - Target url template. + * `is_alphanumeric` - True if alphanumeric. diff --git a/website/docs/d/repository_branches.html.markdown b/docs/data-sources/repository_branches.md similarity index 84% rename from website/docs/d/repository_branches.html.markdown rename to docs/data-sources/repository_branches.md index 105f9dd8fa..ba91d256d6 100644 --- a/website/docs/d/repository_branches.html.markdown +++ b/docs/data-sources/repository_branches.md @@ -1,6 +1,5 @@ --- -layout: "github" -page_title: "GitHub: repository_branches" +page_title: "GitHub: github_repository_branches" description: |- Get information on a GitHub repository's branches. --- @@ -11,7 +10,7 @@ Use this data source to retrieve information about branches in a repository. ## Example Usage -```hcl +```terraform data "github_repository_branches" "example" { repository = "example-repository" } @@ -28,5 +27,5 @@ data "github_repository_branches" "example" { ## Attributes Reference * `branches` - The list of this repository's branches. Each element of `branches` has the following attributes: - * `name` - Name of the branch. - * `protected` - Whether the branch is protected. + * `name` - Name of the branch. + * `protected` - Whether the branch is protected. diff --git a/website/docs/d/repository_custom_properties.html.markdown b/docs/data-sources/repository_custom_properties.md similarity index 84% rename from website/docs/d/repository_custom_properties.html.markdown rename to docs/data-sources/repository_custom_properties.md index 17677b5f75..e6288c30ed 100644 --- a/website/docs/d/repository_custom_properties.html.markdown +++ b/docs/data-sources/repository_custom_properties.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repository_custom_properties" description: |- Get all custom properties of a repository @@ -11,7 +10,7 @@ Use this data source to retrieve all custom properties of a repository. ## Example Usage -```hcl +```terraform data "github_repository_custom_properties" "example" { repository = "example-repository" } @@ -24,5 +23,5 @@ data "github_repository_custom_properties" "example" { ## Attributes Reference * `property` - The list of this repository's custom properties. Each element of `property` has the following attributes: - * `property_name` - Name of the property - * `property_value` - Value of the property + * `property_name` - Name of the property + * `property_value` - Value of the property diff --git a/website/docs/d/repository_deploy_keys.html.markdown b/docs/data-sources/repository_deploy_keys.md similarity index 72% rename from website/docs/d/repository_deploy_keys.html.markdown rename to docs/data-sources/repository_deploy_keys.md index d7f6387f6c..220bfecf4d 100644 --- a/website/docs/d/repository_deploy_keys.html.markdown +++ b/docs/data-sources/repository_deploy_keys.md @@ -1,6 +1,5 @@ --- -layout: "github" -page_title: "GitHub: repository_deploy_keys" +page_title: "GitHub: github_repository_deploy_keys" description: |- Get all deploy keys of a repository --- @@ -11,7 +10,7 @@ Use this data source to retrieve all deploy keys of a repository. ## Example Usage -```hcl +```terraform data "github_repository_deploy_keys" "example" { repository = "example-repository" } @@ -24,7 +23,7 @@ data "github_repository_deploy_keys" "example" { ## Attributes Reference * `keys` - The list of this repository's deploy keys. Each element of `keys` has the following attributes: - * `id` - Key id - * `title` - Key title - * `key` - Key itself - * `verified` - `true` if the key was verified. + * `id` - Key id + * `title` - Key title + * `key` - Key itself + * `verified` - `true` if the key was verified. diff --git a/website/docs/d/repository_deployment_branch_policies.html.markdown b/docs/data-sources/repository_deployment_branch_policies.md similarity index 97% rename from website/docs/d/repository_deployment_branch_policies.html.markdown rename to docs/data-sources/repository_deployment_branch_policies.md index d0ec6debec..b4e0b47522 100644 --- a/website/docs/d/repository_deployment_branch_policies.html.markdown +++ b/docs/data-sources/repository_deployment_branch_policies.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repository_deployment_branch_policies" description: |- Get the list of deployment branch policies for a given repo / env. @@ -13,7 +12,7 @@ Use this data source to retrieve deployment branch policies for a repository / e ## Example Usage -```hcl +```terraform data "github_repository_deployment_branch_policies" "example" { repository = "example-repository" environment_name = "env_name" diff --git a/website/docs/d/repository_environment_deployment_policies.html.markdown b/docs/data-sources/repository_environment_deployment_policies.md similarity index 97% rename from website/docs/d/repository_environment_deployment_policies.html.markdown rename to docs/data-sources/repository_environment_deployment_policies.md index 93efcc912a..d86e394be9 100644 --- a/website/docs/d/repository_environment_deployment_policies.html.markdown +++ b/docs/data-sources/repository_environment_deployment_policies.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repository_environment_deployment_policies" description: |- Get the list of environment deployment policies for a given repository environment. @@ -11,7 +10,7 @@ Use this data source to retrieve deployment branch policies for a repository env ## Example Usage -```hcl +```terraform data "github_repository_environment_deployment_policies" "example" { repository = "example-repository" environment = "env-name" diff --git a/website/docs/d/repository_environments.html.markdown b/docs/data-sources/repository_environments.md similarity index 80% rename from website/docs/d/repository_environments.html.markdown rename to docs/data-sources/repository_environments.md index 62831ef48c..220ce07ab6 100644 --- a/website/docs/d/repository_environments.html.markdown +++ b/docs/data-sources/repository_environments.md @@ -1,6 +1,5 @@ --- -layout: "github" -page_title: "GitHub: repository_environments" +page_title: "GitHub: github_repository_environments" description: |- Get information on a GitHub repository's environments. --- @@ -11,7 +10,7 @@ Use this data source to retrieve information about environments for a repository ## Example Usage -```hcl +```terraform data "github_repository_environments" "example" { repository = "example-repository" } @@ -24,5 +23,5 @@ data "github_repository_environments" "example" { ## Attributes Reference * `environments` - The list of this repository's environments. Each element of `environments` has the following attributes: - * `name` - Environment name. - * `node_id` - Environment node id. + * `name` - Environment name. + * `node_id` - Environment node id. diff --git a/website/docs/d/repository_file.html.markdown b/docs/data-sources/repository_file.md similarity index 92% rename from website/docs/d/repository_file.html.markdown rename to docs/data-sources/repository_file.md index b1683deac9..0219faa3ac 100644 --- a/website/docs/d/repository_file.html.markdown +++ b/docs/data-sources/repository_file.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repository_file" description: |- Reads files within a GitHub repository @@ -7,22 +6,18 @@ description: |- # github_repository_file -This data source allows you to read files within a -GitHub repository. - +This data source allows you to read files within a GitHub repository. ## Example Usage -```hcl +```terraform data "github_repository_file" "foo" { repository = github_repository.foo.name branch = "main" file = ".gitignore" } - ``` - ## Argument Reference The following arguments are supported: diff --git a/website/docs/d/repository_milestone.html.markdown b/docs/data-sources/repository_milestone.md similarity index 52% rename from website/docs/d/repository_milestone.html.markdown rename to docs/data-sources/repository_milestone.md index fe177f4b68..c0c92c22af 100644 --- a/website/docs/d/repository_milestone.html.markdown +++ b/docs/data-sources/repository_milestone.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repository_milestone" description: |- Get information on a GitHub Repository Milestone. @@ -11,7 +10,7 @@ Use this data source to retrieve information about a specific GitHub milestone i ## Example Usage -```hcl +```terraform data "github_repository_milestone" "example" { owner = "example-owner" repository = "example-repository" @@ -21,15 +20,15 @@ data "github_repository_milestone" "example" { ## Argument Reference - * `owner` - (Required) Owner of the repository. - - * `repository` - (Required) Name of the repository to retrieve the milestone from. +* `owner` - (Required) Owner of the repository. - * `number` - (Required) The number of the milestone. +* `repository` - (Required) Name of the repository to retrieve the milestone from. + +* `number` - (Required) The number of the milestone. ## Attributes Reference - * `description` - Description of the milestone. - * `due_date` - The milestone due date (in ISO-8601 `yyyy-mm-dd` format). - * `state` - State of the milestone. - * `title` - Title of the milestone. +* `description` - Description of the milestone. +* `due_date` - The milestone due date (in ISO-8601 `yyyy-mm-dd` format). +* `state` - State of the milestone. +* `title` - Title of the milestone. diff --git a/website/docs/d/repository_pull_request.html.markdown b/docs/data-sources/repository_pull_request.md similarity index 83% rename from website/docs/d/repository_pull_request.html.markdown rename to docs/data-sources/repository_pull_request.md index 4173601e61..9cd135808f 100644 --- a/website/docs/d/repository_pull_request.html.markdown +++ b/docs/data-sources/repository_pull_request.md @@ -1,6 +1,5 @@ --- -layout: "github" -page_title: "GitHub: repository_pull_request" +page_title: "GitHub: github_repository_pull_request" description: |- Get information on a single GitHub Pull Request. --- @@ -11,7 +10,7 @@ Use this data source to retrieve information about a specific GitHub Pull Reques ## Example Usage -```hcl +```terraform data "github_repository_pull_request" "example" { base_repository = "example_repository" number = 1 @@ -20,11 +19,11 @@ data "github_repository_pull_request" "example" { ## Argument Reference -* `base_repository` - (Required) Name of the base repository to retrieve the Pull Request from. +* `base_repository` - (Required) Name of the base repository to retrieve the Pull Request from. * `number` - (Required) The number of the Pull Request within the repository. -* `owner` - (Optional) Owner of the repository. If not provided, the provider's default owner is used. +* `owner` - (Optional) Owner of the repository. If not provided, the provider's default owner is used. ## Attributes Reference @@ -55,4 +54,3 @@ data "github_repository_pull_request" "example" { * `title` - The title of the Pull Request. * `updated_at` - The timestamp of the last Pull Request update. - \ No newline at end of file diff --git a/website/docs/d/repository_pull_requests.html.markdown b/docs/data-sources/repository_pull_requests.md similarity index 54% rename from website/docs/d/repository_pull_requests.html.markdown rename to docs/data-sources/repository_pull_requests.md index 10797e89b6..5cca1386db 100644 --- a/website/docs/d/repository_pull_requests.html.markdown +++ b/docs/data-sources/repository_pull_requests.md @@ -1,6 +1,5 @@ --- -layout: "github" -page_title: "GitHub: repository_pull_requests" +page_title: "GitHub: github_repository_pull_requests" description: |- Get information on multiple GitHub Pull Requests. --- @@ -11,7 +10,7 @@ Use this data source to retrieve information about multiple GitHub Pull Requests ## Example Usage -```hcl +```terraform data "github_repository_pull_requests" "example" { base_repository = "example-repository" base_ref = "main" @@ -25,7 +24,7 @@ data "github_repository_pull_requests" "example" { * `base_repository` - (Required) Name of the base repository to retrieve the Pull Requests from. -* `owner` - (Optional) Owner of the repository. If not provided, the provider's default owner is used. +* `owner` - (Optional) Owner of the repository. If not provided, the provider's default owner is used. * `base_ref` - (Optional) If set, filters Pull Requests by base branch name. @@ -41,34 +40,34 @@ data "github_repository_pull_requests" "example" { * `results` - Collection of Pull Requests matching the filters. Each of the results conforms to the following scheme: - * `base_ref` - Name of the ref (branch) of the Pull Request base. + * `base_ref` - Name of the ref (branch) of the Pull Request base. - * `base_sha` - Head commit SHA of the Pull Request base. + * `base_sha` - Head commit SHA of the Pull Request base. - * `body` - Body of the Pull Request. + * `body` - Body of the Pull Request. - * `draft` - Indicates Whether this Pull Request is a draft. + * `draft` - Indicates Whether this Pull Request is a draft. - * `head_owner` - Owner of the Pull Request head repository. + * `head_owner` - Owner of the Pull Request head repository. - * `head_ref` - Value of the Pull Request `HEAD` reference. + * `head_ref` - Value of the Pull Request `HEAD` reference. - * `head_repository` - Name of the Pull Request head repository. + * `head_repository` - Name of the Pull Request head repository. - * `head_sha` - Head commit SHA of the Pull Request head. + * `head_sha` - Head commit SHA of the Pull Request head. - * `labels` - List of label names set on the Pull Request. + * `labels` - List of label names set on the Pull Request. - * `maintainer_can_modify` - Indicates whether the base repository maintainers can modify the Pull Request. + * `maintainer_can_modify` - Indicates whether the base repository maintainers can modify the Pull Request. - * `number` - The number of the Pull Request within the repository. + * `number` - The number of the Pull Request within the repository. - * `opened_at` - Unix timestamp indicating the Pull Request creation time. + * `opened_at` - Unix timestamp indicating the Pull Request creation time. - * `opened_by` - GitHub login of the user who opened the Pull Request. + * `opened_by` - GitHub login of the user who opened the Pull Request. - * `state` - the current Pull Request state - can be "open", "closed" or "merged". + * `state` - the current Pull Request state - can be "open", "closed" or "merged". - * `title` - The title of the Pull Request. + * `title` - The title of the Pull Request. - * `updated_at` - The timestamp of the last Pull Request update. + * `updated_at` - The timestamp of the last Pull Request update. diff --git a/website/docs/d/repository_teams.html.markdown b/docs/data-sources/repository_teams.md similarity index 55% rename from website/docs/d/repository_teams.html.markdown rename to docs/data-sources/repository_teams.md index ca67c980f0..e7cf2c8aa0 100644 --- a/website/docs/d/repository_teams.html.markdown +++ b/docs/data-sources/repository_teams.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repository_teams" description: |- Get teams which have permission on the given repo. @@ -11,7 +10,7 @@ Use this data source to retrieve the list of teams which have access to a GitHub ## Example Usage -```hcl +```terraform data "github_repository_teams" "example" { name = "example" } @@ -19,13 +18,12 @@ data "github_repository_teams" "example" { ## Argument Reference - * `name` - (Optional) The name of the repository. - * `full_name` - (Optional) Full name of the repository (in `org/name` format). +* `name` - (Optional) The name of the repository. +* `full_name` - (Optional) Full name of the repository (in `org/name` format). ## Attributes Reference - * `teams` - List of teams which have access to the repository - * `name` - Team name - * `slug` - Team slug - * `permission` - Team permission - +* `teams` - List of teams which have access to the repository + * `name` - Team name + * `slug` - Team slug + * `permission` - Team permission diff --git a/website/docs/d/repository_webhooks.html.markdown b/docs/data-sources/repository_webhooks.md similarity index 56% rename from website/docs/d/repository_webhooks.html.markdown rename to docs/data-sources/repository_webhooks.md index 071e935a47..f1ca1af913 100644 --- a/website/docs/d/repository_webhooks.html.markdown +++ b/docs/data-sources/repository_webhooks.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repository_webhooks" description: |- Get information on all GitHub webhooks of the organization. @@ -13,7 +12,7 @@ Use this data source to retrieve webhooks for a given repository. To retrieve webhooks of a repository: -```hcl +```terraform data "github_repository_webhooks" "repo" { repository = "foo" } @@ -21,13 +20,14 @@ data "github_repository_webhooks" "repo" { ## Attributes Reference -* `webhooks` - An Array of GitHub Webhooks. Each `webhook` block consists of the fields documented below. -___ +* `webhooks` - An Array of GitHub Webhooks. Each `webhook` block consists of the fields documented below. + +--- The `webhook` block consists of: - * `id` - the ID of the webhook. - * `type` - the type of the webhook. - * `name` - the name of the webhook. - * `url` - the url of the webhook. - * `active` - `true` if the webhook is active. +* `id` - the ID of the webhook. +* `type` - the type of the webhook. +* `name` - the name of the webhook. +* `url` - the url of the webhook. +* `active` - `true` if the webhook is active. diff --git a/website/docs/d/rest_api.html.markdown b/docs/data-sources/rest_api.md similarity index 55% rename from website/docs/d/rest_api.html.markdown rename to docs/data-sources/rest_api.md index de628acef6..d4f0173076 100644 --- a/website/docs/d/rest_api.html.markdown +++ b/docs/data-sources/rest_api.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_rest_api" description: |- Get information on a GitHub resource with a custom GET request to GitHub REST API. @@ -11,7 +10,7 @@ Use this data source to retrieve information about a GitHub resource through RES ## Example Usage -```hcl +```terraform data "github_rest_api" "example" { endpoint = "repos/example_repo/git/refs/heads/main" } @@ -19,12 +18,12 @@ data "github_rest_api" "example" { ## Argument Reference - * `endpoint` - (Required) REST API endpoint to send the GET request to. +* `endpoint` - (Required) REST API endpoint to send the GET request to. ## Attributes Reference - * `id` - The GitHub API Request ID - * `code` - A response status code. - * `status` - A response status string. - * `headers` - A JSON string containing response headers. - * `body` - A JSON string containing response body. +* `id` - The GitHub API Request ID +* `code` - A response status code. +* `status` - A response status string. +* `headers` - A JSON string containing response headers. +* `body` - A JSON string containing response body. diff --git a/website/docs/d/ssh_keys.html.markdown b/docs/data-sources/ssh_keys.md similarity index 78% rename from website/docs/d/ssh_keys.html.markdown rename to docs/data-sources/ssh_keys.md index a484c85a74..e8e40a0a8d 100644 --- a/website/docs/d/ssh_keys.html.markdown +++ b/docs/data-sources/ssh_keys.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_ssh_keys" description: |- Get information on GitHub's SSH keys. @@ -11,10 +10,10 @@ Use this data source to retrieve information about GitHub's SSH keys. ## Example Usage -```hcl +```terraform data "github_ssh_keys" "test" {} ``` ## Attributes Reference - * `keys` - An array of GitHub's SSH public keys. +* `keys` - An array of GitHub's SSH public keys. diff --git a/website/docs/d/team.html.markdown b/docs/data-sources/team.md similarity index 93% rename from website/docs/d/team.html.markdown rename to docs/data-sources/team.md index f8fdde4de5..b3bbdabaf5 100644 --- a/website/docs/d/team.html.markdown +++ b/docs/data-sources/team.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_team" description: |- Get information on a GitHub team. @@ -11,7 +10,7 @@ Use this data source to retrieve information about a GitHub team. ## Example Usage -```hcl +```terraform data "github_team" "example" { slug = "example" } @@ -20,9 +19,9 @@ data "github_team" "example" { ## Argument Reference * `slug` - (Required) The team slug. -* `membership_type` - (Optional) Type of membership to be requested to fill the list of members. Can be either `all` _(default)_ or `immediate`. +* `membership_type` - (Optional) Type of membership to be requested to fill the list of members. Can be either `all` *(default)* or `immediate`. * `summary_only` - (Optional) Exclude the members and repositories of the team from the returned result. Defaults to `false`. -* `results_per_page` - (**DEPRECATED**) (Optional) Set the number of results per REST API query. Accepts a value between 0 - 100 _(defaults to `100`)_. +* `results_per_page` - (**DEPRECATED**) (Optional) Set the number of results per REST API query. Accepts a value between 0 - 100 *(defaults to `100`)*. ## Attributes Reference diff --git a/website/docs/d/tree.html.markdown b/docs/data-sources/tree.md similarity index 97% rename from website/docs/d/tree.html.markdown rename to docs/data-sources/tree.md index 6c254b9f22..f8001592db 100644 --- a/website/docs/d/tree.html.markdown +++ b/docs/data-sources/tree.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_tree" description: |- Returns a single tree using the SHA1 value for that tree. @@ -11,7 +10,7 @@ Use this data source to retrieve information about a single tree. ## Example Usage -```hcl +```terraform data "github_repository" "this" { name = "example" } @@ -30,7 +29,6 @@ data "github_tree" "this" { output "entries" { value = data.github_tree.this.entries } - ``` ## Argument Reference diff --git a/docs/data-sources/user.md b/docs/data-sources/user.md new file mode 100644 index 0000000000..4726f337fc --- /dev/null +++ b/docs/data-sources/user.md @@ -0,0 +1,55 @@ +--- +page_title: "GitHub: github_user" +description: |- + Get information on a GitHub user. +--- + +# github\_user + +Use this data source to retrieve information about a GitHub user. + +## Example Usage + +```terraform +# Retrieve information about a GitHub user. +data "github_user" "example" { + username = "example" +} + +# Retrieve information about the currently authenticated user. +data "github_user" "current" { + username = "" +} + +output "current_github_login" { + value = "${data.github_user.current.login}" +} +``` + +## Argument Reference + +* `username` - (Required) The username. Use an empty string `""` to retrieve information about the currently authenticated user. + +## Attributes Reference + +* `id` - the ID of the user. +* `node_id` - the Node ID of the user. +* `login` - the user's login. +* `avatar_url` - the user's avatar URL. +* `gravatar_id` - the user's gravatar ID. +* `site_admin` - whether the user is a GitHub admin. +* `name` - the user's full name. +* `company` - the user's company name. +* `blog` - the user's blog location. +* `location` - the user's location. +* `email` - the user's email. +* `gpg_keys` - list of user's GPG keys. +* `ssh_keys` - list of user's SSH keys. +* `bio` - the user's bio. +* `public_repos` - the number of public repositories. +* `public_gists` - the number of public gists. +* `followers` - the number of followers. +* `following` - the number of following users. +* `created_at` - the creation date. +* `updated_at` - the update date. +* `suspended_at` - the suspended date if the user is suspended. diff --git a/website/docs/d/user_external_identity.html.markdown b/docs/data-sources/user_external_identity.md similarity index 84% rename from website/docs/d/user_external_identity.html.markdown rename to docs/data-sources/user_external_identity.md index 7dbb9bf2fa..45792d3258 100644 --- a/website/docs/d/user_external_identity.html.markdown +++ b/docs/data-sources/user_external_identity.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_user_external_identity" description: |- Get a specific organization member's SAML/SCIM linked external identity @@ -7,12 +6,11 @@ description: |- # github_user_external_identity -Use this data source to retrieve a specific organization member's SAML or SCIM user -attributes. +Use this data source to retrieve a specific organization member's SAML or SCIM user attributes. ## Example Usage -```hcl +```terraform data "github_user_external_identity" "example_user" { username = "example-user" } @@ -27,10 +25,8 @@ The following arguments are supported: ## Attributes Reference - `login` - The username of the GitHub user -- `saml_identity` - An Object containing the user's SAML data. This object will - be empty if the user is not managed by SAML. -- `scim_identity` - An Object contining the user's SCIM data. This object will - be empty if the user is not managed by SCIM. +- `saml_identity` - An Object containing the user's SAML data. This object will be empty if the user is not managed by SAML. +- `scim_identity` - An Object contining the user's SCIM data. This object will be empty if the user is not managed by SCIM. --- @@ -45,7 +41,6 @@ If a user is managed by SAML, the `saml_identity` object will contain: If a user is managed by SCIM, the `scim_identity` object will contain: -- `scim_username` - The member's SCIM Username. (will be empty string if user is - not managed by SCIM) +- `scim_username` - The member's SCIM Username. (will be empty string if user is not managed by SCIM) - `scim_family_name` - The member's SCIM Family Name - `scim_given_name` - The member's SCIM Given Name diff --git a/website/docs/d/users.html.markdown b/docs/data-sources/users.md similarity index 60% rename from website/docs/d/users.html.markdown rename to docs/data-sources/users.md index 81e0f11f7a..52369efddb 100644 --- a/website/docs/d/users.html.markdown +++ b/docs/data-sources/users.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_users" description: |- Get information about multiple GitHub users. @@ -11,7 +10,7 @@ Use this data source to retrieve information about multiple GitHub users at once ## Example Usage -```hcl +```terraform # Retrieve information about multiple GitHub users. data "github_users" "example" { usernames = ["example1", "example2", "example3"] @@ -28,11 +27,11 @@ output "invalid_users" { ## Argument Reference - * `usernames` - (Required) List of usernames. +* `usernames` - (Required) List of usernames. ## Attributes Reference - * `node_ids` - list of Node IDs of users that could be found. - * `logins` - list of logins of users that could be found. - * `emails` - list of the user's publicly visible profile email (will be empty string in case if user decided not to show it). - * `unknown_logins` - list of logins without matching user. +* `node_ids` - list of Node IDs of users that could be found. +* `logins` - list of logins of users that could be found. +* `emails` - list of the user's publicly visible profile email (will be empty string in case if user decided not to show it). +* `unknown_logins` - list of logins without matching user. diff --git a/website/docs/index.html.markdown b/docs/index.md similarity index 91% rename from website/docs/index.html.markdown rename to docs/index.md index 28408af769..e25535295b 100644 --- a/website/docs/index.html.markdown +++ b/docs/index.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "Provider: GitHub" description: |- The GitHub provider is used to interact with GitHub resources. @@ -9,8 +8,7 @@ description: |- The GitHub provider is used to interact with GitHub resources. -The provider allows you to manage your GitHub organization's members and teams easily. -It needs to be configured with the proper credentials before it can be used. +The provider allows you to manage your GitHub organization's members and teams easily. It needs to be configured with the proper credentials before it can be used. Use the navigation to the left to read about the available resources. @@ -52,6 +50,7 @@ resource "github_membership" "membership_for_user_x" { # ... } ``` + ~> **Note:** When upgrading from `hashicorp/github` to `integrations/github`, use `terraform state replace-provider`. Otherwise, Terraform will still require the old provider to interact with the state file. ## Authentication @@ -74,8 +73,7 @@ provider "github" { ### GitHub App Installation -To authenticate using a GitHub App installation, ensure that arguments in the `app_auth` block or the `GITHUB_APP_XXX` environment variables are set. -The `owner` parameter required in this situation. Leaving out will throw a `403 "Resource not accessible by integration"` error. +To authenticate using a GitHub App installation, ensure that arguments in the `app_auth` block or the `GITHUB_APP_XXX` environment variables are set. The `owner` parameter required in this situation. Leaving out will throw a `403 "Resource not accessible by integration"` error. Some API operations may not be available when using a GitHub App installation configuration. For more information, refer to the list of [supported endpoints](https://docs.github.com/en/rest/overview/endpoints-available-for-github-apps). @@ -116,7 +114,7 @@ The following arguments are supported in the `provider` block: * `installation_id` - (Required) This is the ID of the GitHub App installation. It can sourced from the `GITHUB_APP_INSTALLATION_ID` environment variable. * `pem_file` - (Required) This is the contents of the GitHub App private key PEM file. It can also be sourced from the `GITHUB_APP_PEM_FILE` environment variable and may use `\n` instead of actual new lines. -* `write_delay_ms` - (Optional) The number of milliseconds to sleep in between write operations in order to satisfy the GitHub API rate limits. Note that requests to the GraphQL API are implemented as ``POST`` requests under the hood, so this setting affects those calls as well. Defaults to 1000ms or 1 second if not provided. +* `write_delay_ms` - (Optional) The number of milliseconds to sleep in between write operations in order to satisfy the GitHub API rate limits. Note that requests to the GraphQL API are implemented as `POST` requests under the hood, so this setting affects those calls as well. Defaults to 1000ms or 1 second if not provided. * `retry_delay_ms` - (Optional) Amount of time in milliseconds to sleep in between requests to GitHub API after an error response. Defaults to 1000ms or 1 second if not provided, the max_retries must be set to greater than zero. @@ -128,15 +126,11 @@ The following arguments are supported in the `provider` block: Note: If you have a PEM file on disk, you can pass it in via `pem_file = file("path/to/file.pem")`. -For backwards compatibility, if more than one of `owner`, `organization`, -`GITHUB_OWNER` and `GITHUB_ORGANIZATION` are set, the first in this -list takes priority. +For backwards compatibility, if more than one of `owner`, `organization`, `GITHUB_OWNER` and `GITHUB_ORGANIZATION` are set, the first in this list takes priority. 1. Setting `organization` in the GitHub provider configuration. 2. Setting the `GITHUB_ORGANIZATION` environment variable. 3. Setting the `GITHUB_OWNER` environment variable. 4. Setting `owner` in the GitHub provider configuration. -~> It is a bug that `GITHUB_OWNER` takes precedence over `owner`, which may -be fixed in a future major release. For compatibility with future releases, -please set only one of `GITHUB_OWNER` and `owner`. +~> It is a bug that `GITHUB_OWNER` takes precedence over `owner`, which may be fixed in a future major release. For compatibility with future releases, please set only one of `GITHUB_OWNER` and `owner`. diff --git a/website/docs/r/actions_environment_secret.html.markdown b/docs/resources/actions_environment_secret.md similarity index 83% rename from website/docs/r/actions_environment_secret.html.markdown rename to docs/resources/actions_environment_secret.md index 9e8f524abf..00f86d6f89 100644 --- a/website/docs/r/actions_environment_secret.html.markdown +++ b/docs/resources/actions_environment_secret.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_actions_environment_secret" description: |- Creates and manages an Action Secret within a GitHub repository environment @@ -7,21 +6,15 @@ description: |- # github_actions_environment_secret -This resource allows you to create and manage GitHub Actions secrets within your GitHub repository environments. -You must have write access to a repository to use this resource. +This resource allows you to create and manage GitHub Actions secrets within your GitHub repository environments. You must have write access to a repository to use this resource. -Secret values are encrypted using the [Go '/crypto/box' module](https://godoc.org/golang.org/x/crypto/nacl/box) which is -interoperable with [libsodium](https://libsodium.gitbook.io/doc/). Libsodium is used by GitHub to decrypt secret values. +Secret values are encrypted using the [Go '/crypto/box' module](https://godoc.org/golang.org/x/crypto/nacl/box) which is interoperable with [libsodium](https://libsodium.gitbook.io/doc/). Libsodium is used by GitHub to decrypt secret values. -For the purposes of security, the contents of the `plaintext_value` field have been marked as `sensitive` to Terraform, -but it is important to note that **this does not hide it from state files**. You should treat state as sensitive always. -It is also advised that you do not store plaintext values in your code but rather populate the `encrypted_value` -using fields from a resource, data source or variable as, while encrypted in state, these will be easily accessible -in your code. See below for an example of this abstraction. +For the purposes of security, the contents of the `plaintext_value` field have been marked as `sensitive` to Terraform, but it is important to note that **this does not hide it from state files**. You should treat state as sensitive always. It is also advised that you do not store plaintext values in your code but rather populate the `encrypted_value` using fields from a resource, data source or variable as, while encrypted in state, these will be easily accessible in your code. See below for an example of this abstraction. ## Example Usage -```hcl +```terraform resource "github_actions_environment_secret" "example_plaintext" { repository = "example-repo" environment = "example-environment" @@ -38,7 +31,7 @@ resource "github_actions_environment_secret" "example_encrypted" { } ``` -```hcl +```terraform data "github_repository" "example" { full_name = "my-org/repo" } @@ -60,7 +53,7 @@ resource "github_actions_environment_secret" "example_encrypted" { This resource supports using the `lifecycle` `ignore_changes` block on `remote_updated_at` to support use cases where a secret value is created using a placeholder value and then modified after creation outside the scope of Terraform. This approach ensures only the initial placeholder value is referenced in your code and in the resulting state file. -```hcl +```terraform resource "github_actions_environment_secret" "example_allow_drift" { repository = "example-repo" environment = "example-environment" @@ -103,7 +96,7 @@ This resource can be imported using an ID made of the repository name, environme The following import imports a GitHub actions environment secret named `mysecret` for the repo `myrepo` and environment `myenv` to a `github_actions_environment_secret` resource named `example`. -```hcl +```terraform import { to = github_actions_environment_secret.example id = "myrepo:myenv:mysecret" diff --git a/website/docs/r/actions_environment_variable.html.markdown b/docs/resources/actions_environment_variable.md similarity index 93% rename from website/docs/r/actions_environment_variable.html.markdown rename to docs/resources/actions_environment_variable.md index d64141361d..2b7df7051f 100644 --- a/website/docs/r/actions_environment_variable.html.markdown +++ b/docs/resources/actions_environment_variable.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_actions_environment_variable" description: |- Creates and manages an Action variable within a GitHub repository environment @@ -7,12 +6,11 @@ description: |- # github_actions_environment_variable -This resource allows you to create and manage GitHub Actions variables within your GitHub repository environments. -You must have write access to a repository to use this resource. +This resource allows you to create and manage GitHub Actions variables within your GitHub repository environments. You must have write access to a repository to use this resource. ## Example Usage -```hcl +```terraform resource "github_actions_environment_variable" "example" { repository = "example-repo" environment = "example-environment" @@ -21,7 +19,7 @@ resource "github_actions_environment_variable" "example" { } ``` -```hcl +```terraform data "github_repository" "example" { full_name = "my-org/repo" } @@ -62,7 +60,7 @@ This resource can be imported using an ID made of the repository name, environme The following import imports a GitHub actions environment variable named `myvariable` for the repo `myrepo` and environment `myenv` to a `github_actions_environment_variable` resource named `example`. -```hcl +```terraform import { to = github_actions_environment_variable.example id = "myrepo:myenv:myvariable" diff --git a/website/docs/r/actions_hosted_runner.html.markdown b/docs/resources/actions_hosted_runner.md similarity index 97% rename from website/docs/r/actions_hosted_runner.html.markdown rename to docs/resources/actions_hosted_runner.md index a78b0188f7..cec85d39ca 100644 --- a/website/docs/r/actions_hosted_runner.html.markdown +++ b/docs/resources/actions_hosted_runner.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_actions_hosted_runner" description: |- Creates and manages GitHub-hosted runners within a GitHub organization @@ -7,8 +6,7 @@ description: |- # github_actions_hosted_runner -This resource allows you to create and manage GitHub-hosted runners within your GitHub organization. -You must have admin access to an organization to use this resource. +This resource allows you to create and manage GitHub-hosted runners within your GitHub organization. You must have admin access to an organization to use this resource. GitHub-hosted runners are fully managed virtual machines that run your GitHub Actions workflows. Unlike self-hosted runners, GitHub handles the infrastructure, maintenance, and scaling. @@ -16,7 +14,7 @@ GitHub-hosted runners are fully managed virtual machines that run your GitHub Ac ### Basic Usage -```hcl +```terraform resource "github_actions_runner_group" "example" { name = "example-runner-group" visibility = "all" @@ -37,7 +35,7 @@ resource "github_actions_hosted_runner" "example" { ### Advanced Usage with Optional Parameters -```hcl +```terraform resource "github_actions_runner_group" "advanced" { name = "advanced-runner-group" visibility = "selected" @@ -80,7 +78,7 @@ The `timeouts` block allows you to specify timeouts for certain actions: Example: -```hcl +```terraform resource "github_actions_hosted_runner" "example" { name = "example-hosted-runner" @@ -139,6 +137,7 @@ $ terraform import github_actions_hosted_runner.example 123456 ## Getting Available Images and Sizes To get a list of available images: + ```bash curl -H "Authorization: Bearer YOUR_TOKEN" \ -H "Accept: application/vnd.github+json" \ @@ -146,6 +145,7 @@ curl -H "Authorization: Bearer YOUR_TOKEN" \ ``` To get available machine sizes: + ```bash curl -H "Authorization: Bearer YOUR_TOKEN" \ -H "Accept: application/vnd.github+json" \ diff --git a/website/docs/r/actions_organization_oidc_subject_claim_customization_template.html.markdown b/docs/resources/actions_organization_oidc_subject_claim_customization_template.md similarity index 67% rename from website/docs/r/actions_organization_oidc_subject_claim_customization_template.html.markdown rename to docs/resources/actions_organization_oidc_subject_claim_customization_template.md index abbd3841c8..ee31eb182f 100644 --- a/website/docs/r/actions_organization_oidc_subject_claim_customization_template.html.markdown +++ b/docs/resources/actions_organization_oidc_subject_claim_customization_template.md @@ -1,21 +1,18 @@ --- -layout: "github" page_title: "GitHub: github_actions_organization_oidc_subject_claim_customization_template" description: |- -Creates and manages an OpenID Connect subject claim customization template for an organization + Creates and manages an OpenID Connect subject claim customization template for an organization --- # github_actions_organization_oidc_subject_claim_customization_template -This resource allows you to create and manage an OpenID Connect subject claim customization template within a GitHub -organization. +This resource allows you to create and manage an OpenID Connect subject claim customization template within a GitHub organization. -More information on integrating GitHub with cloud providers using OpenID Connect and a list of available claims is -available in the [Actions documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect). +More information on integrating GitHub with cloud providers using OpenID Connect and a list of available claims is available in the [Actions documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect). ## Example Usage -```hcl +```terraform resource "github_actions_organization_oidc_subject_claim_customization_template" "example_template" { include_claim_keys = ["actor", "context", "repository_owner"] } @@ -33,4 +30,4 @@ This resource can be imported using the organization's name. ``` $ terraform import github_actions_organization_oidc_subject_claim_customization_template.test example_organization -``` \ No newline at end of file +``` diff --git a/website/docs/r/actions_organization_permissions.html.markdown b/docs/resources/actions_organization_permissions.md similarity index 69% rename from website/docs/r/actions_organization_permissions.html.markdown rename to docs/resources/actions_organization_permissions.md index 9c9e5670b8..90cbd80664 100644 --- a/website/docs/r/actions_organization_permissions.html.markdown +++ b/docs/resources/actions_organization_permissions.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_actions_organization_permissions" description: |- Creates and manages Actions permissions within a GitHub organization @@ -7,12 +6,11 @@ description: |- # github_actions_organization_permissions -This resource allows you to create and manage GitHub Actions permissions within your GitHub enterprise organizations. -You must have admin access to an organization to use this resource. +This resource allows you to create and manage GitHub Actions permissions within your GitHub enterprise organizations. You must have admin access to an organization to use this resource. ## Example Usage -```hcl +```terraform resource "github_repository" "example" { name = "my-repository" } @@ -35,11 +33,11 @@ resource "github_actions_organization_permissions" "test" { The following arguments are supported: -* `allowed_actions` - (Optional) The permissions policy that controls the actions that are allowed to run. Can be one of: `all`, `local_only`, or `selected`. -* `enabled_repositories` - (Required) The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. -* `allowed_actions_config` - (Optional) Sets the actions that are allowed in an organization. Only available when `allowed_actions` = `selected`. See [Allowed Actions Config](#allowed-actions-config) below for details. +* `allowed_actions` - (Optional) The permissions policy that controls the actions that are allowed to run. Can be one of: `all`, `local_only`, or `selected`. +* `enabled_repositories` - (Required) The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. +* `allowed_actions_config` - (Optional) Sets the actions that are allowed in an organization. Only available when `allowed_actions` = `selected`. See [Allowed Actions Config](#allowed-actions-config) below for details. * `enabled_repositories_config` - (Optional) Sets the list of selected repositories that are enabled for GitHub Actions in an organization. Only available when `enabled_repositories` = `selected`. See [Enabled Repositories Config](#enabled-repositories-config) below for details. -* `sha_pinning_required` - (Optional) Whether pinning to a specific SHA is required for all actions and reusable workflows in the organization. +* `sha_pinning_required` - (Optional) Whether pinning to a specific SHA is required for all actions and reusable workflows in the organization. ### Allowed Actions Config diff --git a/website/docs/r/actions_organization_secret.html.markdown b/docs/resources/actions_organization_secret.md similarity index 83% rename from website/docs/r/actions_organization_secret.html.markdown rename to docs/resources/actions_organization_secret.md index 3531fc0b29..d889ff9a38 100644 --- a/website/docs/r/actions_organization_secret.html.markdown +++ b/docs/resources/actions_organization_secret.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_actions_organization_secret" description: |- Creates and manages an Action Secret within a GitHub organization @@ -7,21 +6,15 @@ description: |- # github_actions_organization_secret -This resource allows you to create and manage GitHub Actions secrets within your GitHub organization. -You must have write access to a repository to use this resource. +This resource allows you to create and manage GitHub Actions secrets within your GitHub organization. You must have write access to a repository to use this resource. -Secret values are encrypted using the [Go '/crypto/box' module](https://godoc.org/golang.org/x/crypto/nacl/box) which is -interoperable with [libsodium](https://libsodium.gitbook.io/doc/). Libsodium is used by GitHub to decrypt secret values. +Secret values are encrypted using the [Go '/crypto/box' module](https://godoc.org/golang.org/x/crypto/nacl/box) which is interoperable with [libsodium](https://libsodium.gitbook.io/doc/). Libsodium is used by GitHub to decrypt secret values. -For the purposes of security, the contents of the `plaintext_value` field have been marked as `sensitive` to Terraform, -but it is important to note that **this does not hide it from state files**. You should treat state as sensitive always. -It is also advised that you do not store plaintext values in your code but rather populate the `encrypted_value` -using fields from a resource, data source or variable as, while encrypted in state, these will be easily accessible -in your code. See below for an example of this abstraction. +For the purposes of security, the contents of the `plaintext_value` field have been marked as `sensitive` to Terraform, but it is important to note that **this does not hide it from state files**. You should treat state as sensitive always. It is also advised that you do not store plaintext values in your code but rather populate the `encrypted_value` using fields from a resource, data source or variable as, while encrypted in state, these will be easily accessible in your code. See below for an example of this abstraction. ## Example Usage -```hcl +```terraform resource "github_actions_organization_secret" "example_plaintext" { secret_name = "example_secret_name" visibility = "all" @@ -35,7 +28,7 @@ resource "github_actions_organization_secret" "example_encrypted" { } ``` -```hcl +```terraform data "github_repository" "repo" { full_name = "my-org/repo" } @@ -59,7 +52,7 @@ resource "github_actions_organization_secret" "example_secret" { This resource supports using the `lifecycle` `ignore_changes` block on `remote_updated_at` to support use cases where a secret value is created using a placeholder value and then modified after creation outside the scope of Terraform. This approach ensures only the initial placeholder value is referenced in your code and in the resulting state file. -```hcl +```terraform resource "github_actions_organization_secret" "example_allow_drift" { secret_name = "example_secret_name" visibility = "all" @@ -101,7 +94,7 @@ This resource can be imported using the secret name as the ID. The following import imports a GitHub actions organization secret named `mysecret` to a `github_actions_organization_secret` resource named `example`. -```hcl +```terraform import { to = github_actions_organization_secret.example id = "mysecret" diff --git a/website/docs/r/actions_organization_secret_repositories.html.markdown b/docs/resources/actions_organization_secret_repositories.md similarity index 91% rename from website/docs/r/actions_organization_secret_repositories.html.markdown rename to docs/resources/actions_organization_secret_repositories.md index 6e822b19c2..6ae8694671 100644 --- a/website/docs/r/actions_organization_secret_repositories.html.markdown +++ b/docs/resources/actions_organization_secret_repositories.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_actions_organization_secret_repositories" description: |- Manages repository allow list for an Actions Secret within a GitHub organization. @@ -7,14 +6,13 @@ description: |- # github_actions_organization_secret_repositories -This resource allows you to manage the repositories allowed to access an actions secret within your GitHub organization. -You must have write access to an organization secret to use this resource. +This resource allows you to manage the repositories allowed to access an actions secret within your GitHub organization. You must have write access to an organization secret to use this resource. This resource is only applicable when `visibility` of the existing organization secret has been set to `selected`. ## Example Usage -```hcl +```terraform resource "github_actions_organization_secret" "example" { secret_name = "mysecret" plaintext_value = "foo" @@ -47,7 +45,7 @@ This resource can be imported using the secret name as the ID. The following import block imports the repositories able to access the actions organization secret named `mysecret` to a `github_actions_organization_secret_repositories` resource named `example`. -```hcl +```terraform import { to = github_actions_organization_secret_repositories.example id = "mysecret" diff --git a/website/docs/r/actions_organization_secret_repository.html.markdown b/docs/resources/actions_organization_secret_repository.md similarity index 92% rename from website/docs/r/actions_organization_secret_repository.html.markdown rename to docs/resources/actions_organization_secret_repository.md index 4876cf0363..581dc3e259 100644 --- a/website/docs/r/actions_organization_secret_repository.html.markdown +++ b/docs/resources/actions_organization_secret_repository.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_actions_organization_secret_repository" description: |- Add access for a repository to an Actions Secret within a GitHub organization. @@ -7,14 +6,13 @@ description: |- # github_actions_organization_secret_repository -This resource adds permission for a repository to use an actions secret within your GitHub organization. -You must have write access to an organization secret to use this resource. +This resource adds permission for a repository to use an actions secret within your GitHub organization. You must have write access to an organization secret to use this resource. This resource is only applicable when `visibility` of the existing organization secret has been set to `selected`. ## Example Usage -```hcl +```terraform resource "github_actions_organization_secret" "example" { secret_name = "mysecret" plaintext_value = "foo" @@ -47,7 +45,7 @@ This resource can be imported using an ID made of the secret name and repository The following import block imports the access of repository ID `123456` for the actions organization secret named `mysecret` to a `github_actions_organization_secret_repository` resource named `example`. -```hcl +```terraform import { to = github_actions_organization_secret_repository.example id = "mysecret:123456" diff --git a/website/docs/r/actions_organization_variable.html.markdown b/docs/resources/actions_organization_variable.md similarity index 93% rename from website/docs/r/actions_organization_variable.html.markdown rename to docs/resources/actions_organization_variable.md index b70b8d9649..7e6561bcc0 100644 --- a/website/docs/r/actions_organization_variable.html.markdown +++ b/docs/resources/actions_organization_variable.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_actions_organization_variable" description: |- Creates and manages an Action variable within a GitHub organization @@ -7,12 +6,11 @@ description: |- # github_actions_organization_variable -This resource allows you to create and manage GitHub Actions variables within your GitHub organization. -You must have write access to a repository to use this resource. +This resource allows you to create and manage GitHub Actions variables within your GitHub organization. You must have write access to a repository to use this resource. ## Example Usage -```hcl +```terraform resource "github_actions_organization_variable" "example_variable" { variable_name = "example_variable_name" visibility = "private" @@ -20,7 +18,7 @@ resource "github_actions_organization_variable" "example_variable" { } ``` -```hcl +```terraform data "github_repository" "repo" { full_name = "my-org/repo" } @@ -55,7 +53,7 @@ This resource can be imported using the variable name as the ID. The following import imports a GitHub actions organization variable named `myvariable`to a `github_actions_organization_variable` resource named `example`. -```hcl +```terraform import { to = github_actions_organization_variable.example id = "myvariable" diff --git a/website/docs/r/actions_organization_variable_repositories.html.markdown b/docs/resources/actions_organization_variable_repositories.md similarity index 91% rename from website/docs/r/actions_organization_variable_repositories.html.markdown rename to docs/resources/actions_organization_variable_repositories.md index 56975c302f..dc2c427bd4 100644 --- a/website/docs/r/actions_organization_variable_repositories.html.markdown +++ b/docs/resources/actions_organization_variable_repositories.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_actions_organization_variable_repositories" description: |- Manages repository allow list for an Actions Variable within a GitHub organization. @@ -7,14 +6,13 @@ description: |- # github_actions_organization_variable_repositories -This resource allows you to manage the repositories allowed to access an actions variable within your GitHub organization. -You must have write access to an organization variable to use this resource. +This resource allows you to manage the repositories allowed to access an actions variable within your GitHub organization. You must have write access to an organization variable to use this resource. This resource is only applicable when `visibility` of the existing organization variable has been set to `selected`. ## Example Usage -```hcl +```terraform resource "github_actions_organization_variable" "example" { variable_name = "myvariable" plaintext_value = "foo" @@ -47,7 +45,7 @@ This resource can be imported using the variable name as the ID. The following import block imports the repositories able to access the actions organization variable named `myvariable` to a `github_actions_organization_variable_repositories` resource named `example`. -```hcl +```terraform import { to = github_actions_organization_variable_repositories.example id = "myvariable" diff --git a/website/docs/r/actions_organization_variable_repository.html.markdown b/docs/resources/actions_organization_variable_repository.md similarity index 92% rename from website/docs/r/actions_organization_variable_repository.html.markdown rename to docs/resources/actions_organization_variable_repository.md index 7fc0992200..cf796c5e6b 100644 --- a/website/docs/r/actions_organization_variable_repository.html.markdown +++ b/docs/resources/actions_organization_variable_repository.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_actions_organization_variable_repository" description: |- Add access for a repository to an Actions Variable within a GitHub organization. @@ -7,14 +6,13 @@ description: |- # github_actions_organization_variable_repository -This resource adds permission for a repository to use an actions variables within your GitHub organization. -You must have write access to an organization variable to use this resource. +This resource adds permission for a repository to use an actions variables within your GitHub organization. You must have write access to an organization variable to use this resource. This resource is only applicable when `visibility` of the existing organization variable has been set to `selected`. ## Example Usage -```hcl +```terraform resource "github_actions_organization_variable" "example" { variable_name = "myvariable" plaintext_value = "foo" @@ -47,7 +45,7 @@ This resource can be imported using an ID made of the variable name and reposito The following import block imports the access of repository ID `123456` for the actions organization variable named `myvariable` to a `github_actions_organization_variable_repository` resource named `example`. -```hcl +```terraform import { to = github_actions_organization_variable_repository.example id = "myvariable:123456" diff --git a/website/docs/r/actions_organization_workflow_permissions.html.markdown b/docs/resources/actions_organization_workflow_permissions.md similarity index 98% rename from website/docs/r/actions_organization_workflow_permissions.html.markdown rename to docs/resources/actions_organization_workflow_permissions.md index ece7f34808..07c4378955 100644 --- a/website/docs/r/actions_organization_workflow_permissions.html.markdown +++ b/docs/resources/actions_organization_workflow_permissions.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_actions_organization_workflow_permissions" description: |- Manages GitHub Actions workflow permissions for a GitHub Organization. @@ -13,7 +12,7 @@ You must have organization admin access to use this resource. ## Example Usage -```hcl +```terraform # Basic workflow permissions configuration resource "github_actions_organization_workflow_permissions" "example" { organization_slug = "my-organization" diff --git a/website/docs/r/actions_repository_access_level.html.markdown b/docs/resources/actions_repository_access_level.md similarity index 82% rename from website/docs/r/actions_repository_access_level.html.markdown rename to docs/resources/actions_repository_access_level.md index c59ee8674b..ba59b7aaf3 100644 --- a/website/docs/r/actions_repository_access_level.html.markdown +++ b/docs/resources/actions_repository_access_level.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_actions_repository_access_level" description: |- Manages Actions and Reusable Workflow access for a GitHub repository @@ -7,12 +6,11 @@ description: |- # github_actions_repository_access_level -This resource allows you to set the access level of a non-public repositories actions and reusable workflows for use in other repositories. -You must have admin access to a repository to use this resource. +This resource allows you to set the access level of a non-public repositories actions and reusable workflows for use in other repositories. You must have admin access to a repository to use this resource. ## Example Usage -```hcl +```terraform resource "github_repository" "example" { name = "my-repository" visibility = "private" @@ -28,8 +26,8 @@ resource "github_actions_repository_access_level" "test" { The following arguments are supported: -* `repository` - (Required) The GitHub repository -* `access_level` - (Required) Where the actions or reusable workflows of the repository may be used. Possible values are `none`, `user`, `organization`, or `enterprise`. +* `repository` - (Required) The GitHub repository +* `access_level` - (Required) Where the actions or reusable workflows of the repository may be used. Possible values are `none`, `user`, `organization`, or `enterprise`. ## Import diff --git a/website/docs/r/actions_repository_oidc_subject_claim_customization_template.html.markdown b/docs/resources/actions_repository_oidc_subject_claim_customization_template.md similarity index 74% rename from website/docs/r/actions_repository_oidc_subject_claim_customization_template.html.markdown rename to docs/resources/actions_repository_oidc_subject_claim_customization_template.md index bf9b28b1d2..885116a031 100644 --- a/website/docs/r/actions_repository_oidc_subject_claim_customization_template.html.markdown +++ b/docs/resources/actions_repository_oidc_subject_claim_customization_template.md @@ -1,17 +1,14 @@ --- -layout: "github" page_title: "GitHub: github_actions_repository_oidc_subject_claim_customization_template" description: |- -Creates and manages an OpenID Connect subject claim customization template for a repository + Creates and manages an OpenID Connect subject claim customization template for a repository --- # github_actions_repository_oidc_subject_claim_customization_template -This resource allows you to create and manage an OpenID Connect subject claim customization template for a GitHub -repository. +This resource allows you to create and manage an OpenID Connect subject claim customization template for a GitHub repository. -More information on integrating GitHub with cloud providers using OpenID Connect and a list of available claims is -available in the [Actions documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect). +More information on integrating GitHub with cloud providers using OpenID Connect and a list of available claims is available in the [Actions documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect). The following table lists the behaviour of `use_default`: @@ -23,7 +20,7 @@ The following table lists the behaviour of `use_default`: ## Example Usage -```hcl +```terraform resource "github_repository" "example" { name = "example-repository" } @@ -39,8 +36,7 @@ resource "github_actions_repository_oidc_subject_claim_customization_template" " The following arguments are supported: -* `use_default` - (Required) Whether to use the default template or not. If `true`, `include_claim_keys` must not -be set. +* `use_default` - (Required) Whether to use the default template or not. If `true`, `include_claim_keys` must not be set. * `include_claim_keys` - (Optional) A list of OpenID Connect claims. ## Import @@ -49,4 +45,4 @@ This resource can be imported using the repository's name. ``` $ terraform import github_actions_repository_oidc_subject_claim_customization_template.test example_repository -``` \ No newline at end of file +``` diff --git a/website/docs/r/actions_repository_permissions.html.markdown b/docs/resources/actions_repository_permissions.md similarity index 74% rename from website/docs/r/actions_repository_permissions.html.markdown rename to docs/resources/actions_repository_permissions.md index f71f0737b4..6c0deb0a23 100644 --- a/website/docs/r/actions_repository_permissions.html.markdown +++ b/docs/resources/actions_repository_permissions.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_actions_repository_permissions" description: |- Enables and manages Actions permissions for a GitHub repository @@ -7,12 +6,11 @@ description: |- # github_actions_repository_permissions -This resource allows you to enable and manage GitHub Actions permissions for a given repository. -You must have admin access to an repository to use this resource. +This resource allows you to enable and manage GitHub Actions permissions for a given repository. You must have admin access to an repository to use this resource. ## Example Usage -```hcl +```terraform resource "github_repository" "example" { name = "my-repository" } @@ -32,11 +30,11 @@ resource "github_actions_repository_permissions" "test" { The following arguments are supported: -* `repository` - (Required) The GitHub repository -* `allowed_actions` - (Optional) The permissions policy that controls the actions that are allowed to run. Can be one of: `all`, `local_only`, or `selected`. -* `enabled` - (Optional) Should GitHub actions be enabled on this repository? +* `repository` - (Required) The GitHub repository +* `allowed_actions` - (Optional) The permissions policy that controls the actions that are allowed to run. Can be one of: `all`, `local_only`, or `selected`. +* `enabled` - (Optional) Should GitHub actions be enabled on this repository? * `allowed_actions_config` - (Optional) Sets the actions that are allowed in an repository. Only available when `allowed_actions` = `selected`. See [Allowed Actions Config](#allowed-actions-config) below for details. -* `sha_pinning_required` - (Optional) Whether pinning to a specific SHA is required for all actions and reusable workflows in the repository. +* `sha_pinning_required` - (Optional) Whether pinning to a specific SHA is required for all actions and reusable workflows in the repository. ### Allowed Actions Config diff --git a/docs/resources/actions_runner_group.md b/docs/resources/actions_runner_group.md new file mode 100644 index 0000000000..a749c6695e --- /dev/null +++ b/docs/resources/actions_runner_group.md @@ -0,0 +1,55 @@ +--- +page_title: "GitHub: github_actions_runner_group" +description: |- + Creates and manages an Actions Runner Group within a GitHub organization +--- + +# github_actions_runner_group + +This resource allows you to create and manage GitHub Actions runner groups within your GitHub enterprise organizations. You must have admin access to an organization to use this resource. + +## Example Usage + +```terraform +resource "github_repository" "example" { + name = "my-repository" +} + +resource "github_actions_runner_group" "example" { + name = github_repository.example.name + visibility = "selected" + selected_repository_ids = [github_repository.example.repo_id] +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) Name of the runner group +* `restricted_to_workflows` - (Optional) If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false. +* `selected_repository_ids` - (Optional) IDs of the repositories which should be added to the runner group +* `selected_workflows` - (Optional) List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true. +* `visibility` - (Optional) Visibility of a runner group. Whether the runner group can include `all`, `selected`, or `private` repositories. A value of `private` is not currently supported due to limitations in the GitHub API. +* `allows_public_repositories` - (Optional) Whether public repositories can be added to the runner group. Defaults to false. + +## Attributes Reference + +* `allows_public_repositories` - Whether public repositories can be added to the runner group +* `default` - Whether this is the default runner group +* `etag` - An etag representing the runner group object +* `inherited` - Whether the runner group is inherited from the enterprise level +* `runners_url` - The GitHub API URL for the runner group's runners +* `selected_repository_ids` - List of repository IDs that can access the runner group +* `selected_repositories_url` - GitHub API URL for the runner group's repositories +* `visibility` - The visibility of the runner group +* `restricted_to_workflows` - If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false. +* `selected_workflows` - List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true. + +## Import + +This resource can be imported using the ID of the runner group: + +``` +$ terraform import github_actions_runner_group.test 7 +``` diff --git a/website/docs/r/actions_secret.html.markdown b/docs/resources/actions_secret.md similarity index 80% rename from website/docs/r/actions_secret.html.markdown rename to docs/resources/actions_secret.md index e7636cc9d3..94ee3eed74 100644 --- a/website/docs/r/actions_secret.html.markdown +++ b/docs/resources/actions_secret.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_actions_secret" description: |- Creates and manages an Action Secret within a GitHub repository @@ -7,21 +6,15 @@ description: |- # github_actions_secret -This resource allows you to create and manage GitHub Actions secrets within your GitHub repositories. -You must have write access to a repository to use this resource. +This resource allows you to create and manage GitHub Actions secrets within your GitHub repositories. You must have write access to a repository to use this resource. -Secret values are encrypted using the [Go '/crypto/box' module](https://godoc.org/golang.org/x/crypto/nacl/box) which is -interoperable with [libsodium](https://libsodium.gitbook.io/doc/). Libsodium is used by GitHub to decrypt secret values. +Secret values are encrypted using the [Go '/crypto/box' module](https://godoc.org/golang.org/x/crypto/nacl/box) which is interoperable with [libsodium](https://libsodium.gitbook.io/doc/). Libsodium is used by GitHub to decrypt secret values. -For the purposes of security, the contents of the `plaintext_value` field have been marked as `sensitive` to Terraform, -but it is important to note that **this does not hide it from state files**. You should treat state as sensitive always. -It is also advised that you do not store plaintext values in your code but rather populate the `encrypted_value` -using fields from a resource, data source or variable as, while encrypted in state, these will be easily accessible -in your code. See below for an example of this abstraction. +For the purposes of security, the contents of the `plaintext_value` field have been marked as `sensitive` to Terraform, but it is important to note that **this does not hide it from state files**. You should treat state as sensitive always. It is also advised that you do not store plaintext values in your code but rather populate the `encrypted_value` using fields from a resource, data source or variable as, while encrypted in state, these will be easily accessible in your code. See below for an example of this abstraction. ## Example Usage -```hcl +```terraform resource "github_actions_secret" "example_plaintext" { repository = "example_repository" secret_name = "example_secret_name" @@ -39,7 +32,7 @@ resource "github_actions_secret" "example_encrypted" { This resource supports using the `lifecycle` `ignore_changes` block on `remote_updated_at` to support use cases where a secret value is created using a placeholder value and then modified after creation outside the scope of Terraform. This approach ensures only the initial placeholder value is referenced in your code and in the resulting state file. -```hcl +```terraform resource "github_actions_secret" "example_allow_drift" { repository = "example_repository" secret_name = "example_secret_name" @@ -81,7 +74,7 @@ This resource can be imported using an ID made of the repository name, and secre The following import imports a GitHub actions secret named `mysecret` for the repo `myrepo` to a `github_actions_secret` resource named `example`. -```hcl +```terraform import { to = github_actions_secret.example id = "myrepo:mysecret" diff --git a/website/docs/r/actions_variable.html.markdown b/docs/resources/actions_variable.md similarity index 91% rename from website/docs/r/actions_variable.html.markdown rename to docs/resources/actions_variable.md index 862e6572db..dd991d6490 100644 --- a/website/docs/r/actions_variable.html.markdown +++ b/docs/resources/actions_variable.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_actions_variable" description: |- Creates and manages an Action variable within a GitHub repository @@ -7,12 +6,11 @@ description: |- # github_actions_variable -This resource allows you to create and manage GitHub Actions variables within your GitHub repositories. -You must have write access to a repository to use this resource. +This resource allows you to create and manage GitHub Actions variables within your GitHub repositories. You must have write access to a repository to use this resource. ## Example Usage -```hcl +```terraform resource "github_actions_variable" "example_variable" { repository = "example_repository" variable_name = "example_variable_name" @@ -42,7 +40,7 @@ This resource can be imported using an ID made of the repository name, and varia The following import imports a GitHub actions variable named `myvariable` for the repo `myrepo` to a `github_actions_variable` resource named `example`. -```hcl +```terraform import { to = github_actions_variable.example id = "myrepo:myvariable" diff --git a/website/docs/r/app_installation_repositories.html.markdown b/docs/resources/app_installation_repositories.md similarity index 66% rename from website/docs/r/app_installation_repositories.html.markdown rename to docs/resources/app_installation_repositories.md index 18132bb544..a57b024e2f 100644 --- a/website/docs/r/app_installation_repositories.html.markdown +++ b/docs/resources/app_installation_repositories.md @@ -1,6 +1,5 @@ --- -layout: "github" -page_title: "GitHub: github_app_installation_repository" +page_title: "GitHub: github_app_installation_repositories" description: |- Manages the associations between app installations and repositories. --- @@ -9,19 +8,15 @@ description: |- ~> **Note**: This resource is not compatible with the GitHub App Installation authentication method. -This resource manages relationships between app installations and repositories -in your GitHub organization or your user account. +This resource manages relationships between app installations and repositories in your GitHub organization or your user account. Creating this resource installs a particular app on multiple repositories. -The app installation and the repositories must all belong to the same -organization or user account on GitHub. Note: you can review your organization's installations -by the following the instructions at this -[link](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/reviewing-your-organizations-installed-integrations) or for your user account at this [link](https://docs.github.com/en/apps/using-github-apps/reviewing-and-modifying-installed-github-apps). +The app installation and the repositories must all belong to the same organization or user account on GitHub. Note: you can review your organization's installations by the following the instructions at this [link](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/reviewing-your-organizations-installed-integrations) or for your user account at this [link](https://docs.github.com/en/apps/using-github-apps/reviewing-and-modifying-installed-github-apps). ## Example Usage -```hcl +```terraform # Create some repositories. resource "github_repository" "some_repo" { name = "some-repo" @@ -42,15 +37,14 @@ resource "github_app_installation_repositories" "some_app_repos" { The following arguments are supported: -* `installation_id` - (Required) The GitHub app installation id. +* `installation_id` - (Required) The GitHub app installation id. * `selected_repositories` - (Required) A list of repository names to install the app on. ~> **Note**: Due to how GitHub implements app installations, apps cannot be installed with no repositories selected. Therefore deleting this resource will leave one repository with the app installed. Manually uninstall the app or set the installation to all repositories via the GUI as after deleting this resource. ## Import -GitHub App Installation Repositories can be imported -using an ID made up of `installation_id`, e.g. +GitHub App Installation Repositories can be imported using an ID made up of `installation_id`, e.g. ``` $ terraform import github_app_installation_repositories.some_app_repos 1234567 diff --git a/website/docs/r/app_installation_repository.html.markdown b/docs/resources/app_installation_repository.md similarity index 60% rename from website/docs/r/app_installation_repository.html.markdown rename to docs/resources/app_installation_repository.md index 4be7ead063..0c7006c52e 100644 --- a/website/docs/r/app_installation_repository.html.markdown +++ b/docs/resources/app_installation_repository.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_app_installation_repository" description: |- Manages the associations between app installations and repositories. @@ -9,19 +8,15 @@ description: |- ~> **Note**: This resource is not compatible with the GitHub App Installation authentication method. -This resource manages relationships between app installations and repositories -in your GitHub organization or your user account. +This resource manages relationships between app installations and repositories in your GitHub organization or your user account. Creating this resource installs a particular app on a particular repository. -The app installation and the repository must both belong to the same -organization or user account on GitHub. Note: you can review your organization's installations -by the following the instructions at this -[link](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/reviewing-your-organizations-installed-integrations) or for your user account at this [link](https://docs.github.com/en/apps/using-github-apps/reviewing-and-modifying-installed-github-apps). +The app installation and the repository must both belong to the same organization or user account on GitHub. Note: you can review your organization's installations by the following the instructions at this [link](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/reviewing-your-organizations-installed-integrations) or for your user account at this [link](https://docs.github.com/en/apps/using-github-apps/reviewing-and-modifying-installed-github-apps). ## Example Usage -```hcl +```terraform # Create a repository. resource "github_repository" "some_repo" { name = "some-repo" @@ -39,12 +34,11 @@ resource "github_app_installation_repository" "some_app_repo" { The following arguments are supported: * `installation_id` - (Required) The GitHub app installation id. -* `repository` - (Required) The repository to install the app on. +* `repository` - (Required) The repository to install the app on. ## Import -GitHub App Installation Repository can be imported -using an ID made up of `installation_id:repository`, e.g. +GitHub App Installation Repository can be imported using an ID made up of `installation_id:repository`, e.g. ``` $ terraform import github_app_installation_repository.terraform_repo 1234567:terraform diff --git a/website/docs/r/branch.html.markdown b/docs/resources/branch.md similarity index 90% rename from website/docs/r/branch.html.markdown rename to docs/resources/branch.md index cb7e570632..62ce9172c4 100644 --- a/website/docs/r/branch.html.markdown +++ b/docs/resources/branch.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_branch" description: |- Creates and manages branches within GitHub repositories. @@ -9,12 +8,11 @@ description: |- This resource allows you to create and manage branches within your repository. -Additional constraints can be applied to ensure your branch is created from -another branch or commit. +Additional constraints can be applied to ensure your branch is created from another branch or commit. ## Example Usage -```hcl +```terraform resource "github_branch" "development" { repository = "example" branch = "development" @@ -59,8 +57,7 @@ Importing github branch into an instance object (when using a for each block to $ terraform import github_branch.terraform["terraform"] terraform:main ``` -Optionally, a source branch may be specified using an ID of `repository:branch:source_branch`. -This is useful for importing branches that do not branch directly off main. +Optionally, a source branch may be specified using an ID of `repository:branch:source_branch`. This is useful for importing branches that do not branch directly off main. ``` $ terraform import github_branch.terraform terraform:feature-branch:dev diff --git a/website/docs/r/branch_default.html.markdown b/docs/resources/branch_default.md similarity index 87% rename from website/docs/r/branch_default.html.markdown rename to docs/resources/branch_default.md index e7d4361046..cc2653d5d4 100644 --- a/website/docs/r/branch_default.html.markdown +++ b/docs/resources/branch_default.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_branch_default" description: |- Provides a GitHub branch default for a given repository. @@ -9,15 +8,15 @@ description: |- Provides a GitHub branch default resource. -This resource allows you to set the default branch for a given repository. +This resource allows you to set the default branch for a given repository. -Note that use of this resource is incompatible with the `default_branch` option of the `github_repository` resource. Using both will result in plans always showing a diff. +Note that use of this resource is incompatible with the `default_branch` option of the `github_repository` resource. Using both will result in plans always showing a diff. ## Example Usage Basic usage: -```hcl +```terraform resource "github_repository" "example" { name = "example" description = "My awesome codebase" @@ -37,7 +36,7 @@ resource "github_branch_default" "default"{ Renaming to a branch that doesn't exist: -```hcl +```terraform resource "github_repository" "example" { name = "example" description = "My awesome codebase" @@ -57,7 +56,7 @@ The following arguments are supported: * `repository` - (Required) The GitHub repository * `branch` - (Required) The branch (e.g. `main`) -* `rename` - (Optional) Indicate if it should rename the branch rather than use an existing branch. Defaults to `false`. +* `rename` - (Optional) Indicate if it should rename the branch rather than use an existing branch. Defaults to `false`. ## Import diff --git a/website/docs/r/branch_protection.html.markdown b/docs/resources/branch_protection.md similarity index 86% rename from website/docs/r/branch_protection.html.markdown rename to docs/resources/branch_protection.md index 842f33b390..2a89274c69 100644 --- a/website/docs/r/branch_protection.html.markdown +++ b/docs/resources/branch_protection.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_branch_protection" description: |- Protects a GitHub branch. @@ -15,7 +14,7 @@ Note: for the `push_allowances` a given user or team must have specific write ac ## Example Usage -```hcl +```terraform # Protect the main branch of the foo repository. Additionally, require that # the "ci/travis" context to be passing and only allow the engineers team merge # to the branch. @@ -112,10 +111,7 @@ The following arguments are supported: * `strict`: (Optional) Require branches to be up to date before merging. Defaults to `false`. * `contexts`: (Optional) The list of status checks to require in order to merge into this branch. No status checks are required by default. -~> Note: This attribute can contain multiple string patterns. -If specified, usual value is the [job name](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idname). Otherwise, the [job id](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idname) is defaulted to. -For workflows that use matrixes, append the matrix name to the value using the following pattern `([, ])`. Matrixes should be specified based on the order of matrix properties in the workflow file. See [GitHub Documentation]("https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#using-a-matrix-strategy") for more information. -For workflows that use reusable workflows, the pattern is ` / `. This can extend multiple levels. +~> Note: This attribute can contain multiple string patterns. If specified, usual value is the [job name](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idname). Otherwise, the [job id](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idname) is defaulted to. For workflows that use matrixes, append the matrix name to the value using the following pattern `([, ])`. Matrixes should be specified based on the order of matrix properties in the workflow file. See [GitHub Documentation]("https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#using-a-matrix-strategy") for more information. For workflows that use reusable workflows, the pattern is ` / `. This can extend multiple levels. ### Required Pull Request Reviews @@ -126,9 +122,8 @@ For workflows that use reusable workflows, the pattern is ` Note: This attribute can contain multiple string patterns. -If specified, usual value is the [job name](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idname). Otherwise, the [job id](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idname) is defaulted to. -For workflows that use matrixes, append the matrix name to the value using the following pattern `([, ])`. Matrixes should be specified based on the order of matrix properties in the workflow file. See [GitHub Documentation]("https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#using-a-matrix-strategy") for more information. -For workflows that use reusable workflows, the pattern is ` / `. This can extend multiple levels. +~> Note: This attribute can contain multiple string patterns. If specified, usual value is the [job name](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idname). Otherwise, the [job id](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idname) is defaulted to. For workflows that use matrixes, append the matrix name to the value using the following pattern `([, ])`. Matrixes should be specified based on the order of matrix properties in the workflow file. See [GitHub Documentation]("https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#using-a-matrix-strategy") for more information. For workflows that use reusable workflows, the pattern is ` / `. This can extend multiple levels. * `checks`: (Optional) The list of status checks to require in order to merge into this branch. No status checks are required by default. Checks should be strings containing the context and app_id like so "context:app_id". @@ -112,21 +108,19 @@ For workflows that use reusable workflows, the pattern is ` **Note:** When a repository is archived, Terraform will skip deletion of issue labels to avoid API errors, as archived repositories are read-only. The labels will be removed from Terraform state without attempting to delete them from GitHub. ## Example Usage -```hcl +```terraform # Create a new, red colored label resource "github_issue_label" "test_repo" { repository = "test-repo" diff --git a/website/docs/r/issue_labels.html.markdown b/docs/resources/issue_labels.md similarity index 97% rename from website/docs/r/issue_labels.html.markdown rename to docs/resources/issue_labels.md index 74e32fa29e..0614668b19 100644 --- a/website/docs/r/issue_labels.html.markdown +++ b/docs/resources/issue_labels.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_issue_labels" description: |- Provides GitHub issue labels resource. @@ -9,8 +8,7 @@ description: |- Provides GitHub issue labels resource. -This resource allows you to create and manage issue labels within your -GitHub organization. +This resource allows you to create and manage issue labels within your GitHub organization. ~> Note: github_issue_labels cannot be used in conjunction with github_issue_label or they will fight over what your policy should be. @@ -22,7 +20,7 @@ If you change the case of a label's name, its' color, or description, this resou ## Example Usage -```hcl +```terraform # Create a new, red colored label resource "github_issue_labels" "test_repo" { repository = "test-repo" diff --git a/website/docs/r/membership.html.markdown b/docs/resources/membership.md similarity index 59% rename from website/docs/r/membership.html.markdown rename to docs/resources/membership.md index 898431cf10..640891c266 100644 --- a/website/docs/r/membership.html.markdown +++ b/docs/resources/membership.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_membership" description: |- Provides a GitHub membership resource. @@ -9,13 +8,11 @@ description: |- Provides a GitHub membership resource. -This resource allows you to add/remove users from your organization. When applied, -an invitation will be sent to the user to become part of the organization. When -destroyed, either the invitation will be cancelled or the user will be removed. +This resource allows you to add/remove users from your organization. When applied, an invitation will be sent to the user to become part of the organization. When destroyed, either the invitation will be cancelled or the user will be removed. ## Example Usage -```hcl +```terraform # Add a user to the organization resource "github_membership" "membership_for_some_user" { username = "SomeUser" @@ -28,14 +25,8 @@ resource "github_membership" "membership_for_some_user" { The following arguments are supported: * `username` - (Required) The user to add to the organization. -* `role` - (Optional) The role of the user within the organization. - Must be one of `member` or `admin`. Defaults to `member`. - `admin` role represents the `owner` role available via GitHub UI. -* `downgrade_on_destroy` - (Optional) Defaults to `false`. If set to true, - when this resource is destroyed, the member will not be removed - from the organization. Instead, the member's role will be - downgraded to 'member'. - +* `role` - (Optional) The role of the user within the organization. Must be one of `member` or `admin`. Defaults to `member`. `admin` role represents the `owner` role available via GitHub UI. +* `downgrade_on_destroy` - (Optional) Defaults to `false`. If set to true, when this resource is destroyed, the member will not be removed from the organization. Instead, the member's role will be downgraded to 'member'. ## Import diff --git a/website/docs/r/organization_block.html.markdown b/docs/resources/organization_block.md similarity index 96% rename from website/docs/r/organization_block.html.markdown rename to docs/resources/organization_block.md index 333b1ca48b..479faaf314 100644 --- a/website/docs/r/organization_block.html.markdown +++ b/docs/resources/organization_block.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_organization_block" description: |- Creates and manages blocks for GitHub organizations @@ -11,7 +10,7 @@ This resource allows you to create and manage blocks for GitHub organizations. ## Example Usage -```hcl +```terraform resource "github_organization_block" "example" { username = "paultyng" } diff --git a/website/docs/r/organization_custom_properties.html.markdown b/docs/resources/organization_custom_properties.md similarity index 98% rename from website/docs/r/organization_custom_properties.html.markdown rename to docs/resources/organization_custom_properties.md index 41ec8d85a9..f170349481 100644 --- a/website/docs/r/organization_custom_properties.html.markdown +++ b/docs/resources/organization_custom_properties.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_organization_custom_properties" description: |- Creates and manages custom properties for a GitHub organization @@ -13,7 +12,7 @@ Custom properties enable you to add metadata to repositories within your organiz ## Example Usage -```hcl +```terraform resource "github_organization_custom_properties" "environment" { property_name = "environment" value_type = "single_select" @@ -32,7 +31,7 @@ resource "github_organization_custom_properties" "environment" { This example shows how to allow repository administrators to edit the property values: -```hcl +```terraform resource "github_organization_custom_properties" "team_contact" { property_name = "team_contact" value_type = "string" @@ -44,7 +43,7 @@ resource "github_organization_custom_properties" "team_contact" { ## Example Usage - Text Property -```hcl +```terraform resource "github_organization_custom_properties" "owner" { property_name = "owner" value_type = "string" @@ -55,7 +54,7 @@ resource "github_organization_custom_properties" "owner" { ## Example Usage - Boolean Property -```hcl +```terraform resource "github_organization_custom_properties" "archived" { property_name = "archived" value_type = "true_false" @@ -95,4 +94,4 @@ Organization custom properties can be imported using the property name: ``` terraform import github_organization_custom_properties.environment environment -``` \ No newline at end of file +``` diff --git a/website/docs/r/organization_custom_role.html.markdown b/docs/resources/organization_custom_role.md similarity index 87% rename from website/docs/r/organization_custom_role.html.markdown rename to docs/resources/organization_custom_role.md index 9ee1c29f3a..97fd1d5b32 100644 --- a/website/docs/r/organization_custom_role.html.markdown +++ b/docs/resources/organization_custom_role.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_organization_custom_role" description: |- Creates and manages a custom role in a GitHub Organization for use in repositories. @@ -15,7 +14,7 @@ This resource allows you to create and manage custom roles in a GitHub Organizat ## Example Usage -```hcl +```terraform resource "github_organization_custom_role" "example" { name = "example" description = "Example custom role that uses the read role as its base" @@ -61,8 +60,7 @@ The following additional attributes are exported: ## Import -Custom roles can be imported using the `id` of the role. -The `id` of the custom role can be found using the [list custom roles in an organization](https://docs.github.com/en/enterprise-cloud@latest/rest/orgs/custom-roles#list-custom-repository-roles-in-an-organization) API. +Custom roles can be imported using the `id` of the role. The `id` of the custom role can be found using the [list custom roles in an organization](https://docs.github.com/en/enterprise-cloud@latest/rest/orgs/custom-roles#list-custom-repository-roles-in-an-organization) API. ``` $ terraform import github_organization_custom_role.example 1234 diff --git a/website/docs/r/organization_project.html.markdown b/docs/resources/organization_project.md similarity index 97% rename from website/docs/r/organization_project.html.markdown rename to docs/resources/organization_project.md index 447588d034..40d0a587b2 100644 --- a/website/docs/r/organization_project.html.markdown +++ b/docs/resources/organization_project.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_organization_project" description: |- Creates and manages projects for GitHub organizations @@ -13,7 +12,7 @@ This resource allows you to create and manage projects for GitHub organization. ## Example Usage -```hcl +```terraform resource "github_organization_project" "project" { name = "A Organization Project" body = "This is a organization project." diff --git a/website/docs/r/organization_repository_role.html.markdown b/docs/resources/organization_repository_role.md similarity index 88% rename from website/docs/r/organization_repository_role.html.markdown rename to docs/resources/organization_repository_role.md index 4faa56d1a8..06f06d1da6 100644 --- a/website/docs/r/organization_repository_role.html.markdown +++ b/docs/resources/organization_repository_role.md @@ -1,11 +1,10 @@ --- -layout: "github" -page_title: "GitHub: github_organization_repository_role Resource" +page_title: "GitHub: github_organization_repository_role" description: |- Manage a custom organization repository role. --- -# github_organization_repository_role (Resource) +# github_organization_repository_role Manage a custom organization repository role. diff --git a/website/docs/r/organization_role.html.markdown b/docs/resources/organization_role.md similarity index 91% rename from website/docs/r/organization_role.html.markdown rename to docs/resources/organization_role.md index f57d9f776f..5ba037cadc 100644 --- a/website/docs/r/organization_role.html.markdown +++ b/docs/resources/organization_role.md @@ -1,11 +1,10 @@ --- -layout: "github" -page_title: "GitHub: github_organization_role Resource" +page_title: "GitHub: github_organization_role" description: |- Manage a custom organization role. --- -# github_organization_role (Resource) +# github_organization_role Manage a custom organization role. diff --git a/website/docs/r/organization_role_team.html.markdown b/docs/resources/organization_role_team.md similarity index 89% rename from website/docs/r/organization_role_team.html.markdown rename to docs/resources/organization_role_team.md index e5db0064b6..a216eeacd2 100644 --- a/website/docs/r/organization_role_team.html.markdown +++ b/docs/resources/organization_role_team.md @@ -1,11 +1,10 @@ --- -layout: "github" -page_title: "GitHub: github_organization_role_team Resource" +page_title: "GitHub: github_organization_role_team" description: |- Manage an association between an organization role and a team. --- -# github_organization_role_team (Resource) +# github_organization_role_team Manage an association between an organization role and a team. diff --git a/website/docs/r/organization_role_team_assignment.html.markdown b/docs/resources/organization_role_team_assignment.md similarity index 86% rename from website/docs/r/organization_role_team_assignment.html.markdown rename to docs/resources/organization_role_team_assignment.md index f2916ebfb1..04f1da15e2 100644 --- a/website/docs/r/organization_role_team_assignment.html.markdown +++ b/docs/resources/organization_role_team_assignment.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_organization_role_team_assignment" description: |- Manages the associations between teams and organization roles. @@ -9,17 +8,15 @@ description: |- ~> **Note:** This resource is deprecated, please use the `github_organization_role_team` resource instead. -This resource manages relationships between teams and organization roles -in your GitHub organization. This works on predefined roles, and custom roles, where the latter is an Enterprise feature. +This resource manages relationships between teams and organization roles in your GitHub organization. This works on predefined roles, and custom roles, where the latter is an Enterprise feature. Creating this resource assigns the role to a team. -The organization role and team must both belong to the same organization -on GitHub. +The organization role and team must both belong to the same organization on GitHub. ## Example Usage -```hcl +```terraform resource "github_team" "test-team" { name = "test-team" } diff --git a/website/docs/r/organization_role_user.html.markdown b/docs/resources/organization_role_user.md similarity index 84% rename from website/docs/r/organization_role_user.html.markdown rename to docs/resources/organization_role_user.md index c2a92c8a87..854d53e280 100644 --- a/website/docs/r/organization_role_user.html.markdown +++ b/docs/resources/organization_role_user.md @@ -1,11 +1,10 @@ --- -layout: "github" -page_title: "GitHub: github_organization_role_user Resource" +page_title: "GitHub: github_organization_role_user" description: |- Manage an association between an organization role and a user. --- -# github_organization_role_user (Resource) +# github_organization_role_user Manage an association between an organization role and a user. diff --git a/website/docs/r/organization_ruleset.html.markdown b/docs/resources/organization_ruleset.md similarity index 94% rename from website/docs/r/organization_ruleset.html.markdown rename to docs/resources/organization_ruleset.md index 5a7e10d506..245b26cb27 100644 --- a/website/docs/r/organization_ruleset.html.markdown +++ b/docs/resources/organization_ruleset.md @@ -1,11 +1,10 @@ --- -layout: "github" page_title: "github_organization_ruleset Resource - terraform-provider-github" description: |- Creates a GitHub organization ruleset. --- -# github_organization_ruleset (Resource) +# github_organization_ruleset Creates a GitHub organization ruleset. @@ -13,7 +12,7 @@ This resource allows you to create and manage rulesets on the organization level ## Example Usage -```hcl +```terraform resource "github_organization_ruleset" "example" { name = "example" target = "branch" @@ -115,7 +114,7 @@ resource "github_organization_ruleset" "example_push" { - `conditions` - (Optional) (Block List, Max: 1) Parameters for an organization ruleset condition. For `branch` and `tag` targets, `ref_name` is required alongside one of `repository_name` or `repository_id`. For `push` targets, `ref_name` must NOT be set - only `repository_name` or `repository_id` should be used. (see [below for nested schema](#conditions)) -#### Rules #### +#### Rules The `rules` block supports the following: @@ -161,7 +160,7 @@ The `rules` block supports the following: - `update` - (Optional) (Boolean) Only allow users with bypass permission to update matching refs. -#### rules.branch_name_pattern #### +#### rules.branch_name_pattern - `operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. @@ -171,7 +170,7 @@ The `rules` block supports the following: - `negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches. -#### rules.commit_author_email_pattern #### +#### rules.commit_author_email_pattern - `operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. @@ -181,7 +180,7 @@ The `rules` block supports the following: - `negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches. -#### rules.commit_message_pattern #### +#### rules.commit_message_pattern - `operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. @@ -191,7 +190,7 @@ The `rules` block supports the following: - `negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches. -#### rules.committer_email_pattern #### +#### rules.committer_email_pattern - `operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. @@ -201,7 +200,7 @@ The `rules` block supports the following: - `negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches. -#### rules.pull_request #### +#### rules.pull_request - `allowed_merge_methods` - (Optional) (List of String, Min: 1) Array of merge methods to be allowed. Allowed values include `merge`, `squash`, and `rebase`. At least one must be enabled. - `dismiss_stale_reviews_on_push` - (Optional) (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. @@ -214,7 +213,7 @@ The `rules` block supports the following: - `required_review_thread_resolution` - (Optional) (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. -#### rules.copilot_code_review #### +#### rules.copilot_code_review - `review_on_push` - (Optional) (Boolean) Copilot automatically reviews each new push to the pull request. Defaults to `false`. @@ -224,7 +223,7 @@ The `rules` block supports the following: - `required_reviewers` - (Optional) (Block List) Require specific reviewers to approve pull requests. Note: This feature is in beta. (see [below for nested schema](#rulespull_requestrequired_reviewers)) -#### rules.pull_request.required_reviewers #### +#### rules.pull_request.required_reviewers - `reviewer` - (Required) (Block List, Max: 1) The reviewer that must review matching files. (see [below for nested schema](#rulespull_requestrequired_reviewersreviewer)) @@ -232,13 +231,13 @@ The `rules` block supports the following: - `minimum_approvals` - (Required) (Number) Minimum number of approvals required from this reviewer. Set to 0 to make approval optional. -#### rules.pull_request.required_reviewers.reviewer #### +#### rules.pull_request.required_reviewers.reviewer - `id` - (Required) (Number) The ID of the reviewer (Team ID). - `type` - (Required) (String) The type of reviewer. Currently only `Team` is supported. -#### rules.required_status_checks #### +#### rules.required_status_checks - `required_check` - (Required) (Block Set, Min: 1) Status checks that are required. Several can be defined. (see [below for nested schema](#rulesrequired_status_checksrequired_check)) @@ -246,7 +245,7 @@ The `rules` block supports the following: - `do_not_enforce_on_create` - (Optional) (Boolean) Allow repositories and branches to be created if a check would otherwise prohibit it. Defaults to `false`. -#### required_status_checks.required_check #### +#### required_status_checks.required_check - `context` - (Required) (String) The status check context name that must be present on the commit. @@ -254,13 +253,13 @@ The `rules` block supports the following: - `do_not_enforce_on_create` - (Optional) (Boolean) Allow repositories and branches to be created if a check would otherwise prohibit it. Defaults to `false`. -#### rules.required_workflows #### +#### rules.required_workflows - `do_not_enforce_on_create` - (Optional) (Boolean) Allow repositories and branches to be created if a check would otherwise prohibit it. Defaults to `false`. - `required_workflow` - (Required) (Block Set, Min: 1) Actions workflows that are required. Multiple can be defined. (see [below for nested schema](#rulesrequired_workflowsrequired_workflow)) -#### rules.required_workflows.required_workflow #### +#### rules.required_workflows.required_workflow - `repository_id` - (Required) (Number) The ID of the repository. Names, full names and repository URLs are not supported. @@ -268,11 +267,11 @@ The `rules` block supports the following: - `ref` - (Optional) (String) The optional ref from which to fetch the workflow. Defaults to `master`. -#### rules.required_code_scanning #### +#### rules.required_code_scanning - `required_code_scanning_tool` - (Required) (Block Set, Min: 1) Actions code scanning tools that are required. Multiple can be defined. (see [below for nested schema](#rulesrequired_code_scanningrequired_code_scanning_tool)) -#### rules.required_code_scanning.required_code_scanning_tool #### +#### rules.required_code_scanning.required_code_scanning_tool - `alerts_threshold` - (Required) (String) The severity level at which code scanning results that raise alerts block a reference update. Can be one of: `none`, `errors`, `errors_and_warnings`, `all`. @@ -280,7 +279,7 @@ The `rules` block supports the following: - `tool` - (Required) (String) The name of a code scanning tool. -#### rules.tag_name_pattern #### +#### rules.tag_name_pattern - `operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. @@ -290,23 +289,23 @@ The `rules` block supports the following: - `negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches. -#### rules.file_path_restriction #### +#### rules.file_path_restriction - `restricted_file_paths` - (Required) (Block Set, Min: 1) The file paths that are restricted from being pushed to the commit graph. -#### rules.max_file_size #### +#### rules.max_file_size - `max_file_size` - (Required) (Integer) The maximum allowed size, in megabytes (MB), of a file. Valid range is 1-100 MB. -#### rules.max_file_path_length #### +#### rules.max_file_path_length - `max_file_path_length` - (Required) (Integer) The maximum number of characters allowed in file paths. -#### rules.file_extension_restriction #### +#### rules.file_extension_restriction - `restricted_file_extensions` - (Required) (Block Set, Min: 1) The file extensions that are restricted from being pushed to the commit graph. -#### bypass_actors #### +#### bypass_actors - `actor_id` - (Optional) (Number) The ID of the actor that can bypass a ruleset. Some actor types such as `DeployKey` do not have an ID. @@ -318,11 +317,11 @@ The `rules` block supports the following: - `OrganizationAdmin` -> `1` - `RepositoryRole` (This is the actor type, the following are the base repository roles and their associated IDs.) - - `maintain` -> `2` - - `write` -> `4` - - `admin` -> `5` + - `maintain` -> `2` + - `write` -> `4` + - `admin` -> `5` -#### conditions #### +#### conditions - `ref_name` - (Optional) (Block List, Max: 1) Required for `branch` and `tag` targets. Must NOT be set for `push` targets. (see [below for nested schema](#conditionsref_name)) - `repository_id` (Optional) (List of Number) The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repository_name`. @@ -332,13 +331,13 @@ One of `repository_id` and `repository_name` must be set for the rule to target ~> **Note:** For `push` targets, do not include `ref_name` in conditions. Push rulesets operate on file content, not on refs. -#### conditions.ref_name #### +#### conditions.ref_name - `exclude` - (Required) (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. - `include` - (Required) (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. -#### conditions.repository_name #### +#### conditions.repository_name - `exclude` - (Required) (List of String) Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match. - `include` - (Required) (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. diff --git a/website/docs/r/organization_security_manager.html.markdown b/docs/resources/organization_security_manager.md similarity index 97% rename from website/docs/r/organization_security_manager.html.markdown rename to docs/resources/organization_security_manager.md index 1696309017..b13fe99aaf 100644 --- a/website/docs/r/organization_security_manager.html.markdown +++ b/docs/resources/organization_security_manager.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_organization_security_manager" description: |- Manages the Security manager teams for a GitHub Organization. @@ -11,7 +10,7 @@ description: |- ## Example Usage -```hcl +```terraform resource "github_team" "some_team" { name = "SomeTeam" description = "Some cool team" diff --git a/website/docs/r/organization_settings.html.markdown b/docs/resources/organization_settings.md similarity index 95% rename from website/docs/r/organization_settings.html.markdown rename to docs/resources/organization_settings.md index c8a4db54a6..eb4e58bdb9 100644 --- a/website/docs/r/organization_settings.html.markdown +++ b/docs/resources/organization_settings.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_organization_settings" description: |- Creates and manages settings for a GitHub Organization. @@ -11,7 +10,7 @@ This resource allows you to create and manage settings for a GitHub Organization ## Example Usage -```hcl +```terraform resource "github_organization_settings" "test" { billing_email = "test@example.com" company = "Test Company" @@ -71,8 +70,7 @@ The following arguments are supported: * `dependabot_security_updates_enabled_for_new_repositories` - (Optional) Whether or not dependabot security updates are enabled for new repositories. Defaults to `false`. * `dependency_graph_enabled_for_new_repositories` - (Optional) Whether or not dependency graph is enabled for new repositories. Defaults to `false`. * `secret_scanning_enabled_for_new_repositories` - (Optional) Whether or not secret scanning is enabled for new repositories. Defaults to `false`. -* `secret_scanning_push_protection_enabled_for_new_repositories` - (Optional) Whether or not secret scanning push protection is enabled for new repositories. Defaults to `false`. - +* `secret_scanning_push_protection_enabled_for_new_repositories` - (Optional) Whether or not secret scanning push protection is enabled for new repositories. Defaults to `false`. ## Attributes Reference @@ -80,11 +78,9 @@ The following additional attributes are exported: * `id` - The ID of the organization settings. - ## Import -Organization settings can be imported using the `id` of the organization. -The `id` of the organization can be found using the [get an organization](https://docs.github.com/en/rest/orgs/orgs#get-an-organization) API. +Organization settings can be imported using the `id` of the organization. The `id` of the organization can be found using the [get an organization](https://docs.github.com/en/rest/orgs/orgs#get-an-organization) API. ``` $ terraform import github_organization_settings.test 123456789 diff --git a/website/docs/r/organization_webhook.html.markdown b/docs/resources/organization_webhook.md similarity index 88% rename from website/docs/r/organization_webhook.html.markdown rename to docs/resources/organization_webhook.md index 8bacb1ac3e..85df636e76 100644 --- a/website/docs/r/organization_webhook.html.markdown +++ b/docs/resources/organization_webhook.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_organization_webhook" description: |- Creates and manages webhooks for GitHub organizations @@ -11,7 +10,7 @@ This resource allows you to create and manage webhooks for GitHub organization. ## Example Usage -```hcl +```terraform resource "github_organization_webhook" "foo" { name = "web" @@ -47,8 +46,7 @@ The following additional attributes are exported: ## Import -Organization webhooks can be imported using the `id` of the webhook. -The `id` of the webhook can be found in the URL of the webhook. For example, `"https://github.com/organizations/foo-org/settings/hooks/123456789"`. +Organization webhooks can be imported using the `id` of the webhook. The `id` of the webhook can be found in the URL of the webhook. For example, `"https://github.com/organizations/foo-org/settings/hooks/123456789"`. ``` $ terraform import github_organization_webhook.terraform 123456789 diff --git a/website/docs/r/project_card.html.markdown b/docs/resources/project_card.md similarity index 92% rename from website/docs/r/project_card.html.markdown rename to docs/resources/project_card.md index 619d49ad09..842e0013ff 100644 --- a/website/docs/r/project_card.html.markdown +++ b/docs/resources/project_card.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_project_card" description: |- Creates and manages project cards for GitHub projects @@ -13,7 +12,7 @@ This resource allows you to create and manage cards for GitHub projects. ## Example Usage -```hcl +```terraform resource "github_organization_project" "project" { name = "An Organization Project" body = "This is an organization project." @@ -29,9 +28,10 @@ resource "github_project_card" "card" { note = "## Unaccepted 👇" } ``` + ## Example Usage adding an Issue to a Project -```hcl +```terraform resource "github_repository" "test" { name = "myrepo" has_projects = true @@ -74,8 +74,7 @@ The following arguments are supported: * `content_type` - (Optional) Must be either `Issue` or `PullRequest` -**Remarks:** You must either set the `note` attribute or both `content_id` and `content_type`. -See [note example](#example-usage) or [issue example](#example-usage-adding-an-issue-to-a-project) for more information. +**Remarks:** You must either set the `note` attribute or both `content_id` and `content_type`. See [note example](#example-usage) or [issue example](#example-usage-adding-an-issue-to-a-project) for more information. ## Import diff --git a/website/docs/r/project_column.html.markdown b/docs/resources/project_column.md similarity index 97% rename from website/docs/r/project_column.html.markdown rename to docs/resources/project_column.md index cdb972b0d6..2dd32971ae 100644 --- a/website/docs/r/project_column.html.markdown +++ b/docs/resources/project_column.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_project_column" description: |- Creates and manages project columns for GitHub projects @@ -13,7 +12,7 @@ This resource allows you to create and manage columns for GitHub projects. ## Example Usage -```hcl +```terraform resource "github_organization_project" "project" { name = "A Organization Project" body = "This is an organization project." diff --git a/website/docs/r/release.html.markdown b/docs/resources/release.md similarity index 97% rename from website/docs/r/release.html.markdown rename to docs/resources/release.md index b03067a596..da1d208311 100644 --- a/website/docs/r/release.html.markdown +++ b/docs/resources/release.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_release" description: |- Creates and manages releases within a single GitHub repository @@ -7,12 +6,11 @@ description: |- # github_release -This resource allows you to create and manage a release in a specific -GitHub repository. +This resource allows you to create and manage a release in a specific GitHub repository. ## Example Usage -```hcl +```terraform resource "github_repository" "repo" { name = "repo" description = "GitHub repo managed by Terraform" @@ -28,7 +26,7 @@ resource "github_release" "example" { ## Example Usage on Non-Default Branch -```hcl +```terraform resource "github_repository" "example" { name = "repo" auto_init = true @@ -81,7 +79,7 @@ The following additional attributes are exported: * `published_at` - This is the date when the release was published. This will be empty if the release is a draft. -* `html_url` - URL of the release in GitHub. +* `html_url` - URL of the release in GitHub. * `url` - URL that can be provided to API calls that reference this release. diff --git a/website/docs/r/repository.html.markdown b/docs/resources/repository.md similarity index 96% rename from website/docs/r/repository.html.markdown rename to docs/resources/repository.md index 157fd01caa..9dc4d894d2 100644 --- a/website/docs/r/repository.html.markdown +++ b/docs/resources/repository.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repository" description: |- Creates and manages repositories within GitHub organizations or personal accounts @@ -7,14 +6,13 @@ description: |- # github_repository -This resource allows you to create and manage repositories within your -GitHub organization or personal account. +This resource allows you to create and manage repositories within your GitHub organization or personal account. ~> **Note** When used with GitHub App authentication, even GET requests must have the `contents:write` permission. Without it, the following arguments will be ignored, leading to unexpected behavior and confusing diffs: `allow_merge_commit`, `allow_squash_merge`, `allow_rebase_merge`, `merge_commit_title`, `merge_commit_message`, `squash_merge_commit_title` and `squash_merge_commit_message`. ## Example Usage -```hcl +```terraform resource "github_repository" "example" { name = "example" description = "My awesome codebase" @@ -31,7 +29,7 @@ resource "github_repository" "example" { ## Example Usage with GitHub Pages Enabled -```hcl +```terraform resource "github_repository" "example" { name = "example" description = "My awesome web page" @@ -49,7 +47,7 @@ resource "github_repository" "example" { ## Example Usage with Repository Forking -```hcl +```terraform resource "github_repository" "forked_repo" { name = "forked-repository" description = "This is a fork of another repository" @@ -75,20 +73,17 @@ The following arguments are supported: * `source_repo` - (Optional) The name of the repository to fork. Required when `fork` is `true`. -* `private` - (Optional) Set to `true` to create a private repository. - Repositories are created as public (e.g. open source) by default. +* `private` - (Optional) Set to `true` to create a private repository. Repositories are created as public (e.g. open source) by default. * `visibility` - (Optional) Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be `internal`. The `visibility` parameter overrides the `private` parameter. -* `has_issues` - (Optional) Set to `true` to enable the GitHub Issues features - on the repository. +* `has_issues` - (Optional) Set to `true` to enable the GitHub Issues features on the repository. * `has_discussions` - (Optional) Set to `true` to enable GitHub Discussions on the repository. Defaults to `false`. * `has_projects` - (Optional) Set to `true` to enable the GitHub Projects features on the repository. Per the GitHub [documentation](https://developer.github.com/v3/repos/#create) when in an organization that has disabled repository projects it will default to `false` and will otherwise default to `true`. If you specify `true` when it has been disabled it will return an error. -* `has_wiki` - (Optional) Set to `true` to enable the GitHub Wiki features on - the repository. +* `has_wiki` - (Optional) Set to `true` to enable the GitHub Wiki features on the repository. * `is_template` - (Optional) Set to `true` to tell GitHub that this is a template repository. @@ -122,9 +117,7 @@ The following arguments are supported: * `license_template` - (Optional) Use the [name of the template](https://github.com/github/choosealicense.com/tree/gh-pages/_licenses) without the extension. For example, "mit" or "mpl-2.0". -* `default_branch` - (Optional) (Deprecated: Use `github_branch_default` resource instead) The name of the default branch of the repository. **NOTE:** This can only be set after a repository has already been created, -and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the -initial repository creation and create the target branch inside of the repository prior to setting this attribute. +* `default_branch` - (Optional) (Deprecated: Use `github_branch_default` resource instead) The name of the default branch of the repository. **NOTE:** This can only be set after a repository has already been created, and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the initial repository creation and create the target branch inside of the repository prior to setting this attribute. * `archived` - (Optional) Specifies if the repository should be archived. Defaults to `false`. **NOTE** Currently, the API does not support unarchiving. diff --git a/website/docs/r/repository_autolink_reference.html.markdown b/docs/resources/repository_autolink_reference.md similarity index 98% rename from website/docs/r/repository_autolink_reference.html.markdown rename to docs/resources/repository_autolink_reference.md index 1fbebc5b22..42e28ef0f5 100644 --- a/website/docs/r/repository_autolink_reference.html.markdown +++ b/docs/resources/repository_autolink_reference.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repository_autolink_reference" description: |- Creates and manages autolink references for a single repository @@ -11,7 +10,7 @@ This resource allows you to create and manage an autolink reference for a single ## Example Usage -```hcl +```terraform resource "github_repository" "repo" { name = "my-repo" description = "GitHub repo managed by Terraform" diff --git a/website/docs/r/repository_collaborator.html.markdown b/docs/resources/repository_collaborator.md similarity index 63% rename from website/docs/r/repository_collaborator.html.markdown rename to docs/resources/repository_collaborator.md index d89a509e4d..dbaa6c4f48 100644 --- a/website/docs/r/repository_collaborator.html.markdown +++ b/docs/resources/repository_collaborator.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repository_collaborator" description: |- Provides a GitHub repository collaborator resource. @@ -9,24 +8,15 @@ description: |- Provides a GitHub repository collaborator resource. -~> Note: github_repository_collaborator cannot be used in conjunction with github_repository_collaborators or -they will fight over what your policy should be. +~> Note: github_repository_collaborator cannot be used in conjunction with github_repository_collaborators or they will fight over what your policy should be. -This resource allows you to add/remove collaborators from repositories in your -organization or personal account. For organization repositories, collaborators can -have explicit (and differing levels of) read, write, or administrator access to -specific repositories, without giving the user full organization membership. -For personal repositories, collaborators can only be granted write -(implicitly includes read) permission. +This resource allows you to add/remove collaborators from repositories in your organization or personal account. For organization repositories, collaborators can have explicit (and differing levels of) read, write, or administrator access to specific repositories, without giving the user full organization membership. For personal repositories, collaborators can only be granted write (implicitly includes read) permission. -When applied, an invitation will be sent to the user to become a collaborator -on a repository. When destroyed, either the invitation will be cancelled or the -collaborator will be removed from the repository. +When applied, an invitation will be sent to the user to become a collaborator on a repository. When destroyed, either the invitation will be cancelled or the collaborator will be removed from the repository. ~> **Note on Archived Repositories**: When a repository is archived, GitHub makes it read-only, preventing collaborator modifications. If you attempt to destroy resources associated with archived repositories, the provider will gracefully handle the operation by logging an informational message and removing the resource from Terraform state without attempting to modify the archived repository. -This resource is non-authoritative, for managing ALL collaborators of a repo, use github_repository_collaborators -instead. +This resource is non-authoritative, for managing ALL collaborators of a repo, use github_repository_collaborators instead. Further documentation on GitHub collaborators: @@ -36,7 +26,7 @@ Further documentation on GitHub collaborators: ## Example Usage -```hcl +```terraform # Add a collaborator to a repository resource "github_repository_collaborator" "a_repo_collaborator" { repository = "our-cool-repo" @@ -51,13 +41,11 @@ The following arguments are supported: * `repository` - (Required) The GitHub repository -~> Note: The owner of the repository can be passed as part of the repository name e.g. `owner-org-name/repo-name`. If owner is not supplied as part of the repository name, it may also be supplied by setting the environment variable `GITHUB_OWNER`. +~> Note: The owner of the repository can be passed as part of the repository name e.g. `owner-org-name/repo-name`. If owner is not supplied as part of the repository name, it may also be supplied by setting the environment variable `GITHUB_OWNER`. * `username` - (Required) The user to add to the repository as a collaborator. -* `permission` - (Optional) The permission of the outside collaborator for the repository. - Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories. - Must be `push` for personal repositories. Defaults to `push`. -* `permission_diff_suppression` - (Optional) Suppress plan diffs for `triage` and `maintain`. Defaults to `false`. +* `permission` - (Optional) The permission of the outside collaborator for the repository. Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories. Must be `push` for personal repositories. Defaults to `push`. +* `permission_diff_suppression` - (Optional) Suppress plan diffs for `triage` and `maintain`. Defaults to `false`. ## Attribute Reference @@ -71,4 +59,4 @@ GitHub Repository Collaborators can be imported using an ID made up of `reposito ``` $ terraform import github_repository_collaborator.collaborator terraform:someuser -``` \ No newline at end of file +``` diff --git a/website/docs/r/repository_collaborators.html.markdown b/docs/resources/repository_collaborators.md similarity index 64% rename from website/docs/r/repository_collaborators.html.markdown rename to docs/resources/repository_collaborators.md index 93c01aef91..57188080f7 100644 --- a/website/docs/r/repository_collaborators.html.markdown +++ b/docs/resources/repository_collaborators.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repository_collaborators" description: |- Provides a GitHub repository collaborators resource. @@ -9,24 +8,15 @@ description: |- Provides a GitHub repository collaborators resource. -~> Note: github_repository_collaborators cannot be used in conjunction with github_repository_collaborator and -github_team_repository or they will fight over what your policy should be. +~> Note: github_repository_collaborators cannot be used in conjunction with github_repository_collaborator and github_team_repository or they will fight over what your policy should be. -This resource allows you to manage all collaborators for repositories in your -organization or personal account. For organization repositories, collaborators can -have explicit (and differing levels of) read, write, or administrator access to -specific repositories, without giving the user full organization membership. -For personal repositories, collaborators can only be granted write -(implicitly includes read) permission. +This resource allows you to manage all collaborators for repositories in your organization or personal account. For organization repositories, collaborators can have explicit (and differing levels of) read, write, or administrator access to specific repositories, without giving the user full organization membership. For personal repositories, collaborators can only be granted write (implicitly includes read) permission. -When applied, an invitation will be sent to the user to become a collaborators -on a repository. When destroyed, either the invitation will be cancelled or the -collaborators will be removed from the repository. +When applied, an invitation will be sent to the user to become a collaborators on a repository. When destroyed, either the invitation will be cancelled or the collaborators will be removed from the repository. ~> **Note on Archived Repositories**: When a repository is archived, GitHub makes it read-only, preventing collaborator modifications. If you attempt to destroy resources associated with archived repositories, the provider will gracefully handle the operation by logging an informational message and removing the resource from Terraform state without attempting to modify the archived repository. -This resource is authoritative. For adding a collaborator to a repo in a non-authoritative manner, use -github_repository_collaborator instead. +This resource is authoritative. For adding a collaborator to a repo in a non-authoritative manner, use github_repository_collaborator instead. Further documentation on GitHub collaborators: @@ -36,7 +26,7 @@ Further documentation on GitHub collaborators: ## Example Usage -```hcl +```terraform # Add collaborators to a repository resource "github_team" "some_team" { name = "SomeTeam" @@ -74,16 +64,12 @@ The following arguments are supported: The `user` block supports: * `username` - (Required) The user to add to the repository as a collaborator. -* `permission` - (Optional) The permission of the outside collaborators for the repository. - Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories. - Must be `push` for personal repositories. Defaults to `push`. +* `permission` - (Optional) The permission of the outside collaborators for the repository. Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories. Must be `push` for personal repositories. Defaults to `push`. The `team` block supports: * `team_id` - (Required) The GitHub team id or the GitHub team slug. -* `permission` - (Optional) The permission of the outside collaborators for the repository. - Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. - Must be `push` for personal repositories. Defaults to `push`. +* `permission` - (Optional) The permission of the outside collaborators for the repository. Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. Must be `push` for personal repositories. Defaults to `push`. The `ignore_team` block supports: @@ -93,8 +79,7 @@ The `ignore_team` block supports: In addition to the above arguments, the following attributes are exported: -* `invitation_ids` - Map of usernames to invitation ID for any users added as part of creation of this resource to - be used in [`github_user_invitation_accepter`](./user_invitation_accepter.html). +* `invitation_ids` - Map of usernames to invitation ID for any users added as part of creation of this resource to be used in [`github_user_invitation_accepter`](./user_invitation_accepter.html). ## Import diff --git a/website/docs/r/repository_custom_property.html.markdown b/docs/resources/repository_custom_property.md similarity index 98% rename from website/docs/r/repository_custom_property.html.markdown rename to docs/resources/repository_custom_property.md index 026030a0d2..43b023c053 100644 --- a/website/docs/r/repository_custom_property.html.markdown +++ b/docs/resources/repository_custom_property.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repository_custom_property" description: |- Creates and a specific custom property for a GitHub repository @@ -13,7 +12,7 @@ This resource allows you to create and manage a specific custom property for a G > Note that this assumes there already is a custom property defined on the org level called `my-cool-property` of type `string` -```hcl +```terraform resource "github_repository" "example" { name = "example" description = "My awesome codebase" @@ -36,7 +35,7 @@ The following arguments are supported: * `property_name` - (Required) Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level -* `property_value` - (Required) Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 +* `property_value` - (Required) Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 ## Import diff --git a/website/docs/r/repository_dependabot_security_updates.html.markdown b/docs/resources/repository_dependabot_security_updates.md similarity index 79% rename from website/docs/r/repository_dependabot_security_updates.html.markdown rename to docs/resources/repository_dependabot_security_updates.md index 0a029929c1..7ce5c3472b 100644 --- a/website/docs/r/repository_dependabot_security_updates.html.markdown +++ b/docs/resources/repository_dependabot_security_updates.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repository_dependabot_security_updates" description: |- Manages automated security fixes for a single repository @@ -7,13 +6,11 @@ description: |- # github_repository_dependabot_security_updates -This resource allows you to manage dependabot automated security fixes for a single repository. See the -[documentation](https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates) -for details of usage and how this will impact your repository +This resource allows you to manage dependabot automated security fixes for a single repository. See the [documentation](https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates) for details of usage and how this will impact your repository ## Example Usage -```hcl +```terraform resource "github_repository" "repo" { name = "my-repo" description = "GitHub repo managed by Terraform" diff --git a/website/docs/r/repository_deploy_key.html.markdown b/docs/resources/repository_deploy_key.md similarity index 87% rename from website/docs/r/repository_deploy_key.html.markdown rename to docs/resources/repository_deploy_key.md index c497c4e9bf..eb620ce251 100644 --- a/website/docs/r/repository_deploy_key.html.markdown +++ b/docs/resources/repository_deploy_key.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repository_deploy_key" description: |- Provides a GitHub repository deploy key resource. @@ -9,9 +8,7 @@ description: |- Provides a GitHub repository deploy key resource. -A deploy key is an SSH key that is stored on your server and grants -access to a single GitHub repository. This key is attached directly to the repository instead of to a personal user -account. +A deploy key is an SSH key that is stored on your server and grants access to a single GitHub repository. This key is attached directly to the repository instead of to a personal user account. This resource allows you to add/remove repository deploy keys. @@ -22,7 +19,7 @@ Further documentation on GitHub repository deploy keys: ## Example Usage -```hcl +```terraform # Generate an ssh key using provider "hashicorp/tls" resource "tls_private_key" "example_repository_deploy_key" { algorithm = "ED25519" @@ -50,8 +47,7 @@ Changing any of the fields forces re-creating the resource. ## Import -Repository deploy keys can be imported using a colon-separated pair of repository name -and GitHub's key id. The latter can be obtained by GitHub's SDKs and API. +Repository deploy keys can be imported using a colon-separated pair of repository name and GitHub's key id. The latter can be obtained by GitHub's SDKs and API. ``` $ terraform import github_repository_deploy_key.foo test-repo:23824728 diff --git a/website/docs/r/repository_deployment_branch_policy.html.markdown b/docs/resources/repository_deployment_branch_policy.md similarity index 98% rename from website/docs/r/repository_deployment_branch_policy.html.markdown rename to docs/resources/repository_deployment_branch_policy.md index bda3cbd02b..c36008b795 100644 --- a/website/docs/r/repository_deployment_branch_policy.html.markdown +++ b/docs/resources/repository_deployment_branch_policy.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repository_deployment_branch_policy" description: |- Creates and manages deployment branch policies @@ -13,7 +12,7 @@ This resource allows you to create and manage deployment branch policies. ## Example Usage -```hcl +```terraform resource "github_repository_environment" "env" { repository = "my_repo" environment = "my_env" diff --git a/website/docs/r/repository_environment.html.markdown b/docs/resources/repository_environment.md similarity index 98% rename from website/docs/r/repository_environment.html.markdown rename to docs/resources/repository_environment.md index 6ff870340a..aac5b3bf49 100644 --- a/website/docs/r/repository_environment.html.markdown +++ b/docs/resources/repository_environment.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repository_environment" description: |- Creates and manages environments for GitHub repositories @@ -11,7 +10,7 @@ This resource allows you to create and manage environments for a GitHub reposito ## Example Usage -```hcl +```terraform data "github_user" "current" { username = "" } @@ -77,7 +76,7 @@ This resource can be imported using an ID made of the repository name and enviro The following import block imports an environment called `myenv` for the repo `myrepo` to a `github_repository_environment` resource named `example`. -```hcl +```terraform import { to = github_repository_environment.example id = "myrepo:myenv" diff --git a/website/docs/r/repository_environment_deployment_policy.html.markdown b/docs/resources/repository_environment_deployment_policy.md similarity index 98% rename from website/docs/r/repository_environment_deployment_policy.html.markdown rename to docs/resources/repository_environment_deployment_policy.md index 6811d1117f..203463b31f 100644 --- a/website/docs/r/repository_environment_deployment_policy.html.markdown +++ b/docs/resources/repository_environment_deployment_policy.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repository_environment_deployment_policy" description: |- Creates and manages environment deployment branch policies for GitHub repositories @@ -13,7 +12,7 @@ This resource allows you to create and manage environment deployment branch poli Create a branch-based deployment policy: -```hcl +```terraform data "github_user" "current" { username = "" } @@ -44,8 +43,7 @@ resource "github_repository_environment_deployment_policy" "test" { Create a tag-based deployment policy: -```hcl - +```terraform data "github_user" "current" { username = "" } @@ -99,7 +97,7 @@ This resource can be imported using an ID made of the repository name, environme The following import block imports a deployment policy with the ID `123456` for the repo `myrepo` and environment `myenv` to a `github_repository_environment_deployment_policy` resource named `example`. -```hcl +```terraform import { to = github_repository_environment_deployment_policy.example id = "myrepo:myenv:123456" diff --git a/website/docs/r/repository_file.html.markdown b/docs/resources/repository_file.md similarity index 94% rename from website/docs/r/repository_file.html.markdown rename to docs/resources/repository_file.md index 8bd65b16fb..9604465889 100644 --- a/website/docs/r/repository_file.html.markdown +++ b/docs/resources/repository_file.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repository_file" description: |- Creates and manages files within a GitHub repository @@ -7,8 +6,7 @@ description: |- # github_repository_file -This resource allows you to create and manage files within a -GitHub repository. +This resource allows you to create and manage files within a GitHub repository. ~> **Note:** When a repository is archived, Terraform will skip deletion of repository files to avoid API errors, as archived repositories are read-only. The files will be removed from Terraform state without attempting to delete them from GitHub. @@ -16,8 +14,7 @@ GitHub repository. ### Existing Branch -```hcl - +```terraform resource "github_repository" "foo" { name = "example" auto_init = true @@ -33,13 +30,11 @@ resource "github_repository_file" "foo" { commit_email = "terraform@example.com" overwrite_on_create = true } - ``` ### Auto Created Branch -```hcl - +```terraform resource "github_repository" "foo" { name = "example" auto_init = true @@ -56,7 +51,6 @@ resource "github_repository_file" "foo" { overwrite_on_create = true autocreate_branch = true } - ``` ## Argument Reference @@ -69,8 +63,7 @@ The following arguments are supported: - `content` - (Required) The file content. -- `branch` - (Optional) Git branch (defaults to the repository's default branch). - The branch must already exist, it will only be created automatically if 'autocreate_branch' is set true. +- `branch` - (Optional) Git branch (defaults to the repository's default branch). The branch must already exist, it will only be created automatically if 'autocreate_branch' is set true. - `commit_author` - (Optional) Committer author name to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This maybe useful when a branch protection rule requires signed commits. diff --git a/website/docs/r/repository_milestone.html.markdown b/docs/resources/repository_milestone.md similarity index 98% rename from website/docs/r/repository_milestone.html.markdown rename to docs/resources/repository_milestone.md index fb5e951d20..79b7e45a51 100644 --- a/website/docs/r/repository_milestone.html.markdown +++ b/docs/resources/repository_milestone.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repository_milestone" description: |- Provides a GitHub repository milestone resource. @@ -13,7 +12,7 @@ This resource allows you to create and manage milestones for a GitHub Repository ## Example Usage -```hcl +```terraform # Create a milestone for a repository resource "github_repository_milestone" "example" { owner = "example-owner" @@ -38,7 +37,6 @@ The following arguments are supported: * `state` - (Optional) The state of the milestone. Either `open` or `closed`. Default: `open` - ## Attributes Reference The following additional attributes are exported: diff --git a/website/docs/r/repository_project.html.markdown b/docs/resources/repository_project.md similarity index 98% rename from website/docs/r/repository_project.html.markdown rename to docs/resources/repository_project.md index 0ce0c9f578..bd6bcc2f78 100644 --- a/website/docs/r/repository_project.html.markdown +++ b/docs/resources/repository_project.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repository_project" description: |- Creates and manages projects for GitHub repositories @@ -13,7 +12,7 @@ This resource allows you to create and manage projects for GitHub repository. ## Example Usage -```hcl +```terraform resource "github_repository" "example" { name = "example" description = "My awesome codebase" diff --git a/website/docs/r/repository_pull_request.html.markdown b/docs/resources/repository_pull_request.md similarity index 90% rename from website/docs/r/repository_pull_request.html.markdown rename to docs/resources/repository_pull_request.md index 24ccca034c..6f03dbc675 100644 --- a/website/docs/r/repository_pull_request.html.markdown +++ b/docs/resources/repository_pull_request.md @@ -1,6 +1,5 @@ --- -layout: "github" -page_title: "GitHub: repository_pull_request" +page_title: "GitHub: github_repository_pull_request" description: |- Get information on a single GitHub Pull Request. --- @@ -11,7 +10,7 @@ This resource allows you to create and manage PullRequests for repositories with ## Example Usage -```hcl +```terraform resource "github_repository_pull_request" "example" { base_repository = "example-repository" base_ref = "main" @@ -29,7 +28,7 @@ resource "github_repository_pull_request" "example" { * `head_ref` - (Required) Name of the branch serving as the head of the Pull Request. -* `owner` - (Optional) Owner of the repository. If not provided, the provider's default owner is used. +* `owner` - (Optional) Owner of the repository. If not provided, the provider's default owner is used. * `title` - (Optional) The title of the Pull Request. diff --git a/website/docs/r/repository_ruleset.html.markdown b/docs/resources/repository_ruleset.md similarity index 95% rename from website/docs/r/repository_ruleset.html.markdown rename to docs/resources/repository_ruleset.md index 5c8b72ae4e..9746d39042 100644 --- a/website/docs/r/repository_ruleset.html.markdown +++ b/docs/resources/repository_ruleset.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "github_repository_ruleset Resource - terraform-provider-github" description: |- Creates a GitHub repository ruleset. @@ -13,7 +12,7 @@ This resource allows you to create and manage rulesets on the repository level. ## Example Usage -```hcl +```terraform resource "github_repository" "example" { name = "example" description = "Example repository" @@ -102,7 +101,7 @@ resource "github_repository_ruleset" "example_push" { - `repository` - (Required) (String) Name of the repository to apply ruleset to. -#### Rules #### +#### Rules The `rules` block supports the following: @@ -151,7 +150,7 @@ The `rules` block supports the following: - `update_allows_fetch_and_merge` - (Optional) (Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires `update` to be set to `true`. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter. -#### rules.branch_name_pattern #### +#### rules.branch_name_pattern - `operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. @@ -161,7 +160,7 @@ The `rules` block supports the following: - `negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches. -#### rules.commit_author_email_pattern #### +#### rules.commit_author_email_pattern - `operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. @@ -171,7 +170,7 @@ The `rules` block supports the following: - `negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches. -#### rules.commit_message_pattern #### +#### rules.commit_message_pattern - `operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. @@ -181,7 +180,7 @@ The `rules` block supports the following: - `negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches. -#### rules.committer_email_pattern #### +#### rules.committer_email_pattern - `operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. @@ -191,7 +190,7 @@ The `rules` block supports the following: - `negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches. -#### rules.merge_queue #### +#### rules.merge_queue - `check_response_timeout_minutes` - (Optional) (Number) Maximum time for a required status check to report a conclusion. After this much time has elapsed, checks that have not reported a conclusion will be assumed to have failed. Defaults to `60`. @@ -207,7 +206,7 @@ The `rules` block supports the following: - `min_entries_to_merge_wait_minutes` - (Optional) (Number) The time merge queue should wait after the first PR is added to the queue for the minimum group size to be met. After this time has elapsed, the minimum group size will be ignored and a smaller group will be merged. Defaults to `5`. -#### rules.pull_request #### +#### rules.pull_request - `allowed_merge_methods` - (Optional) (List of String, Min: 1) Array of merge methods to be allowed. Allowed values include `merge`, `squash`, and `rebase`. At least one must be enabled. - `dismiss_stale_reviews_on_push` - (Optional) (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. @@ -216,7 +215,7 @@ The `rules` block supports the following: - `required_approving_review_count` - (Optional) (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. - `required_review_thread_resolution` - (Optional) (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. -#### rules.copilot_code_review #### +#### rules.copilot_code_review - `review_on_push` - (Optional) (Boolean) Copilot automatically reviews each new push to the pull request. Defaults to `false`. @@ -226,7 +225,7 @@ The `rules` block supports the following: - `required_reviewers` - (Optional) (Block List) Require specific reviewers to approve pull requests. Note: This feature is in beta. (see [below for nested schema](#rulespull_requestrequired_reviewers)) -#### rules.pull_request.required_reviewers #### +#### rules.pull_request.required_reviewers - `reviewer` - (Required) (Block List, Max: 1) The reviewer that must review matching files. (see [below for nested schema](#rulespull_requestrequired_reviewersreviewer)) @@ -234,17 +233,17 @@ The `rules` block supports the following: - `minimum_approvals` - (Required) (Number) Minimum number of approvals required from this reviewer. Set to 0 to make approval optional. -#### rules.pull_request.required_reviewers.reviewer #### +#### rules.pull_request.required_reviewers.reviewer - `id` - (Required) (Number) The ID of the reviewer (Team ID). - `type` - (Required) (String) The type of reviewer. Currently only `Team` is supported. -#### rules.required_deployments #### +#### rules.required_deployments - `required_deployment_environments` - (Required) (List of String) The environments that must be successfully deployed to before branches can be merged. -#### rules.required_status_checks #### +#### rules.required_status_checks - `required_check` - (Required) (Block Set, Min: 1) Status checks that are required. Several can be defined. (see [below for nested schema](#rulesrequired_status_checksrequired_check)) @@ -252,13 +251,13 @@ The `rules` block supports the following: - `do_not_enforce_on_create` - (Optional) (Boolean) Allow repositories and branches to be created if a check would otherwise prohibit it. Defaults to `false`. -#### rules.required_status_checks.required_check #### +#### rules.required_status_checks.required_check - `context` - (Required) (String) The status check context name that must be present on the commit. - `integration_id` - (Optional) (Number) The optional integration ID that this status check must originate from. It's a GitHub App ID, which can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app). -#### rules.tag_name_pattern #### +#### rules.tag_name_pattern - `operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. @@ -268,11 +267,11 @@ The `rules` block supports the following: - `negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches. -#### rules.required_code_scanning #### +#### rules.required_code_scanning - `required_code_scanning_tool` - (Required) (Block Set, Min: 1) Actions code scanning tools that are required. Multiple can be defined. (see [below for nested schema](#rulesrequired_code_scanningrequired_code_scanning_tool)) -#### rules.required_code_scanning.required_code_scanning_tool #### +#### rules.required_code_scanning.required_code_scanning_tool - `alerts_threshold` - (Required) (String) The severity level at which code scanning results that raise alerts block a reference update. Can be one of: `none`, `errors`, `errors_and_warnings`, `all`. @@ -280,23 +279,23 @@ The `rules` block supports the following: - `tool` - (Required) (String) The name of a code scanning tool. -#### rules.file_path_restriction #### +#### rules.file_path_restriction - `restricted_file_paths` - (Required) (Block Set, Min: 1) The file paths that are restricted from being pushed to the commit graph. -#### rules.max_file_size #### +#### rules.max_file_size - `max_file_size` - (Required) (Integer) The maximum allowed size, in megabytes (MB), of a file. Valid range is 1-100 MB. -#### rules.max_file_path_length #### +#### rules.max_file_path_length - `max_file_path_length` - (Required) (Integer) The maximum number of characters allowed in file paths. -#### rules.file_extension_restriction #### +#### rules.file_extension_restriction - `restricted_file_extensions` - (Required) (Block Set, Min: 1) The file extensions that are restricted from being pushed to the commit graph. -#### bypass_actors #### +#### bypass_actors - `actor_id` - (Optional) (Number) The ID of the actor that can bypass a ruleset. If `actor_type` is `Integration`, `actor_id` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app). Some actor types such as `DeployKey` do not have an ID. @@ -308,17 +307,17 @@ The `rules` block supports the following: - `OrganizationAdmin` -> `1` - `RepositoryRole` (This is the actor type, the following are the base repository roles and their associated IDs.) - - `maintain` -> `2` - - `write` -> `4` - - `admin` -> `5` + - `maintain` -> `2` + - `write` -> `4` + - `admin` -> `5` -#### conditions #### +#### conditions - `ref_name` - (Optional) (Block List, Max: 1) Required for `branch` and `tag` targets. Must NOT be set for `push` targets. (see [below for nested schema](#conditionsref_name)) ~> **Note:** For `push` targets, do not include `ref_name` in conditions. Push rulesets operate on file content, not on refs. The `conditions` block is optional for push targets. -#### conditions.ref_name #### +#### conditions.ref_name - `exclude` - (Required) (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. diff --git a/website/docs/r/repository_topics.html.markdown b/docs/resources/repository_topics.md similarity index 70% rename from website/docs/r/repository_topics.html.markdown rename to docs/resources/repository_topics.md index 57b2c28ccf..2d65035ad4 100644 --- a/website/docs/r/repository_topics.html.markdown +++ b/docs/resources/repository_topics.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repository_topics" description: |- Creates and manages the topics on a repository @@ -9,12 +8,11 @@ description: |- This resource allows you to create and manage topics for repositories within your GitHub organization or personal account. -~> Note: This resource is not compatible with the `topic` attribute of the `github_repository` Use either ``github_repository_topics`` -or ``topic`` in ``github_repository``. `github_repository_topics` is only meant to be used if the repository itself is not handled via terraform, for example if it's only read as a datasource (see [issue #1845](https://github.com/integrations/terraform-provider-github/issues/1845)). +~> Note: This resource is not compatible with the `topic` attribute of the `github_repository` Use either `github_repository_topics` or `topic` in `github_repository`. `github_repository_topics` is only meant to be used if the repository itself is not handled via terraform, for example if it's only read as a datasource (see [issue #1845](https://github.com/integrations/terraform-provider-github/issues/1845)). ## Example Usage -```hcl +```terraform data "github_repository" "test" { name = "test" } diff --git a/website/docs/r/repository_webhook.html.markdown b/docs/resources/repository_webhook.md similarity index 87% rename from website/docs/r/repository_webhook.html.markdown rename to docs/resources/repository_webhook.md index 4efec7c1f1..f387da9b4d 100644 --- a/website/docs/r/repository_webhook.html.markdown +++ b/docs/resources/repository_webhook.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_repository_webhook" description: |- Creates and manages repository webhooks within GitHub organizations or personal accounts @@ -7,14 +6,13 @@ description: |- # github_repository_webhook -This resource allows you to create and manage webhooks for repositories within your -GitHub organization or personal account. +This resource allows you to create and manage webhooks for repositories within your GitHub organization or personal account. ~> **Note on Archived Repositories**: When a repository is archived, GitHub makes it read-only, preventing webhook modifications. If you attempt to destroy resources associated with archived repositories, the provider will gracefully handle the operation by logging an informational message and removing the resource from Terraform state without attempting to modify the archived repository. ## Example Usage -```hcl +```terraform resource "github_repository" "repo" { name = "foo" description = "Terraform acceptance tests" @@ -64,12 +62,11 @@ The following arguments are supported: The following additional attributes are exported: -* `url` - URL of the webhook. This is a sensitive attribute because it may include basic auth credentials. +* `url` - URL of the webhook. This is a sensitive attribute because it may include basic auth credentials. ## Import -Repository webhooks can be imported using the `name` of the repository, combined with the `id` of the webhook, separated by a `/` character. -The `id` of the webhook can be found in the URL of the webhook. For example: `"https://github.com/foo-org/foo-repo/settings/hooks/14711452"`. +Repository webhooks can be imported using the `name` of the repository, combined with the `id` of the webhook, separated by a `/` character. The `id` of the webhook can be found in the URL of the webhook. For example: `"https://github.com/foo-org/foo-repo/settings/hooks/14711452"`. Importing uses the name of the repository, as well as the ID of the webhook, e.g. diff --git a/website/docs/r/team.html.markdown b/docs/resources/team.md similarity index 78% rename from website/docs/r/team.html.markdown rename to docs/resources/team.md index baa295ee56..2b11abc902 100644 --- a/website/docs/r/team.html.markdown +++ b/docs/resources/team.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_team" description: |- Provides a GitHub team resource. @@ -9,12 +8,11 @@ description: |- Provides a GitHub team resource. -This resource allows you to add/remove teams from your organization. When applied, -a new team will be created. When destroyed, that team will be removed. +This resource allows you to add/remove teams from your organization. When applied, a new team will be created. When destroyed, that team will be removed. ## Example Usage -```hcl +```terraform # Add a team to the organization resource "github_team" "some_team" { name = "some-team" @@ -29,8 +27,8 @@ The following arguments are supported: * `name` - (Required) The name of the team. * `description` - (Optional) A description of the team. -* `privacy` - (Optional) The level of privacy for the team. Must be one of `secret` _(default)_ or `closed`. -* `notification_setting` - (Optional) The notification setting for the team. Must be one of `notifications_enabled` _(default)_ or `notifications_disabled`. +* `privacy` - (Optional) The level of privacy for the team. Must be one of `secret` *(default)* or `closed`. +* `notification_setting` - (Optional) The notification setting for the team. Must be one of `notifications_enabled` *(default)* or `notifications_disabled`. * `parent_team_id` - (Optional) The ID or slug of the parent team, if this is a nested team. * `ldap_dn` - (Optional) The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise Server. * `create_default_maintainer` - (**DEPRECATED**) (Optional) Adds a default maintainer to the team. Defaults to `false` and adds the creating user to the team when `true`. @@ -41,9 +39,7 @@ The following attributes are exported: * `id` - The ID of the created team. * `node_id` - The Node ID of the created team. -* `slug` - The slug of the created team, which may or may not differ from `name`, - depending on whether `name` contains "URL-unsafe" characters. - Useful when referencing the team in [`github_branch_protection`](/docs/providers/github/r/branch_protection.html). +* `slug` - The slug of the created team, which may or may not differ from `name`, depending on whether `name` contains "URL-unsafe" characters. Useful when referencing the team in [`github_branch_protection`](/docs/providers/github/r/branch_protection.html). ## Import diff --git a/website/docs/r/team_members.html.markdown b/docs/resources/team_members.md similarity index 82% rename from website/docs/r/team_members.html.markdown rename to docs/resources/team_members.md index 2ab875ec18..74ac1332bd 100644 --- a/website/docs/r/team_members.html.markdown +++ b/docs/resources/team_members.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_team_members" description: |- Provides an authoritative GitHub team members resource. @@ -23,7 +22,7 @@ When destroyed, all users will be removed from the team. ## Example Usage -```hcl +```terraform # Add a user to the organization resource "github_membership" "membership_for_some_user" { username = "SomeUser" @@ -61,7 +60,7 @@ The following arguments are supported: * `team_id` - (Required) The team id or the team slug -~> **Note** Although the team id or team slug can be used it is recommended to use the team id. Using the team slug will cause the team members associations to the team to be destroyed and recreated if the team name is updated. +~> **Note** Although the team id or team slug can be used it is recommended to use the team id. Using the team slug will cause the team members associations to the team to be destroyed and recreated if the team name is updated. * `members` - (Required) List of team members. See [Members](#members) below for details. @@ -70,12 +69,11 @@ The following arguments are supported: `members` supports the following arguments: * `username` - (Required) The user to add to the team. -* `role` - (Optional) The role of the user within the team. - Must be one of `member` or `maintainer`. Defaults to `member`. +* `role` - (Optional) The role of the user within the team. Must be one of `member` or `maintainer`. Defaults to `member`. ## Import -~> **Note** Although the team id or team slug can be used it is recommended to use the team id. Using the team slug will result in terraform doing conversions between the team slug and team id. This will cause team members associations to the team to be destroyed and recreated on import. +~> **Note** Although the team id or team slug can be used it is recommended to use the team id. Using the team slug will result in terraform doing conversions between the team slug and team id. This will cause team members associations to the team to be destroyed and recreated on import. GitHub Team Membership can be imported using the team ID team id or team slug, e.g. diff --git a/website/docs/r/team_membership.html.markdown b/docs/resources/team_membership.md similarity index 79% rename from website/docs/r/team_membership.html.markdown rename to docs/resources/team_membership.md index ecfa9e5539..3d579e0ed5 100644 --- a/website/docs/r/team_membership.html.markdown +++ b/docs/resources/team_membership.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_team_membership" description: |- Provides a GitHub team membership resource. @@ -9,10 +8,7 @@ description: |- Provides a GitHub team membership resource. -This resource allows you to add/remove users from teams in your organization. When applied, -the user will be added to the team. If the user hasn't accepted their invitation to the -organization, they won't be part of the team until they do. When -destroyed, the user will be removed from the team. +This resource allows you to add/remove users from teams in your organization. When applied, the user will be added to the team. If the user hasn't accepted their invitation to the organization, they won't be part of the team until they do. When destroyed, the user will be removed from the team. ~> **Note** This resource is not compatible with `github_team_members`. Use either `github_team_members` or `github_team_membership`. @@ -20,7 +16,7 @@ destroyed, the user will be removed from the team. ## Example Usage -```hcl +```terraform # Add a user to the organization resource "github_membership" "membership_for_some_user" { username = "SomeUser" @@ -45,8 +41,7 @@ The following arguments are supported: * `team_id` - (Required) The GitHub team id or the GitHub team slug * `username` - (Required) The user to add to the team. -* `role` - (Optional) The role of the user within the team. - Must be one of `member` or `maintainer`. Defaults to `member`. +* `role` - (Optional) The role of the user within the team. Must be one of `member` or `maintainer`. Defaults to `member`. ## Import diff --git a/website/docs/r/team_repository.html.markdown b/docs/resources/team_repository.md similarity index 71% rename from website/docs/r/team_repository.html.markdown rename to docs/resources/team_repository.md index 0b3eb02d99..029295aac9 100644 --- a/website/docs/r/team_repository.html.markdown +++ b/docs/resources/team_repository.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_team_repository" description: |- Manages the associations between teams and repositories. @@ -7,27 +6,21 @@ description: |- # github_team_repository -~> Note: github_team_repository cannot be used in conjunction with github_repository_collaborators or -they will fight over what your policy should be. +~> Note: github_team_repository cannot be used in conjunction with github_repository_collaborators or they will fight over what your policy should be. -This resource manages relationships between teams and repositories -in your GitHub organization. +This resource manages relationships between teams and repositories in your GitHub organization. -Creating this resource grants a particular team permissions on a -particular repository. +Creating this resource grants a particular team permissions on a particular repository. -The repository and the team must both belong to the same organization -on GitHub. This resource does not actually *create* any repositories; -to do that, see [`github_repository`](repository.html). +The repository and the team must both belong to the same organization on GitHub. This resource does not actually *create* any repositories; to do that, see [`github_repository`](repository.html). ~> **Note on Archived Repositories**: When a repository is archived, GitHub makes it read-only, preventing team permission modifications. If you attempt to destroy resources associated with archived repositories, the provider will gracefully handle the operation by logging an informational message and removing the resource from Terraform state without attempting to modify the archived repository. -This resource is non-authoritative, for managing ALL collaborators of a repo, use github_repository_collaborators -instead. +This resource is non-authoritative, for managing ALL collaborators of a repo, use github_repository_collaborators instead. ## Example Usage -```hcl +```terraform # Add a repository to the team resource "github_team" "some_team" { name = "SomeTeam" @@ -51,9 +44,7 @@ The following arguments are supported: * `team_id` - (Required) The GitHub team id or the GitHub team slug * `repository` - (Required) The repository to add to the team. -* `permission` - (Optional) The permissions of team members regarding the repository. - Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. - +* `permission` - (Optional) The permissions of team members regarding the repository. Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. ## Import diff --git a/website/docs/r/team_settings.html.markdown b/docs/resources/team_settings.md similarity index 97% rename from website/docs/r/team_settings.html.markdown rename to docs/resources/team_settings.md index 318062904e..44df133f60 100644 --- a/website/docs/r/team_settings.html.markdown +++ b/docs/resources/team_settings.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_team_settings" description: |- Manages the team settings (in particular the request review delegation settings) @@ -11,13 +10,13 @@ This resource manages the team settings (in particular the request review delega Creating this resource will alter the team Code Review settings. -The team must both belong to the same organization configured in the provider on GitHub. +The team must both belong to the same organization configured in the provider on GitHub. ~> **Note**: This resource relies on the v4 GraphQl GitHub API. If this API is not available, or the Stone Crop schema preview is not available, then this resource will not work as intended. ## Example Usage -```hcl +```terraform # Add a repository to the team resource "github_team" "some_team" { name = "SomeTeam" @@ -49,7 +48,6 @@ The following arguments are supported: * `member_count` - (Optional) The number of team members to assign to a pull request * `notify` - (Optional) whether to notify the entire team when at least one member is also assigned to the pull request - ## Import GitHub Teams can be imported using the GitHub team ID, or the team slug e.g. @@ -57,7 +55,9 @@ GitHub Teams can be imported using the GitHub team ID, or the team slug e.g. ``` $ terraform import github_team.code_review_settings 1234567 ``` + or, + ``` $ terraform import github_team_settings.code_review_settings SomeTeam -``` \ No newline at end of file +``` diff --git a/website/docs/r/team_sync_group_mapping.html.markdown b/docs/resources/team_sync_group_mapping.md similarity index 69% rename from website/docs/r/team_sync_group_mapping.html.markdown rename to docs/resources/team_sync_group_mapping.md index 09e472616f..f457aea5d6 100644 --- a/website/docs/r/team_sync_group_mapping.html.markdown +++ b/docs/resources/team_sync_group_mapping.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_team_sync_group_mapping" description: |- Creates and manages the connections between a team and its IdP group(s). @@ -7,16 +6,13 @@ description: |- # github_team_sync_group_mapping -This resource allows you to create and manage Identity Provider (IdP) group connections within your GitHub teams. -You must have team synchronization enabled for organizations owned by enterprise accounts. +This resource allows you to create and manage Identity Provider (IdP) group connections within your GitHub teams. You must have team synchronization enabled for organizations owned by enterprise accounts. -To learn more about team synchronization between IdPs and GitHub, please refer to: -https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/synchronizing-teams-between-your-identity-provider-and-github +To learn more about team synchronization between IdPs and GitHub, please refer to: https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/synchronizing-teams-between-your-identity-provider-and-github ## Example Usage -```hcl - +```terraform data "github_organization_team_sync_groups" "example_groups" {} resource "github_team_sync_group_mapping" "example_group_mapping" { @@ -37,9 +33,10 @@ resource "github_team_sync_group_mapping" "example_group_mapping" { The following arguments are supported: -* `team_slug` - (Required) Slug of the team -* `group` - (Required) An Array of GitHub Identity Provider Groups (or empty []). Each `group` block consists of the fields documented below. -___ +* `team_slug` - (Required) Slug of the team +* `group` - (Required) An Array of GitHub Identity Provider Groups (or empty []). Each `group` block consists of the fields documented below. + +--- The `group` block consists of: diff --git a/website/docs/r/user_gpg_key.html.markdown b/docs/resources/user_gpg_key.md similarity index 74% rename from website/docs/r/user_gpg_key.html.markdown rename to docs/resources/user_gpg_key.md index b1979b0e19..5732d695ca 100644 --- a/website/docs/r/user_gpg_key.html.markdown +++ b/docs/resources/user_gpg_key.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_user_gpg_key" description: |- Provides a GitHub user's GPG key resource. @@ -13,7 +12,7 @@ This resource allows you to add/remove GPG keys from your user account. ## Example Usage -```hcl +```terraform resource "github_user_gpg_key" "example" { armored_public_key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n...\n-----END PGP PUBLIC KEY BLOCK-----" } @@ -23,8 +22,7 @@ resource "github_user_gpg_key" "example" { The following arguments are supported: -* `armored_public_key` - (Required) Your public GPG key, generated in ASCII-armored format. - See [Generating a new GPG key](https://help.github.com/articles/generating-a-new-gpg-key/) for help on creating a GPG key. +* `armored_public_key` - (Required) Your public GPG key, generated in ASCII-armored format. See [Generating a new GPG key](https://help.github.com/articles/generating-a-new-gpg-key/) for help on creating a GPG key. ## Attributes Reference @@ -35,5 +33,4 @@ The following attributes are exported: ## Import -GPG keys are not importable due to the fact that [API](https://developer.github.com/v3/users/gpg_keys/#gpg-keys) -does not return previously uploaded GPG key. +GPG keys are not importable due to the fact that [API](https://developer.github.com/v3/users/gpg_keys/#gpg-keys) does not return previously uploaded GPG key. diff --git a/website/docs/r/user_invitation_accepter.html.markdown b/docs/resources/user_invitation_accepter.md similarity index 79% rename from website/docs/r/user_invitation_accepter.html.markdown rename to docs/resources/user_invitation_accepter.md index e4771a1b49..59ecd2f91a 100644 --- a/website/docs/r/user_invitation_accepter.html.markdown +++ b/docs/resources/user_invitation_accepter.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_user_invitation_accepter" description: |- Provides a resource to manage GitHub repository collaborator invitations. @@ -11,7 +10,7 @@ Provides a resource to manage GitHub repository collaborator invitations. ## Example Usage -```hcl +```terraform resource "github_repository" "example" { name = "example-repo" } @@ -37,11 +36,9 @@ resource "github_user_invitation_accepter" "example" { Set `allow_empty_id` when using `for_each` over a list of `github_repository_collaborator.invitation_id`'s. -This allows applying a module again when a new `github_repository_collaborator` resource is added to the `for_each` loop. -This is needed as the `github_repository_collaborator.invitation_id` will be empty after a state refresh when the invitation has been accepted. +This allows applying a module again when a new `github_repository_collaborator` resource is added to the `for_each` loop. This is needed as the `github_repository_collaborator.invitation_id` will be empty after a state refresh when the invitation has been accepted. -Note that when an invitation is accepted manually or by another tool between a state refresh and a `terraform apply` using that refreshed state, -the plan will contain the invitation ID, but the apply will receive an HTTP 404 from the API since the invitation has already been accepted. +Note that when an invitation is accepted manually or by another tool between a state refresh and a `terraform apply` using that refreshed state, the plan will contain the invitation ID, but the apply will receive an HTTP 404 from the API since the invitation has already been accepted. This is tracked in [#1157](https://github.com/integrations/terraform-provider-github/issues/1157). diff --git a/website/docs/r/user_ssh_key.html.markdown b/docs/resources/user_ssh_key.md similarity index 97% rename from website/docs/r/user_ssh_key.html.markdown rename to docs/resources/user_ssh_key.md index 3827182bd1..5d658711b3 100644 --- a/website/docs/r/user_ssh_key.html.markdown +++ b/docs/resources/user_ssh_key.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_user_ssh_key" description: |- Provides a GitHub user's SSH key resource. @@ -13,7 +12,7 @@ This resource allows you to add/remove SSH keys from your user account. ## Example Usage -```hcl +```terraform resource "github_user_ssh_key" "example" { title = "example title" key = file("~/.ssh/id_rsa.pub") diff --git a/website/docs/r/workflow_repository_permissions.html.markdown b/docs/resources/workflow_repository_permissions.md similarity index 72% rename from website/docs/r/workflow_repository_permissions.html.markdown rename to docs/resources/workflow_repository_permissions.md index 9ea5d95215..2f2fec6b37 100644 --- a/website/docs/r/workflow_repository_permissions.html.markdown +++ b/docs/resources/workflow_repository_permissions.md @@ -1,5 +1,4 @@ --- -layout: "github" page_title: "GitHub: github_workflow_repository_permissions" description: |- Enables and manages Workflow permissions for a GitHub repository @@ -7,12 +6,11 @@ description: |- # github_workflow_repository_permissions -This resource allows you to manage GitHub Workflow permissions for a given repository. -You must have admin access to a repository to use this resource. +This resource allows you to manage GitHub Workflow permissions for a given repository. You must have admin access to a repository to use this resource. ## Example Usage -```hcl +```terraform resource "github_repository" "example" { name = "my-repository" } @@ -28,8 +26,8 @@ resource "github_workflow_repository_permissions" "test" { The following arguments are supported: -* `repository` - (Required) The GitHub repository -* `default_workflow_permissions` - (Optional) The default workflow permissions granted to the GITHUB_TOKEN when running workflows. Can be one of: `read` or `write`. +* `repository` - (Required) The GitHub repository +* `default_workflow_permissions` - (Optional) The default workflow permissions granted to the GITHUB_TOKEN when running workflows. Can be one of: `read` or `write`. * `can_approve_pull_request_reviews` - (Optional) Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. ## Import diff --git a/examples/data-sources/actions_environment_public_key/example_1.tf b/examples/data-sources/actions_environment_public_key/example_1.tf new file mode 100644 index 0000000000..250aa5fbcb --- /dev/null +++ b/examples/data-sources/actions_environment_public_key/example_1.tf @@ -0,0 +1,4 @@ +data "github_actions_environment_public_key" "example" { + repository = "example_repo" + environment = "example_environment" +} diff --git a/examples/data-sources/actions_environment_secrets/example_1.tf b/examples/data-sources/actions_environment_secrets/example_1.tf new file mode 100644 index 0000000000..4a619005c1 --- /dev/null +++ b/examples/data-sources/actions_environment_secrets/example_1.tf @@ -0,0 +1,4 @@ +data "github_actions_environment_secrets" "example" { + name = "exampleRepo" + environment = "exampleEnvironment" +} diff --git a/examples/data-sources/actions_environment_variables/example_1.tf b/examples/data-sources/actions_environment_variables/example_1.tf new file mode 100644 index 0000000000..81a85eaccb --- /dev/null +++ b/examples/data-sources/actions_environment_variables/example_1.tf @@ -0,0 +1,4 @@ +data "github_actions_environment_variables" "example" { + name = "exampleRepo" + environment = "exampleEnvironment" +} diff --git a/examples/data-sources/actions_organization_oidc_subject_claim_customization_template/example_1.tf b/examples/data-sources/actions_organization_oidc_subject_claim_customization_template/example_1.tf new file mode 100644 index 0000000000..be5ecb9002 --- /dev/null +++ b/examples/data-sources/actions_organization_oidc_subject_claim_customization_template/example_1.tf @@ -0,0 +1,2 @@ +data "github_actions_organization_oidc_subject_claim_customization_template" "example" { +} diff --git a/examples/data-sources/actions_organization_public_key/example_1.tf b/examples/data-sources/actions_organization_public_key/example_1.tf new file mode 100644 index 0000000000..cb13e7930a --- /dev/null +++ b/examples/data-sources/actions_organization_public_key/example_1.tf @@ -0,0 +1 @@ +data "github_actions_organization_public_key" "example" {} diff --git a/examples/data-sources/actions_organization_registration_token/example_1.tf b/examples/data-sources/actions_organization_registration_token/example_1.tf new file mode 100644 index 0000000000..bb6c6edd2e --- /dev/null +++ b/examples/data-sources/actions_organization_registration_token/example_1.tf @@ -0,0 +1,2 @@ +data "github_actions_organization_registration_token" "example" { +} diff --git a/examples/data-sources/actions_organization_secrets/example_1.tf b/examples/data-sources/actions_organization_secrets/example_1.tf new file mode 100644 index 0000000000..e9bf52a4f8 --- /dev/null +++ b/examples/data-sources/actions_organization_secrets/example_1.tf @@ -0,0 +1,2 @@ +data "github_actions_organization_secrets" "example" { +} diff --git a/examples/data-sources/actions_organization_variables/example_1.tf b/examples/data-sources/actions_organization_variables/example_1.tf new file mode 100644 index 0000000000..81c954e460 --- /dev/null +++ b/examples/data-sources/actions_organization_variables/example_1.tf @@ -0,0 +1,2 @@ +data "github_actions_organization_variables" "example" { +} diff --git a/examples/data-sources/actions_public_key/example_1.tf b/examples/data-sources/actions_public_key/example_1.tf new file mode 100644 index 0000000000..6ebd23a389 --- /dev/null +++ b/examples/data-sources/actions_public_key/example_1.tf @@ -0,0 +1,3 @@ +data "github_actions_public_key" "example" { + repository = "example_repo" +} diff --git a/examples/data-sources/actions_registration_token/example_1.tf b/examples/data-sources/actions_registration_token/example_1.tf new file mode 100644 index 0000000000..0ad6656fe1 --- /dev/null +++ b/examples/data-sources/actions_registration_token/example_1.tf @@ -0,0 +1,3 @@ +data "github_actions_registration_token" "example" { + repository = "example_repo" +} diff --git a/examples/data-sources/actions_repository_oidc_subject_claim_customization_template/example_1.tf b/examples/data-sources/actions_repository_oidc_subject_claim_customization_template/example_1.tf new file mode 100644 index 0000000000..bc94f6bba2 --- /dev/null +++ b/examples/data-sources/actions_repository_oidc_subject_claim_customization_template/example_1.tf @@ -0,0 +1,3 @@ +data "github_actions_repository_oidc_subject_claim_customization_template" "example" { + name = "example_repository" +} diff --git a/examples/data-sources/actions_secrets/example_1.tf b/examples/data-sources/actions_secrets/example_1.tf new file mode 100644 index 0000000000..89c4036f2a --- /dev/null +++ b/examples/data-sources/actions_secrets/example_1.tf @@ -0,0 +1,3 @@ +data "github_actions_secrets" "example" { + name = "example" +} diff --git a/examples/data-sources/actions_variables/example_1.tf b/examples/data-sources/actions_variables/example_1.tf new file mode 100644 index 0000000000..e6a62d67c3 --- /dev/null +++ b/examples/data-sources/actions_variables/example_1.tf @@ -0,0 +1,3 @@ +data "github_actions_variables" "example" { + name = "example" +} diff --git a/examples/data-sources/app/example_1.tf b/examples/data-sources/app/example_1.tf new file mode 100644 index 0000000000..e6dd3e0a51 --- /dev/null +++ b/examples/data-sources/app/example_1.tf @@ -0,0 +1,3 @@ +data "github_app" "foobar" { + slug = "foobar" +} diff --git a/examples/data-sources/app_token/example_1.tf b/examples/data-sources/app_token/example_1.tf new file mode 100644 index 0000000000..2d578f3876 --- /dev/null +++ b/examples/data-sources/app_token/example_1.tf @@ -0,0 +1,5 @@ +data "github_app_token" "this" { + app_id = "123456" + installation_id = "78910" + pem_file = file("foo/bar.pem") +} diff --git a/examples/data-sources/branch/example_1.tf b/examples/data-sources/branch/example_1.tf new file mode 100644 index 0000000000..e78991a304 --- /dev/null +++ b/examples/data-sources/branch/example_1.tf @@ -0,0 +1,4 @@ +data "github_branch" "development" { + repository = "example" + branch = "development" +} diff --git a/examples/data-sources/branch_protection_rules/example_1.tf b/examples/data-sources/branch_protection_rules/example_1.tf new file mode 100644 index 0000000000..f829069632 --- /dev/null +++ b/examples/data-sources/branch_protection_rules/example_1.tf @@ -0,0 +1,3 @@ +data "github_branch_protection_rules" "example" { + repository = "example" +} diff --git a/examples/data-sources/codespaces_organization_public_key/example_1.tf b/examples/data-sources/codespaces_organization_public_key/example_1.tf new file mode 100644 index 0000000000..3fc45d0858 --- /dev/null +++ b/examples/data-sources/codespaces_organization_public_key/example_1.tf @@ -0,0 +1 @@ +data "github_codespaces_organization_public_key" "example" {} diff --git a/examples/data-sources/codespaces_organization_secrets/example_1.tf b/examples/data-sources/codespaces_organization_secrets/example_1.tf new file mode 100644 index 0000000000..a1cdf2742e --- /dev/null +++ b/examples/data-sources/codespaces_organization_secrets/example_1.tf @@ -0,0 +1,2 @@ +data "github_codespaces_organization_secrets" "example" { +} diff --git a/examples/data-sources/codespaces_public_key/example_1.tf b/examples/data-sources/codespaces_public_key/example_1.tf new file mode 100644 index 0000000000..4e40e874e6 --- /dev/null +++ b/examples/data-sources/codespaces_public_key/example_1.tf @@ -0,0 +1,3 @@ +data "github_codespaces_public_key" "example" { + repository = "example_repo" +} diff --git a/examples/data-sources/codespaces_secrets/example_1.tf b/examples/data-sources/codespaces_secrets/example_1.tf new file mode 100644 index 0000000000..c00b20454d --- /dev/null +++ b/examples/data-sources/codespaces_secrets/example_1.tf @@ -0,0 +1,7 @@ +data "github_codespaces_secrets" "example" { + name = "example_repository" +} + +data "github_codespaces_secrets" "example_2" { + full_name = "org/example_repository" +} diff --git a/examples/data-sources/codespaces_user_public_key/example_1.tf b/examples/data-sources/codespaces_user_public_key/example_1.tf new file mode 100644 index 0000000000..f2c40f1862 --- /dev/null +++ b/examples/data-sources/codespaces_user_public_key/example_1.tf @@ -0,0 +1 @@ +data "github_codespaces_user_public_key" "example" {} diff --git a/examples/data-sources/codespaces_user_secrets/example_1.tf b/examples/data-sources/codespaces_user_secrets/example_1.tf new file mode 100644 index 0000000000..9daa1908c1 --- /dev/null +++ b/examples/data-sources/codespaces_user_secrets/example_1.tf @@ -0,0 +1,2 @@ +data "github_codespaces_user_secrets" "example" { +} diff --git a/examples/data-sources/collaborators/example_1.tf b/examples/data-sources/collaborators/example_1.tf new file mode 100644 index 0000000000..cb25f12da8 --- /dev/null +++ b/examples/data-sources/collaborators/example_1.tf @@ -0,0 +1,4 @@ +data "github_collaborators" "test" { + owner = "example_owner" + repository = "example_repository" +} diff --git a/examples/data-sources/dependabot_organization_public_key/example_1.tf b/examples/data-sources/dependabot_organization_public_key/example_1.tf new file mode 100644 index 0000000000..52373c44d8 --- /dev/null +++ b/examples/data-sources/dependabot_organization_public_key/example_1.tf @@ -0,0 +1 @@ +data "github_dependabot_organization_public_key" "example" {} diff --git a/examples/data-sources/dependabot_organization_secrets/example_1.tf b/examples/data-sources/dependabot_organization_secrets/example_1.tf new file mode 100644 index 0000000000..4f92aec63d --- /dev/null +++ b/examples/data-sources/dependabot_organization_secrets/example_1.tf @@ -0,0 +1,2 @@ +data "github_dependabot_organization_secrets" "example" { +} diff --git a/examples/data-sources/dependabot_public_key/example_1.tf b/examples/data-sources/dependabot_public_key/example_1.tf new file mode 100644 index 0000000000..b650d702ab --- /dev/null +++ b/examples/data-sources/dependabot_public_key/example_1.tf @@ -0,0 +1,3 @@ +data "github_dependabot_public_key" "example" { + repository = "example_repo" +} diff --git a/examples/data-sources/dependabot_secrets/example_1.tf b/examples/data-sources/dependabot_secrets/example_1.tf new file mode 100644 index 0000000000..eef8dbc22d --- /dev/null +++ b/examples/data-sources/dependabot_secrets/example_1.tf @@ -0,0 +1,3 @@ +data "github_dependabot_secrets" "example" { + name = "example" +} diff --git a/examples/data-sources/external_groups/example_1.tf b/examples/data-sources/external_groups/example_1.tf new file mode 100644 index 0000000000..edf3625010 --- /dev/null +++ b/examples/data-sources/external_groups/example_1.tf @@ -0,0 +1,9 @@ +data "github_external_groups" "example_external_groups" {} + +locals { + local_groups = "${data.github_external_groups.example_external_groups}" +} + +output "groups" { + value = local.local_groups +} diff --git a/examples/data-sources/ip_ranges/example_1.tf b/examples/data-sources/ip_ranges/example_1.tf new file mode 100644 index 0000000000..c1b4dd4083 --- /dev/null +++ b/examples/data-sources/ip_ranges/example_1.tf @@ -0,0 +1 @@ +data "github_ip_ranges" "test" {} diff --git a/examples/data-sources/issue_labels/example_1.tf b/examples/data-sources/issue_labels/example_1.tf new file mode 100644 index 0000000000..5e1deb5580 --- /dev/null +++ b/examples/data-sources/issue_labels/example_1.tf @@ -0,0 +1,3 @@ +data "github_issue_labels" "test" { + repository = "example_repository" +} diff --git a/examples/data-sources/membership/example_1.tf b/examples/data-sources/membership/example_1.tf new file mode 100644 index 0000000000..e3824a3b0f --- /dev/null +++ b/examples/data-sources/membership/example_1.tf @@ -0,0 +1,3 @@ +data "github_membership" "membership_for_some_user" { + username = "SomeUser" +} diff --git a/examples/data-sources/organization/example_1.tf b/examples/data-sources/organization/example_1.tf new file mode 100644 index 0000000000..8c59e7f212 --- /dev/null +++ b/examples/data-sources/organization/example_1.tf @@ -0,0 +1,3 @@ +data "github_organization" "example" { + name = "github" +} diff --git a/examples/data-sources/organization_app_installations/example_1.tf b/examples/data-sources/organization_app_installations/example_1.tf new file mode 100644 index 0000000000..8879ac2315 --- /dev/null +++ b/examples/data-sources/organization_app_installations/example_1.tf @@ -0,0 +1 @@ +data "github_organization_app_installations" "all" {} diff --git a/examples/data-sources/organization_custom_properties/example_1.tf b/examples/data-sources/organization_custom_properties/example_1.tf new file mode 100644 index 0000000000..5bda02686d --- /dev/null +++ b/examples/data-sources/organization_custom_properties/example_1.tf @@ -0,0 +1,3 @@ +data "github_organization_custom_properties" "environment" { + property_name = "environment" +} diff --git a/examples/data-sources/organization_custom_role/example_1.tf b/examples/data-sources/organization_custom_role/example_1.tf new file mode 100644 index 0000000000..469a9d2f16 --- /dev/null +++ b/examples/data-sources/organization_custom_role/example_1.tf @@ -0,0 +1,3 @@ +data "github_organization_custom_role" "example" { + name = "example" +} diff --git a/examples/data-sources/organization_external_identities/example_1.tf b/examples/data-sources/organization_external_identities/example_1.tf new file mode 100644 index 0000000000..3111709a63 --- /dev/null +++ b/examples/data-sources/organization_external_identities/example_1.tf @@ -0,0 +1 @@ +data "github_organization_external_identities" "all" {} diff --git a/examples/data-sources/organization_ip_allow_list/example_1.tf b/examples/data-sources/organization_ip_allow_list/example_1.tf new file mode 100644 index 0000000000..b86d8115a0 --- /dev/null +++ b/examples/data-sources/organization_ip_allow_list/example_1.tf @@ -0,0 +1 @@ +data "github_organization_ip_allow_list" "all" {} diff --git a/examples/data-sources/organization_repository_role/example_1.tf b/examples/data-sources/organization_repository_role/example_1.tf new file mode 100644 index 0000000000..52b359b824 --- /dev/null +++ b/examples/data-sources/organization_repository_role/example_1.tf @@ -0,0 +1,3 @@ +data "github_organization_repository_role" "example" { + role_id = 1234 +} diff --git a/examples/data-sources/organization_repository_roles/example_1.tf b/examples/data-sources/organization_repository_roles/example_1.tf new file mode 100644 index 0000000000..83ac79284c --- /dev/null +++ b/examples/data-sources/organization_repository_roles/example_1.tf @@ -0,0 +1,2 @@ +data "github_organization_repository_roles" "example" { +} diff --git a/examples/data-sources/organization_role/example_1.tf b/examples/data-sources/organization_role/example_1.tf new file mode 100644 index 0000000000..b747f2df0d --- /dev/null +++ b/examples/data-sources/organization_role/example_1.tf @@ -0,0 +1,3 @@ +data "github_organization_role" "example" { + role_id = 1234 +} diff --git a/examples/data-sources/organization_role_teams/example_1.tf b/examples/data-sources/organization_role_teams/example_1.tf new file mode 100644 index 0000000000..23721f4648 --- /dev/null +++ b/examples/data-sources/organization_role_teams/example_1.tf @@ -0,0 +1,3 @@ +data "github_organization_role_teams" "example" { + role_id = 1234 +} diff --git a/examples/data-sources/organization_role_users/example_1.tf b/examples/data-sources/organization_role_users/example_1.tf new file mode 100644 index 0000000000..62e2554343 --- /dev/null +++ b/examples/data-sources/organization_role_users/example_1.tf @@ -0,0 +1,3 @@ +data "github_organization_role_users" "example" { + role_id = 1234 +} diff --git a/examples/data-sources/organization_roles/example_1.tf b/examples/data-sources/organization_roles/example_1.tf new file mode 100644 index 0000000000..ad06a5fd68 --- /dev/null +++ b/examples/data-sources/organization_roles/example_1.tf @@ -0,0 +1,2 @@ +data "github_organization_roles" "example" { +} diff --git a/examples/data-sources/organization_security_managers/example_1.tf b/examples/data-sources/organization_security_managers/example_1.tf new file mode 100644 index 0000000000..a8cb38d5a8 --- /dev/null +++ b/examples/data-sources/organization_security_managers/example_1.tf @@ -0,0 +1 @@ +data "github_organization_security_managers" "test" {} diff --git a/examples/data-sources/organization_team_sync_groups/example_1.tf b/examples/data-sources/organization_team_sync_groups/example_1.tf new file mode 100644 index 0000000000..19c77b153c --- /dev/null +++ b/examples/data-sources/organization_team_sync_groups/example_1.tf @@ -0,0 +1 @@ +data "github_organization_team_sync_groups" "test" {} diff --git a/examples/data-sources/organization_teams/example_1.tf b/examples/data-sources/organization_teams/example_1.tf new file mode 100644 index 0000000000..29688f01f4 --- /dev/null +++ b/examples/data-sources/organization_teams/example_1.tf @@ -0,0 +1 @@ +data "github_organization_teams" "all" {} diff --git a/examples/data-sources/organization_teams/example_2.tf b/examples/data-sources/organization_teams/example_2.tf new file mode 100644 index 0000000000..10ad7ef2c5 --- /dev/null +++ b/examples/data-sources/organization_teams/example_2.tf @@ -0,0 +1,3 @@ +data "github_organization_teams" "root_teams" { + root_teams_only = true +} diff --git a/examples/data-sources/organization_webhooks/example_1.tf b/examples/data-sources/organization_webhooks/example_1.tf new file mode 100644 index 0000000000..89b1a08651 --- /dev/null +++ b/examples/data-sources/organization_webhooks/example_1.tf @@ -0,0 +1 @@ +data "github_organization_webhooks" "all" {} diff --git a/examples/data-sources/ref/example_1.tf b/examples/data-sources/ref/example_1.tf new file mode 100644 index 0000000000..cc0d570d41 --- /dev/null +++ b/examples/data-sources/ref/example_1.tf @@ -0,0 +1,5 @@ +data "github_ref" "development" { + owner = "example" + repository = "example" + ref = "heads/development" +} diff --git a/examples/data-sources/release/example_1.tf b/examples/data-sources/release/example_1.tf new file mode 100644 index 0000000000..45b5edb97b --- /dev/null +++ b/examples/data-sources/release/example_1.tf @@ -0,0 +1,5 @@ +data "github_release" "example" { + repository = "example-repository" + owner = "example-owner" + retrieve_by = "latest" +} diff --git a/examples/data-sources/release/example_2.tf b/examples/data-sources/release/example_2.tf new file mode 100644 index 0000000000..83049e0c2c --- /dev/null +++ b/examples/data-sources/release/example_2.tf @@ -0,0 +1,6 @@ +data "github_release" "example" { + repository = "example-repository" + owner = "example-owner" + retrieve_by = "id" + id = 12345 +} diff --git a/examples/data-sources/release/example_3.tf b/examples/data-sources/release/example_3.tf new file mode 100644 index 0000000000..d64cc031a1 --- /dev/null +++ b/examples/data-sources/release/example_3.tf @@ -0,0 +1,6 @@ +data "github_release" "example" { + repository = "example-repository" + owner = "example-owner" + retrieve_by = "tag" + release_tag = "v1.0.0" +} diff --git a/examples/data-sources/release_asset/example_1.tf b/examples/data-sources/release_asset/example_1.tf new file mode 100644 index 0000000000..e39f7185e5 --- /dev/null +++ b/examples/data-sources/release_asset/example_1.tf @@ -0,0 +1,5 @@ +data "github_release_asset" "example" { + repository = "example-repository" + owner = "example-owner" + asset_id = 12345 +} diff --git a/examples/data-sources/release_asset/example_2.tf b/examples/data-sources/release_asset/example_2.tf new file mode 100644 index 0000000000..99336c17a8 --- /dev/null +++ b/examples/data-sources/release_asset/example_2.tf @@ -0,0 +1,6 @@ +data "github_release_asset" "example" { + repository = "example-repository" + owner = "example-owner" + asset_id = 12345 + download_file = true +} diff --git a/examples/data-sources/release_asset/example_3.tf b/examples/data-sources/release_asset/example_3.tf new file mode 100644 index 0000000000..030676f95c --- /dev/null +++ b/examples/data-sources/release_asset/example_3.tf @@ -0,0 +1,11 @@ +data "github_release" "example" { + repository = "example-repository" + owner = "example-owner" + retrieve_by = "latest" +} + +data "github_release_asset" "example" { + repository = "example-repository" + owner = "example-owner" + asset_id = data.github_release.example.assets[0].id +} diff --git a/examples/data-sources/release_asset/example_4.tf b/examples/data-sources/release_asset/example_4.tf new file mode 100644 index 0000000000..58c992b466 --- /dev/null +++ b/examples/data-sources/release_asset/example_4.tf @@ -0,0 +1,12 @@ +data "github_release" "example" { + repository = "example-repository" + owner = "example-owner" + retrieve_by = "latest" +} + +data "github_release_asset" "example" { + count = length(data.github_release.example.assets) + repository = "example-repository" + owner = "example-owner" + asset_id = data.github_release.example.assets[count.index].id +} diff --git a/examples/data-sources/repositories/example_1.tf b/examples/data-sources/repositories/example_1.tf new file mode 100644 index 0000000000..d1ab5892a7 --- /dev/null +++ b/examples/data-sources/repositories/example_1.tf @@ -0,0 +1,4 @@ +data "github_repositories" "example" { + query = "org:hashicorp language:Go" + include_repo_id = true +} diff --git a/examples/data-sources/repository/example_1.tf b/examples/data-sources/repository/example_1.tf new file mode 100644 index 0000000000..f1a2db8b84 --- /dev/null +++ b/examples/data-sources/repository/example_1.tf @@ -0,0 +1,3 @@ +data "github_repository" "example" { + full_name = "hashicorp/terraform" +} diff --git a/examples/data-sources/repository_autolink_references/example_1.tf b/examples/data-sources/repository_autolink_references/example_1.tf new file mode 100644 index 0000000000..404eedbda7 --- /dev/null +++ b/examples/data-sources/repository_autolink_references/example_1.tf @@ -0,0 +1,3 @@ +data "github_repository_autolink_references" "example" { + repository = "example-repository" +} diff --git a/examples/data-sources/repository_branches/example_1.tf b/examples/data-sources/repository_branches/example_1.tf new file mode 100644 index 0000000000..d6a2104b83 --- /dev/null +++ b/examples/data-sources/repository_branches/example_1.tf @@ -0,0 +1,3 @@ +data "github_repository_branches" "example" { + repository = "example-repository" +} diff --git a/examples/data-sources/repository_custom_properties/example_1.tf b/examples/data-sources/repository_custom_properties/example_1.tf new file mode 100644 index 0000000000..afdabd2545 --- /dev/null +++ b/examples/data-sources/repository_custom_properties/example_1.tf @@ -0,0 +1,3 @@ +data "github_repository_custom_properties" "example" { + repository = "example-repository" +} diff --git a/examples/data-sources/repository_deploy_keys/example_1.tf b/examples/data-sources/repository_deploy_keys/example_1.tf new file mode 100644 index 0000000000..fe8507aedf --- /dev/null +++ b/examples/data-sources/repository_deploy_keys/example_1.tf @@ -0,0 +1,3 @@ +data "github_repository_deploy_keys" "example" { + repository = "example-repository" +} diff --git a/examples/data-sources/repository_deployment_branch_policies/example_1.tf b/examples/data-sources/repository_deployment_branch_policies/example_1.tf new file mode 100644 index 0000000000..6c4e7fbc1d --- /dev/null +++ b/examples/data-sources/repository_deployment_branch_policies/example_1.tf @@ -0,0 +1,4 @@ +data "github_repository_deployment_branch_policies" "example" { + repository = "example-repository" + environment_name = "env_name" +} diff --git a/examples/data-sources/repository_environment_deployment_policies/example_1.tf b/examples/data-sources/repository_environment_deployment_policies/example_1.tf new file mode 100644 index 0000000000..1df14bce56 --- /dev/null +++ b/examples/data-sources/repository_environment_deployment_policies/example_1.tf @@ -0,0 +1,4 @@ +data "github_repository_environment_deployment_policies" "example" { + repository = "example-repository" + environment = "env-name" +} diff --git a/examples/data-sources/repository_environments/example_1.tf b/examples/data-sources/repository_environments/example_1.tf new file mode 100644 index 0000000000..6b5b7ed1de --- /dev/null +++ b/examples/data-sources/repository_environments/example_1.tf @@ -0,0 +1,3 @@ +data "github_repository_environments" "example" { + repository = "example-repository" +} diff --git a/examples/data-sources/repository_file/example_1.tf b/examples/data-sources/repository_file/example_1.tf new file mode 100644 index 0000000000..ea7be268b9 --- /dev/null +++ b/examples/data-sources/repository_file/example_1.tf @@ -0,0 +1,6 @@ +data "github_repository_file" "foo" { + repository = github_repository.foo.name + branch = "main" + file = ".gitignore" +} + diff --git a/examples/data-sources/repository_milestone/example_1.tf b/examples/data-sources/repository_milestone/example_1.tf new file mode 100644 index 0000000000..a30d0b9655 --- /dev/null +++ b/examples/data-sources/repository_milestone/example_1.tf @@ -0,0 +1,5 @@ +data "github_repository_milestone" "example" { + owner = "example-owner" + repository = "example-repository" + number = 1 +} diff --git a/examples/data-sources/repository_pull_request/example_1.tf b/examples/data-sources/repository_pull_request/example_1.tf new file mode 100644 index 0000000000..365eab9685 --- /dev/null +++ b/examples/data-sources/repository_pull_request/example_1.tf @@ -0,0 +1,4 @@ +data "github_repository_pull_request" "example" { + base_repository = "example_repository" + number = 1 +} diff --git a/examples/data-sources/repository_pull_requests/example_1.tf b/examples/data-sources/repository_pull_requests/example_1.tf new file mode 100644 index 0000000000..39bda8efbe --- /dev/null +++ b/examples/data-sources/repository_pull_requests/example_1.tf @@ -0,0 +1,7 @@ +data "github_repository_pull_requests" "example" { + base_repository = "example-repository" + base_ref = "main" + sort_by = "updated" + sort_direction = "desc" + state = "open" +} diff --git a/examples/data-sources/repository_teams/example_1.tf b/examples/data-sources/repository_teams/example_1.tf new file mode 100644 index 0000000000..f507ba7a3f --- /dev/null +++ b/examples/data-sources/repository_teams/example_1.tf @@ -0,0 +1,3 @@ +data "github_repository_teams" "example" { + name = "example" +} diff --git a/examples/data-sources/repository_webhooks/example_1.tf b/examples/data-sources/repository_webhooks/example_1.tf new file mode 100644 index 0000000000..d740a8a02f --- /dev/null +++ b/examples/data-sources/repository_webhooks/example_1.tf @@ -0,0 +1,3 @@ +data "github_repository_webhooks" "repo" { + repository = "foo" +} diff --git a/examples/data-sources/rest_api/example_1.tf b/examples/data-sources/rest_api/example_1.tf new file mode 100644 index 0000000000..c0a2ca49cc --- /dev/null +++ b/examples/data-sources/rest_api/example_1.tf @@ -0,0 +1,3 @@ +data "github_rest_api" "example" { + endpoint = "repos/example_repo/git/refs/heads/main" +} diff --git a/examples/data-sources/ssh_keys/example_1.tf b/examples/data-sources/ssh_keys/example_1.tf new file mode 100644 index 0000000000..72159b2f54 --- /dev/null +++ b/examples/data-sources/ssh_keys/example_1.tf @@ -0,0 +1 @@ +data "github_ssh_keys" "test" {} diff --git a/examples/data-sources/team/example_1.tf b/examples/data-sources/team/example_1.tf new file mode 100644 index 0000000000..9769d1b1e4 --- /dev/null +++ b/examples/data-sources/team/example_1.tf @@ -0,0 +1,3 @@ +data "github_team" "example" { + slug = "example" +} diff --git a/examples/data-sources/tree/example_1.tf b/examples/data-sources/tree/example_1.tf new file mode 100644 index 0000000000..f071612178 --- /dev/null +++ b/examples/data-sources/tree/example_1.tf @@ -0,0 +1,19 @@ +data "github_repository" "this" { + name = "example" +} + +data "github_branch" "this" { + branch = data.github_repository.this.default_branch + repository = data.github_repository.this.name +} + +data "github_tree" "this" { + recursive = false + repository = data.github_repository.this.name + tree_sha = data.github_branch.this.sha +} + +output "entries" { + value = data.github_tree.this.entries +} + diff --git a/examples/data-sources/user/example_1.tf b/examples/data-sources/user/example_1.tf new file mode 100644 index 0000000000..f710c1b62b --- /dev/null +++ b/examples/data-sources/user/example_1.tf @@ -0,0 +1,14 @@ +# Retrieve information about a GitHub user. +data "github_user" "example" { + username = "example" +} + +# Retrieve information about the currently authenticated user. +data "github_user" "current" { + username = "" +} + +output "current_github_login" { + value = "${data.github_user.current.login}" +} + diff --git a/examples/data-sources/user_external_identity/example_1.tf b/examples/data-sources/user_external_identity/example_1.tf new file mode 100644 index 0000000000..c4df822cd5 --- /dev/null +++ b/examples/data-sources/user_external_identity/example_1.tf @@ -0,0 +1,3 @@ +data "github_user_external_identity" "example_user" { + username = "example-user" +} diff --git a/examples/data-sources/users/example_1.tf b/examples/data-sources/users/example_1.tf new file mode 100644 index 0000000000..aa6c03589e --- /dev/null +++ b/examples/data-sources/users/example_1.tf @@ -0,0 +1,12 @@ +# Retrieve information about multiple GitHub users. +data "github_users" "example" { + usernames = ["example1", "example2", "example3"] +} + +output "valid_users" { + value = "${data.github_users.example.logins}" +} + +output "invalid_users" { + value = "${data.github_users.example.unknown_logins}" +} diff --git a/examples/example_1.tf b/examples/example_1.tf new file mode 100644 index 0000000000..285894e915 --- /dev/null +++ b/examples/example_1.tf @@ -0,0 +1,16 @@ +terraform { + required_providers { + github = { + source = "integrations/github" + version = "~> 6.0" + } + } +} + +# Configure the GitHub Provider +provider "github" {} + +# Add a user to the organization +resource "github_membership" "membership_for_user_x" { + # ... +} diff --git a/examples/example_2.tf b/examples/example_2.tf new file mode 100644 index 0000000000..247641b8a0 --- /dev/null +++ b/examples/example_2.tf @@ -0,0 +1,9 @@ +# Configure the GitHub Provider +provider "github" { + version = "~> 5.0" +} + +# Add a user to the organization +resource "github_membership" "membership_for_user_x" { + # ... +} diff --git a/examples/example_3.tf b/examples/example_3.tf new file mode 100644 index 0000000000..0e0f42fb61 --- /dev/null +++ b/examples/example_3.tf @@ -0,0 +1,3 @@ +provider "github" { + token = var.token # or `GITHUB_TOKEN` +} diff --git a/examples/example_4.tf b/examples/example_4.tf new file mode 100644 index 0000000000..abf529aae9 --- /dev/null +++ b/examples/example_4.tf @@ -0,0 +1,8 @@ +provider "github" { + owner = var.github_organization + app_auth { + id = var.app_id # or `GITHUB_APP_ID` + installation_id = var.app_installation_id # or `GITHUB_APP_INSTALLATION_ID` + pem_file = var.app_pem_file # or `GITHUB_APP_PEM_FILE` + } +} diff --git a/examples/example_5.tf b/examples/example_5.tf new file mode 100644 index 0000000000..0c3fb2cfd9 --- /dev/null +++ b/examples/example_5.tf @@ -0,0 +1,4 @@ +provider "github" { + owner = var.github_organization + app_auth {} # When using `GITHUB_APP_XXX` environment variables +} diff --git a/examples/resources/actions_environment_secret/example_1.tf b/examples/resources/actions_environment_secret/example_1.tf new file mode 100644 index 0000000000..6297bb1ed1 --- /dev/null +++ b/examples/resources/actions_environment_secret/example_1.tf @@ -0,0 +1,14 @@ +resource "github_actions_environment_secret" "example_plaintext" { + repository = "example-repo" + environment = "example-environment" + secret_name = "example_secret_name" + plaintext_value = "example-value +} + +resource "github_actions_environment_secret" "example_encrypted" { + repository = "example-repo" + environment = "example-environment" + secret_name = "example_secret_name" + key_id = var.key_id + encrypted_value = var.encrypted_secret_string +} diff --git a/examples/resources/actions_environment_secret/example_2.tf b/examples/resources/actions_environment_secret/example_2.tf new file mode 100644 index 0000000000..359ee8efdb --- /dev/null +++ b/examples/resources/actions_environment_secret/example_2.tf @@ -0,0 +1,15 @@ +data "github_repository" "example" { + full_name = "my-org/repo" +} + +resource "github_repository_environment" "example_plaintext" { + repository = data.github_repository.example.name + environment = "example-environment" +} + +resource "github_actions_environment_secret" "example_encrypted" { + repository = data.github_repository.example.name + environment = github_repository_environment.example.environment + secret_name = "test_secret_name" + plaintext_value = "example-value" +} diff --git a/examples/resources/actions_environment_secret/example_3.tf b/examples/resources/actions_environment_secret/example_3.tf new file mode 100644 index 0000000000..a622c1b1b9 --- /dev/null +++ b/examples/resources/actions_environment_secret/example_3.tf @@ -0,0 +1,10 @@ +resource "github_actions_environment_secret" "example_allow_drift" { + repository = "example-repo" + environment = "example-environment" + secret_name = "example_secret_name" + plaintext_value = "placeholder" + + lifecycle { + ignore_changes = [remote_updated_at] + } +} diff --git a/examples/resources/actions_environment_secret/example_4.tf b/examples/resources/actions_environment_secret/example_4.tf new file mode 100644 index 0000000000..d832c9bc01 --- /dev/null +++ b/examples/resources/actions_environment_secret/example_4.tf @@ -0,0 +1,4 @@ +import { + to = github_actions_environment_secret.example + id = "myrepo:myenv:mysecret" +} diff --git a/examples/resources/actions_environment_variable/example_1.tf b/examples/resources/actions_environment_variable/example_1.tf new file mode 100644 index 0000000000..52da906824 --- /dev/null +++ b/examples/resources/actions_environment_variable/example_1.tf @@ -0,0 +1,6 @@ +resource "github_actions_environment_variable" "example" { + repository = "example-repo" + environment = "example-environment" + variable_name = "example_variable_name" + value = "example-value" +} diff --git a/examples/resources/actions_environment_variable/example_2.tf b/examples/resources/actions_environment_variable/example_2.tf new file mode 100644 index 0000000000..bc1c7217e3 --- /dev/null +++ b/examples/resources/actions_environment_variable/example_2.tf @@ -0,0 +1,15 @@ +data "github_repository" "example" { + full_name = "my-org/repo" +} + +resource "github_repository_environment" "example" { + repository = data.github_repository.example.name + environment = "example_environment" +} + +resource "github_actions_environment_variable" "example" { + repository = data.github_repository.example.name + environment = github_repository_environment.example.environment + variable_name = "example_variable_name" + value = "example-value" +} diff --git a/examples/resources/actions_environment_variable/example_3.tf b/examples/resources/actions_environment_variable/example_3.tf new file mode 100644 index 0000000000..0677166071 --- /dev/null +++ b/examples/resources/actions_environment_variable/example_3.tf @@ -0,0 +1,4 @@ +import { + to = github_actions_environment_variable.example + id = "myrepo:myenv:myvariable" +} diff --git a/examples/resources/actions_hosted_runner/example_1.tf b/examples/resources/actions_hosted_runner/example_1.tf new file mode 100644 index 0000000000..f6bb0ceffb --- /dev/null +++ b/examples/resources/actions_hosted_runner/example_1.tf @@ -0,0 +1,16 @@ +resource "github_actions_runner_group" "example" { + name = "example-runner-group" + visibility = "all" +} + +resource "github_actions_hosted_runner" "example" { + name = "example-hosted-runner" + + image { + id = "2306" + source = "github" + } + + size = "4-core" + runner_group_id = github_actions_runner_group.example.id +} diff --git a/examples/resources/actions_hosted_runner/example_2.tf b/examples/resources/actions_hosted_runner/example_2.tf new file mode 100644 index 0000000000..208eca1d3b --- /dev/null +++ b/examples/resources/actions_hosted_runner/example_2.tf @@ -0,0 +1,18 @@ +resource "github_actions_runner_group" "advanced" { + name = "advanced-runner-group" + visibility = "selected" +} + +resource "github_actions_hosted_runner" "advanced" { + name = "advanced-hosted-runner" + + image { + id = "2306" + source = "github" + } + + size = "8-core" + runner_group_id = github_actions_runner_group.advanced.id + maximum_runners = 10 + public_ip_enabled = true +} diff --git a/examples/resources/actions_hosted_runner/example_3.tf b/examples/resources/actions_hosted_runner/example_3.tf new file mode 100644 index 0000000000..76b6fd7ce4 --- /dev/null +++ b/examples/resources/actions_hosted_runner/example_3.tf @@ -0,0 +1,15 @@ +resource "github_actions_hosted_runner" "example" { + name = "example-hosted-runner" + + image { + id = "2306" + source = "github" + } + + size = "4-core" + runner_group_id = github_actions_runner_group.example.id + + timeouts { + delete = "15m" + } +} diff --git a/examples/resources/actions_organization_oidc_subject_claim_customization_template/example_1.tf b/examples/resources/actions_organization_oidc_subject_claim_customization_template/example_1.tf new file mode 100644 index 0000000000..ac86ab0f65 --- /dev/null +++ b/examples/resources/actions_organization_oidc_subject_claim_customization_template/example_1.tf @@ -0,0 +1,3 @@ +resource "github_actions_organization_oidc_subject_claim_customization_template" "example_template" { + include_claim_keys = ["actor", "context", "repository_owner"] +} diff --git a/examples/resources/actions_organization_permissions/example_1.tf b/examples/resources/actions_organization_permissions/example_1.tf new file mode 100644 index 0000000000..88669ca6f8 --- /dev/null +++ b/examples/resources/actions_organization_permissions/example_1.tf @@ -0,0 +1,16 @@ +resource "github_repository" "example" { + name = "my-repository" +} + +resource "github_actions_organization_permissions" "test" { + allowed_actions = "selected" + enabled_repositories = "selected" + allowed_actions_config { + github_owned_allowed = true + patterns_allowed = ["actions/cache@*", "actions/checkout@*"] + verified_allowed = true + } + enabled_repositories_config { + repository_ids = [github_repository.example.repo_id] + } +} diff --git a/examples/resources/actions_organization_secret/example_1.tf b/examples/resources/actions_organization_secret/example_1.tf new file mode 100644 index 0000000000..2966a7d986 --- /dev/null +++ b/examples/resources/actions_organization_secret/example_1.tf @@ -0,0 +1,11 @@ +resource "github_actions_organization_secret" "example_plaintext" { + secret_name = "example_secret_name" + visibility = "all" + plaintext_value = var.some_secret_string +} + +resource "github_actions_organization_secret" "example_encrypted" { + secret_name = "example_secret_name" + visibility = "all" + encrypted_value = var.some_encrypted_secret_string +} diff --git a/examples/resources/actions_organization_secret/example_2.tf b/examples/resources/actions_organization_secret/example_2.tf new file mode 100644 index 0000000000..f8326d6a10 --- /dev/null +++ b/examples/resources/actions_organization_secret/example_2.tf @@ -0,0 +1,17 @@ +data "github_repository" "repo" { + full_name = "my-org/repo" +} + +resource "github_actions_organization_secret" "example_encrypted" { + secret_name = "example_secret_name" + visibility = "selected" + plaintext_value = var.some_secret_string + selected_repository_ids = [data.github_repository.repo.repo_id] +} + +resource "github_actions_organization_secret" "example_secret" { + secret_name = "example_secret_name" + visibility = "selected" + encrypted_value = var.some_encrypted_secret_string + selected_repository_ids = [data.github_repository.repo.repo_id] +} diff --git a/examples/resources/actions_organization_secret/example_3.tf b/examples/resources/actions_organization_secret/example_3.tf new file mode 100644 index 0000000000..0298d21782 --- /dev/null +++ b/examples/resources/actions_organization_secret/example_3.tf @@ -0,0 +1,9 @@ +resource "github_actions_organization_secret" "example_allow_drift" { + secret_name = "example_secret_name" + visibility = "all" + plaintext_value = "placeholder" + + lifecycle { + ignore_changes = [remote_updated_at] + } +} diff --git a/examples/resources/actions_organization_secret/example_4.tf b/examples/resources/actions_organization_secret/example_4.tf new file mode 100644 index 0000000000..01fbd76ede --- /dev/null +++ b/examples/resources/actions_organization_secret/example_4.tf @@ -0,0 +1,4 @@ +import { + to = github_actions_organization_secret.example + id = "mysecret" +} diff --git a/examples/resources/actions_organization_secret_repositories/example_1.tf b/examples/resources/actions_organization_secret_repositories/example_1.tf new file mode 100644 index 0000000000..e0f8480a95 --- /dev/null +++ b/examples/resources/actions_organization_secret_repositories/example_1.tf @@ -0,0 +1,15 @@ +resource "github_actions_organization_secret" "example" { + secret_name = "mysecret" + plaintext_value = "foo" + visibility = "selected" +} + +resource "github_repository" "example" { + name = "myrepo" + visibility = "public" +} + +resource "github_actions_organization_secret_repositories" "example" { + secret_name = github_actions_organization_secret.example.name + selected_repository_ids = [ github_repository.example.repo_id ] +} diff --git a/examples/resources/actions_organization_secret_repositories/example_2.tf b/examples/resources/actions_organization_secret_repositories/example_2.tf new file mode 100644 index 0000000000..d6159c884e --- /dev/null +++ b/examples/resources/actions_organization_secret_repositories/example_2.tf @@ -0,0 +1,4 @@ +import { + to = github_actions_organization_secret_repositories.example + id = "mysecret" +} diff --git a/examples/resources/actions_organization_secret_repository/example_1.tf b/examples/resources/actions_organization_secret_repository/example_1.tf new file mode 100644 index 0000000000..773f1e9839 --- /dev/null +++ b/examples/resources/actions_organization_secret_repository/example_1.tf @@ -0,0 +1,15 @@ +resource "github_actions_organization_secret" "example" { + secret_name = "mysecret" + plaintext_value = "foo" + visibility = "selected" +} + +resource "github_repository" "example" { + name = "myrepo" + visibility = "public" +} + +resource "github_actions_organization_secret_repository" "example" { + secret_name = github_actions_organization_secret.example.name + repository_id = github_repository.example.repo_id +} diff --git a/examples/resources/actions_organization_secret_repository/example_2.tf b/examples/resources/actions_organization_secret_repository/example_2.tf new file mode 100644 index 0000000000..70a81dbfa7 --- /dev/null +++ b/examples/resources/actions_organization_secret_repository/example_2.tf @@ -0,0 +1,4 @@ +import { + to = github_actions_organization_secret_repository.example + id = "mysecret:123456" +} diff --git a/examples/resources/actions_organization_variable/example_1.tf b/examples/resources/actions_organization_variable/example_1.tf new file mode 100644 index 0000000000..5c6bc79ea6 --- /dev/null +++ b/examples/resources/actions_organization_variable/example_1.tf @@ -0,0 +1,5 @@ +resource "github_actions_organization_variable" "example_variable" { + variable_name = "example_variable_name" + visibility = "private" + value = "example_variable_value" +} diff --git a/examples/resources/actions_organization_variable/example_2.tf b/examples/resources/actions_organization_variable/example_2.tf new file mode 100644 index 0000000000..cb19a329da --- /dev/null +++ b/examples/resources/actions_organization_variable/example_2.tf @@ -0,0 +1,10 @@ +data "github_repository" "repo" { + full_name = "my-org/repo" +} + +resource "github_actions_organization_variable" "example_variable" { + variable_name = "example_variable_name" + visibility = "selected" + value = "example_variable_value" + selected_repository_ids = [data.github_repository.repo.repo_id] +} diff --git a/examples/resources/actions_organization_variable/example_3.tf b/examples/resources/actions_organization_variable/example_3.tf new file mode 100644 index 0000000000..cb11903e03 --- /dev/null +++ b/examples/resources/actions_organization_variable/example_3.tf @@ -0,0 +1,4 @@ +import { + to = github_actions_organization_variable.example + id = "myvariable" +} diff --git a/examples/resources/actions_organization_variable_repositories/example_1.tf b/examples/resources/actions_organization_variable_repositories/example_1.tf new file mode 100644 index 0000000000..9da6627efe --- /dev/null +++ b/examples/resources/actions_organization_variable_repositories/example_1.tf @@ -0,0 +1,15 @@ +resource "github_actions_organization_variable" "example" { + variable_name = "myvariable" + plaintext_value = "foo" + visibility = "selected" +} + +resource "github_repository" "example" { + name = "myrepo" + visibility = "public" +} + +resource "github_actions_organization_variable_repositories" "example" { + variable_name = github_actions_organization_variable.example.name + selected_repository_ids = [ github_repository.example.repo_id ] +} diff --git a/examples/resources/actions_organization_variable_repositories/example_2.tf b/examples/resources/actions_organization_variable_repositories/example_2.tf new file mode 100644 index 0000000000..b5eb3fff4b --- /dev/null +++ b/examples/resources/actions_organization_variable_repositories/example_2.tf @@ -0,0 +1,4 @@ +import { + to = github_actions_organization_variable_repositories.example + id = "myvariable" +} diff --git a/examples/resources/actions_organization_variable_repository/example_1.tf b/examples/resources/actions_organization_variable_repository/example_1.tf new file mode 100644 index 0000000000..25c0d07a06 --- /dev/null +++ b/examples/resources/actions_organization_variable_repository/example_1.tf @@ -0,0 +1,15 @@ +resource "github_actions_organization_variable" "example" { + variable_name = "myvariable" + plaintext_value = "foo" + visibility = "selected" +} + +resource "github_repository" "example" { + name = "myrepo" + visibility = "public" +} + +resource "github_actions_organization_variable_repository" "example" { + variable_name = github_actions_organization_variable.example.name + repository_id = github_repository.example.repo_id +} diff --git a/examples/resources/actions_organization_variable_repository/example_2.tf b/examples/resources/actions_organization_variable_repository/example_2.tf new file mode 100644 index 0000000000..cc1d45ca0c --- /dev/null +++ b/examples/resources/actions_organization_variable_repository/example_2.tf @@ -0,0 +1,4 @@ +import { + to = github_actions_organization_variable_repository.example + id = "myvariable:123456" +} diff --git a/examples/resources/actions_organization_workflow_permissions/example_1.tf b/examples/resources/actions_organization_workflow_permissions/example_1.tf new file mode 100644 index 0000000000..db182194ca --- /dev/null +++ b/examples/resources/actions_organization_workflow_permissions/example_1.tf @@ -0,0 +1,15 @@ +# Basic workflow permissions configuration +resource "github_actions_organization_workflow_permissions" "example" { + organization_slug = "my-organization" + + default_workflow_permissions = "read" + can_approve_pull_request_reviews = false +} + +# Allow write permissions and PR approvals +resource "github_actions_organization_workflow_permissions" "permissive" { + organization_slug = "my-organization" + + default_workflow_permissions = "write" + can_approve_pull_request_reviews = true +} diff --git a/examples/resources/actions_repository_access_level/example_1.tf b/examples/resources/actions_repository_access_level/example_1.tf new file mode 100644 index 0000000000..6ea586b92d --- /dev/null +++ b/examples/resources/actions_repository_access_level/example_1.tf @@ -0,0 +1,9 @@ +resource "github_repository" "example" { + name = "my-repository" + visibility = "private" +} + +resource "github_actions_repository_access_level" "test" { + access_level = "user" + repository = github_repository.example.name +} diff --git a/examples/resources/actions_repository_oidc_subject_claim_customization_template/example_1.tf b/examples/resources/actions_repository_oidc_subject_claim_customization_template/example_1.tf new file mode 100644 index 0000000000..6bbb26b4d6 --- /dev/null +++ b/examples/resources/actions_repository_oidc_subject_claim_customization_template/example_1.tf @@ -0,0 +1,9 @@ +resource "github_repository" "example" { + name = "example-repository" +} + +resource "github_actions_repository_oidc_subject_claim_customization_template" "example_template" { + repository = github_repository.example.name + use_default = false + include_claim_keys = ["actor", "context", "repository_owner"] +} diff --git a/examples/resources/actions_repository_permissions/example_1.tf b/examples/resources/actions_repository_permissions/example_1.tf new file mode 100644 index 0000000000..f5ca96575f --- /dev/null +++ b/examples/resources/actions_repository_permissions/example_1.tf @@ -0,0 +1,13 @@ +resource "github_repository" "example" { + name = "my-repository" +} + +resource "github_actions_repository_permissions" "test" { + allowed_actions = "selected" + allowed_actions_config { + github_owned_allowed = true + patterns_allowed = ["actions/cache@*", "actions/checkout@*"] + verified_allowed = true + } + repository = github_repository.example.name +} diff --git a/examples/resources/actions_runner_group/example_1.tf b/examples/resources/actions_runner_group/example_1.tf new file mode 100644 index 0000000000..88a1344df2 --- /dev/null +++ b/examples/resources/actions_runner_group/example_1.tf @@ -0,0 +1,9 @@ +resource "github_repository" "example" { + name = "my-repository" +} + +resource "github_actions_runner_group" "example" { + name = github_repository.example.name + visibility = "selected" + selected_repository_ids = [github_repository.example.repo_id] +} diff --git a/examples/resources/actions_secret/example_1.tf b/examples/resources/actions_secret/example_1.tf new file mode 100644 index 0000000000..4b29115544 --- /dev/null +++ b/examples/resources/actions_secret/example_1.tf @@ -0,0 +1,11 @@ +resource "github_actions_secret" "example_plaintext" { + repository = "example_repository" + secret_name = "example_secret_name" + plaintext_value = var.some_secret_string +} + +resource "github_actions_secret" "example_encrypted" { + repository = "example_repository" + secret_name = "example_secret_name" + encrypted_value = var.some_encrypted_secret_string +} diff --git a/examples/resources/actions_secret/example_2.tf b/examples/resources/actions_secret/example_2.tf new file mode 100644 index 0000000000..bc6e77a0a4 --- /dev/null +++ b/examples/resources/actions_secret/example_2.tf @@ -0,0 +1,9 @@ +resource "github_actions_secret" "example_allow_drift" { + repository = "example_repository" + secret_name = "example_secret_name" + plaintext_value = "placeholder" + + lifecycle { + ignore_changes = [remote_updated_at] + } +} diff --git a/examples/resources/actions_secret/example_3.tf b/examples/resources/actions_secret/example_3.tf new file mode 100644 index 0000000000..e3c387a977 --- /dev/null +++ b/examples/resources/actions_secret/example_3.tf @@ -0,0 +1,4 @@ +import { + to = github_actions_secret.example + id = "myrepo:mysecret" +} diff --git a/examples/resources/actions_variable/example_1.tf b/examples/resources/actions_variable/example_1.tf new file mode 100644 index 0000000000..5e6c49f4b2 --- /dev/null +++ b/examples/resources/actions_variable/example_1.tf @@ -0,0 +1,5 @@ +resource "github_actions_variable" "example_variable" { + repository = "example_repository" + variable_name = "example_variable_name" + value = "example_variable_value" +} diff --git a/examples/resources/actions_variable/example_2.tf b/examples/resources/actions_variable/example_2.tf new file mode 100644 index 0000000000..3446ad0c97 --- /dev/null +++ b/examples/resources/actions_variable/example_2.tf @@ -0,0 +1,4 @@ +import { + to = github_actions_variable.example + id = "myrepo:myvariable" +} diff --git a/examples/resources/app_installation_repositories/example_1.tf b/examples/resources/app_installation_repositories/example_1.tf new file mode 100644 index 0000000000..c4546acb20 --- /dev/null +++ b/examples/resources/app_installation_repositories/example_1.tf @@ -0,0 +1,14 @@ +# Create some repositories. +resource "github_repository" "some_repo" { + name = "some-repo" +} + +resource "github_repository" "another_repo" { + name = "another-repo" +} + +resource "github_app_installation_repositories" "some_app_repos" { + # The installation id of the app (in the organization). + installation_id = "1234567" + selected_repositories = [github_repository.some_repo.name, github_repository.another_repo.name]" +} diff --git a/examples/resources/app_installation_repository/example_1.tf b/examples/resources/app_installation_repository/example_1.tf new file mode 100644 index 0000000000..507b11aa3c --- /dev/null +++ b/examples/resources/app_installation_repository/example_1.tf @@ -0,0 +1,10 @@ +# Create a repository. +resource "github_repository" "some_repo" { + name = "some-repo" +} + +resource "github_app_installation_repository" "some_app_repo" { + # The installation id of the app (in the organization). + installation_id = "1234567" + repository = "${github_repository.some_repo.name}" +} diff --git a/examples/resources/branch/example_1.tf b/examples/resources/branch/example_1.tf new file mode 100644 index 0000000000..d6b2903047 --- /dev/null +++ b/examples/resources/branch/example_1.tf @@ -0,0 +1,4 @@ +resource "github_branch" "development" { + repository = "example" + branch = "development" +} diff --git a/examples/resources/branch_default/example_1.tf b/examples/resources/branch_default/example_1.tf new file mode 100644 index 0000000000..df374ac288 --- /dev/null +++ b/examples/resources/branch_default/example_1.tf @@ -0,0 +1,15 @@ +resource "github_repository" "example" { + name = "example" + description = "My awesome codebase" + auto_init = true +} + +resource "github_branch" "development" { + repository = github_repository.example.name + branch = "development" +} + +resource "github_branch_default" "default"{ + repository = github_repository.example.name + branch = github_branch.development.branch +} diff --git a/examples/resources/branch_default/example_2.tf b/examples/resources/branch_default/example_2.tf new file mode 100644 index 0000000000..8a16ba1310 --- /dev/null +++ b/examples/resources/branch_default/example_2.tf @@ -0,0 +1,11 @@ +resource "github_repository" "example" { + name = "example" + description = "My awesome codebase" + auto_init = true +} + +resource "github_branch_default" "default"{ + repository = github_repository.example.name + branch = "development" + rename = true +} diff --git a/examples/resources/branch_protection/example_1.tf b/examples/resources/branch_protection/example_1.tf new file mode 100644 index 0000000000..5ce40014a9 --- /dev/null +++ b/examples/resources/branch_protection/example_1.tf @@ -0,0 +1,69 @@ +# Protect the main branch of the foo repository. Additionally, require that +# the "ci/travis" context to be passing and only allow the engineers team merge +# to the branch. + +resource "github_branch_protection" "example" { + repository_id = github_repository.example.node_id + # also accepts repository name + # repository_id = github_repository.example.name + + pattern = "main" + enforce_admins = true + allows_deletions = true + + required_status_checks { + strict = false + contexts = ["ci/travis"] + } + + required_pull_request_reviews { + dismiss_stale_reviews = true + restrict_dismissals = true + dismissal_restrictions = [ + data.github_user.example.node_id, + github_team.example.node_id, + "/exampleuser", + "exampleorganization/exampleteam", + ] + } + + restrict_pushes { + push_allowances = [ + data.github_user.example.node_id, + "/exampleuser", + "exampleorganization/exampleteam", + # you can have more than one type of restriction (teams + users). If you use + # more than one type, you must use node_ids of each user and each team. + # github_team.example.node_id + # github_user.example-2.node_id + ] + } + + force_push_bypassers = [ + data.github_user.example.node_id, + "/exampleuser", + "exampleorganization/exampleteam", + # you can have more than one type of restriction (teams + users) + # github_team.example.node_id + # github_team.example-2.node_id + ] + +} + +resource "github_repository" "example" { + name = "test" +} + +data "github_user" "example" { + username = "example" +} + +resource "github_team" "example" { + name = "Example Name" +} + +resource "github_team_repository" "example" { + team_id = github_team.example.id + repository = github_repository.example.name + permission = "pull" +} diff --git a/examples/resources/branch_protection_v3/example_1.tf b/examples/resources/branch_protection_v3/example_1.tf new file mode 100644 index 0000000000..7f435b6c62 --- /dev/null +++ b/examples/resources/branch_protection_v3/example_1.tf @@ -0,0 +1,9 @@ +# Protect the main branch of the foo repository. Only allow a specific user to merge to the branch. +resource "github_branch_protection_v3" "example" { + repository = github_repository.example.name + branch = "main" + + restrictions { + users = ["foo-user"] + } +} diff --git a/examples/resources/branch_protection_v3/example_2.tf b/examples/resources/branch_protection_v3/example_2.tf new file mode 100644 index 0000000000..22ef55ce15 --- /dev/null +++ b/examples/resources/branch_protection_v3/example_2.tf @@ -0,0 +1,49 @@ +# Protect the main branch of the foo repository. Additionally, require that +# the "ci/check" check ran by the Github Actions app is passing and only allow +# the engineers team merge to the branch. + +resource "github_branch_protection_v3" "example" { + repository = github_repository.example.name + branch = "main" + enforce_admins = true + + required_status_checks { + strict = false + checks = [ + "ci/check:824642007264" + ] + } + + required_pull_request_reviews { + dismiss_stale_reviews = true + dismissal_users = ["foo-user"] + dismissal_teams = [github_team.example.slug] + dismissal_app = ["foo-app"] + + bypass_pull_request_allowances { + users = ["foo-user"] + teams = [github_team.example.slug] + apps = ["foo-app"] + } + } + + restrictions { + users = ["foo-user"] + teams = [github_team.example.slug] + apps = ["foo-app"] + } +} + +resource "github_repository" "example" { + name = "example" +} + +resource "github_team" "example" { + name = "Example Name" +} + +resource "github_team_repository" "example" { + team_id = github_team.example.id + repository = github_repository.example.name + permission = "pull" +} diff --git a/examples/resources/codespaces_organization_secret/example_1.tf b/examples/resources/codespaces_organization_secret/example_1.tf new file mode 100644 index 0000000000..6b76567b33 --- /dev/null +++ b/examples/resources/codespaces_organization_secret/example_1.tf @@ -0,0 +1,11 @@ +resource "github_codespaces_organization_secret" "example_secret" { + secret_name = "example_secret_name" + visibility = "private" + plaintext_value = var.some_secret_string +} + +resource "github_codespaces_organization_secret" "example_secret" { + secret_name = "example_secret_name" + visibility = "private" + encrypted_value = var.some_encrypted_secret_string +} diff --git a/examples/resources/codespaces_organization_secret/example_2.tf b/examples/resources/codespaces_organization_secret/example_2.tf new file mode 100644 index 0000000000..684cb8cb9e --- /dev/null +++ b/examples/resources/codespaces_organization_secret/example_2.tf @@ -0,0 +1,17 @@ +data "github_repository" "repo" { + full_name = "my-org/repo" +} + +resource "github_codespaces_organization_secret" "example_secret" { + secret_name = "example_secret_name" + visibility = "selected" + plaintext_value = var.some_secret_string + selected_repository_ids = [data.github_repository.repo.repo_id] +} + +resource "github_codespaces_organization_secret" "example_secret" { + secret_name = "example_secret_name" + visibility = "selected" + encrypted_value = var.some_encrypted_secret_string + selected_repository_ids = [data.github_repository.repo.repo_id] +} diff --git a/examples/resources/codespaces_organization_secret_repositories/example_1.tf b/examples/resources/codespaces_organization_secret_repositories/example_1.tf new file mode 100644 index 0000000000..a9e66fe613 --- /dev/null +++ b/examples/resources/codespaces_organization_secret_repositories/example_1.tf @@ -0,0 +1,8 @@ +data "github_repository" "repo" { + full_name = "my-org/repo" +} + +resource "github_codespaces_organization_secret_repositories" "org_secret_repos" { + secret_name = "existing_secret_name" + selected_repository_ids = [data.github_repository.repo.repo_id] +} diff --git a/examples/resources/codespaces_secret/example_1.tf b/examples/resources/codespaces_secret/example_1.tf new file mode 100644 index 0000000000..1eb4a8fea4 --- /dev/null +++ b/examples/resources/codespaces_secret/example_1.tf @@ -0,0 +1,15 @@ +data "github_codespaces_public_key" "example_public_key" { + repository = "example_repository" +} + +resource "github_codespaces_secret" "example_secret" { + repository = "example_repository" + secret_name = "example_secret_name" + plaintext_value = var.some_secret_string +} + +resource "github_codespaces_secret" "example_secret" { + repository = "example_repository" + secret_name = "example_secret_name" + encrypted_value = var.some_encrypted_secret_string +} diff --git a/examples/resources/codespaces_user_secret/example_1.tf b/examples/resources/codespaces_user_secret/example_1.tf new file mode 100644 index 0000000000..6cefaeec3f --- /dev/null +++ b/examples/resources/codespaces_user_secret/example_1.tf @@ -0,0 +1,15 @@ +data "github_repository" "repo" { + full_name = "my-org/repo" +} + +resource "github_codespaces_user_secret" "example_secret" { + secret_name = "example_secret_name" + plaintext_value = var.some_secret_string + selected_repository_ids = [data.github_repository.repo.repo_id] +} + +resource "github_codespaces_user_secret" "example_secret" { + secret_name = "example_secret_name" + encrypted_value = var.some_encrypted_secret_string + selected_repository_ids = [data.github_repository.repo.repo_id] +} diff --git a/examples/resources/dependabot_organization_secret/example_1.tf b/examples/resources/dependabot_organization_secret/example_1.tf new file mode 100644 index 0000000000..9cc517b0c7 --- /dev/null +++ b/examples/resources/dependabot_organization_secret/example_1.tf @@ -0,0 +1,11 @@ +resource "github_dependabot_organization_secret" "example_plaintext" { + secret_name = "example_secret_name" + visibility = "all" + plaintext_value = var.some_secret_string +} + +resource "github_dependabot_organization_secret" "example_secret" { + secret_name = "example_secret_name" + visibility = "all" + encrypted_value = var.some_encrypted_secret_string +} diff --git a/examples/resources/dependabot_organization_secret/example_2.tf b/examples/resources/dependabot_organization_secret/example_2.tf new file mode 100644 index 0000000000..0007e67124 --- /dev/null +++ b/examples/resources/dependabot_organization_secret/example_2.tf @@ -0,0 +1,17 @@ +data "github_repository" "repo" { + full_name = "my-org/repo" +} + +resource "github_dependabot_organization_secret" "example_plaintext" { + secret_name = "example_secret_name" + visibility = "selected" + plaintext_value = var.some_secret_string + selected_repository_ids = [data.github_repository.repo.repo_id] +} + +resource "github_dependabot_organization_secret" "example_encrypted" { + secret_name = "example_secret_name" + visibility = "selected" + encrypted_value = var.some_encrypted_secret_string + selected_repository_ids = [data.github_repository.repo.repo_id] +} diff --git a/examples/resources/dependabot_organization_secret/example_3.tf b/examples/resources/dependabot_organization_secret/example_3.tf new file mode 100644 index 0000000000..c42aad2576 --- /dev/null +++ b/examples/resources/dependabot_organization_secret/example_3.tf @@ -0,0 +1,10 @@ +resource "github_dependabot_organization_secret" "example_allow_drift" { + secret_name = "example_secret_name" + visibility = "all" + secret_name = "example_secret_name" + plaintext_value = "placeholder" + + lifecycle { + ignore_changes = [remote_updated_at] + } +} diff --git a/examples/resources/dependabot_organization_secret/example_4.tf b/examples/resources/dependabot_organization_secret/example_4.tf new file mode 100644 index 0000000000..efa9daac70 --- /dev/null +++ b/examples/resources/dependabot_organization_secret/example_4.tf @@ -0,0 +1,4 @@ +import { + to = github_dependabot_organization_secret.example + id = "mysecret" +} diff --git a/examples/resources/dependabot_organization_secret_repositories/example_1.tf b/examples/resources/dependabot_organization_secret_repositories/example_1.tf new file mode 100644 index 0000000000..3a2ffca25b --- /dev/null +++ b/examples/resources/dependabot_organization_secret_repositories/example_1.tf @@ -0,0 +1,15 @@ +resource "github_dependabot_organization_secret" "example" { + secret_name = "mysecret" + plaintext_value = "foo" + visibility = "selected" +} + +resource "github_repository" "example" { + name = "myrepo" + visibility = "public" +} + +resource "github_dependabot_organization_secret_repositories" "example" { + secret_name = github_dependabot_organization_secret.example.name + selected_repository_ids = [ github_repository.example.repo_id ] +} diff --git a/examples/resources/dependabot_organization_secret_repositories/example_2.tf b/examples/resources/dependabot_organization_secret_repositories/example_2.tf new file mode 100644 index 0000000000..aafc2ea494 --- /dev/null +++ b/examples/resources/dependabot_organization_secret_repositories/example_2.tf @@ -0,0 +1,4 @@ +import { + to = github_dependabot_organization_secret_repositories.example + id = "mysecret" +} diff --git a/examples/resources/dependabot_organization_secret_repository/example_1.tf b/examples/resources/dependabot_organization_secret_repository/example_1.tf new file mode 100644 index 0000000000..805bfe8468 --- /dev/null +++ b/examples/resources/dependabot_organization_secret_repository/example_1.tf @@ -0,0 +1,15 @@ +resource "github_dependabot_organization_secret" "example" { + secret_name = "mysecret" + plaintext_value = "foo" + visibility = "selected" +} + +resource "github_repository" "example" { + name = "myrepo" + visibility = "public" +} + +resource "github_dependabot_organization_secret_repository" "example" { + secret_name = github_dependabot_organization_secret.example.name + repository_id = github_repository.example.repo_id +} diff --git a/examples/resources/dependabot_organization_secret_repository/example_2.tf b/examples/resources/dependabot_organization_secret_repository/example_2.tf new file mode 100644 index 0000000000..3171f9f186 --- /dev/null +++ b/examples/resources/dependabot_organization_secret_repository/example_2.tf @@ -0,0 +1,4 @@ +import { + to = github_dependabot_organization_secret_repository.example + id = "mysecret:123456" +} diff --git a/examples/resources/dependabot_secret/example_1.tf b/examples/resources/dependabot_secret/example_1.tf new file mode 100644 index 0000000000..fb9f0f6993 --- /dev/null +++ b/examples/resources/dependabot_secret/example_1.tf @@ -0,0 +1,11 @@ +resource "github_dependabot_secret" "example_plaintext" { + repository = "example_repository" + secret_name = "example_secret_name" + plaintext_value = var.some_secret_string +} + +resource "github_dependabot_secret" "example_encrypted" { + repository = "example_repository" + secret_name = "example_secret_name" + encrypted_value = var.some_encrypted_secret_string +} diff --git a/examples/resources/dependabot_secret/example_2.tf b/examples/resources/dependabot_secret/example_2.tf new file mode 100644 index 0000000000..7aac3f1e66 --- /dev/null +++ b/examples/resources/dependabot_secret/example_2.tf @@ -0,0 +1,9 @@ +resource "github_dependabot_secret" "example_allow_drift" { + repository = "example_repository" + secret_name = "example_secret_name" + plaintext_value = "placeholder" + + lifecycle { + ignore_changes = [remote_updated_at] + } +} diff --git a/examples/resources/dependabot_secret/example_3.tf b/examples/resources/dependabot_secret/example_3.tf new file mode 100644 index 0000000000..dc5642e41a --- /dev/null +++ b/examples/resources/dependabot_secret/example_3.tf @@ -0,0 +1,4 @@ +import { + to = github_dependabot_secret.example + id = "myrepo:mysecret" +} diff --git a/examples/resources/emu_group_mapping/example_1.tf b/examples/resources/emu_group_mapping/example_1.tf new file mode 100644 index 0000000000..db55de47bd --- /dev/null +++ b/examples/resources/emu_group_mapping/example_1.tf @@ -0,0 +1,4 @@ +resource "github_emu_group_mapping" "example_emu_group_mapping" { + team_slug = "emu-test-team" # The GitHub team name to modify + group_id = 28836 # The group ID of the external group to link +} diff --git a/examples/resources/enterprise_actions_permissions/example_1.tf b/examples/resources/enterprise_actions_permissions/example_1.tf new file mode 100644 index 0000000000..ac72f85e22 --- /dev/null +++ b/examples/resources/enterprise_actions_permissions/example_1.tf @@ -0,0 +1,17 @@ +data "github_organization" "example-org" { + name = "my-org" +} + +resource "github_enterprise_actions_permissions" "test" { + enterprise_slug = "my-enterprise" + allowed_actions = "selected" + enabled_organizations = "selected" + allowed_actions_config { + github_owned_allowed = true + patterns_allowed = ["actions/cache@*", "actions/checkout@*"] + verified_allowed = true + } + enabled_organizations_config { + organization_ids = [data.github_organization.example-org.id] + } +} diff --git a/examples/resources/enterprise_actions_runner_group/example_1.tf b/examples/resources/enterprise_actions_runner_group/example_1.tf new file mode 100644 index 0000000000..165dd482d5 --- /dev/null +++ b/examples/resources/enterprise_actions_runner_group/example_1.tf @@ -0,0 +1,20 @@ +data "github_enterprise" "enterprise" { + slug = "my-enterprise" +} + +resource "github_enterprise_organization" "enterprise_organization" { + enterprise_id = data.github_enterprise.enterprise.id + name = "my-organization" + billing_email = "octocat@octo.cat" + admin_logins = ["octocat"] +} + +resource "github_enterprise_actions_runner_group" "example" { + name = "my-awesome-runner-group" + enterprise_slug = data.github_enterprise.enterprise.slug + allows_public_repositories = true + visibility = "selected" + selected_organization_ids = [github_enterprise_organization.enterprise_organization.database_id] + restricted_to_workflows = true + selected_workflows = ["my-organization/my-repo/.github/workflows/cool-workflow.yaml@refs/tags/v1"] +} diff --git a/examples/resources/enterprise_actions_workflow_permissions/example_1.tf b/examples/resources/enterprise_actions_workflow_permissions/example_1.tf new file mode 100644 index 0000000000..1074b3b0cd --- /dev/null +++ b/examples/resources/enterprise_actions_workflow_permissions/example_1.tf @@ -0,0 +1,15 @@ +# Basic workflow permissions configuration +resource "github_enterprise_actions_workflow_permissions" "example" { + enterprise_slug = "my-enterprise" + + default_workflow_permissions = "read" + can_approve_pull_request_reviews = false +} + +# Allow write permissions and PR approvals +resource "github_enterprise_actions_workflow_permissions" "permissive" { + enterprise_slug = "my-enterprise" + + default_workflow_permissions = "write" + can_approve_pull_request_reviews = true +} diff --git a/examples/resources/enterprise_security_analysis_settings/example_1.tf b/examples/resources/enterprise_security_analysis_settings/example_1.tf new file mode 100644 index 0000000000..e53f82159a --- /dev/null +++ b/examples/resources/enterprise_security_analysis_settings/example_1.tf @@ -0,0 +1,17 @@ +# Basic security settings - enable secret scanning only +resource "github_enterprise_security_analysis_settings" "basic" { + enterprise_slug = "my-enterprise" + + secret_scanning_enabled_for_new_repositories = true +} + +# Full security configuration with all features enabled +resource "github_enterprise_security_analysis_settings" "comprehensive" { + enterprise_slug = "my-enterprise" + + advanced_security_enabled_for_new_repositories = true + secret_scanning_enabled_for_new_repositories = true + secret_scanning_push_protection_enabled_for_new_repositories = true + secret_scanning_validity_checks_enabled = true + secret_scanning_push_protection_custom_link = "https://octokit.com/security-guidelines" +} diff --git a/examples/resources/issue/example_1.tf b/examples/resources/issue/example_1.tf new file mode 100644 index 0000000000..ed7194abc1 --- /dev/null +++ b/examples/resources/issue/example_1.tf @@ -0,0 +1,12 @@ +# Create a simple issue +resource "github_repository" "test" { + name = "tf-acc-test-%s" + auto_init = true + has_issues = true +} + +resource "github_issue" "test" { + repository = github_repository.test.name + title = "My issue title" + body = "The body of my issue" +} diff --git a/examples/resources/issue/example_2.tf b/examples/resources/issue/example_2.tf new file mode 100644 index 0000000000..1e52077d5b --- /dev/null +++ b/examples/resources/issue/example_2.tf @@ -0,0 +1,24 @@ +# Create an issue with milestone and project assignment +resource "github_repository" "test" { + name = "tf-acc-test-%s" + auto_init = true + has_issues = true +} + +resource "github_repository_milestone" "test" { + owner = split("/", "${github_repository.test.full_name}")[0] + repository = github_repository.test.name + title = "v1.0.0" + description = "General Availability" + due_date = "2022-11-22" + state = "open" +} + +resource "github_issue" "test" { + repository = github_repository.test.name + title = "My issue" + body = "My issue body" + labels = ["bug", "documentation"] + assignees = ["bob-github"] + milestone_number = github_repository_milestone.test.number +} diff --git a/examples/resources/issue_label/example_1.tf b/examples/resources/issue_label/example_1.tf new file mode 100644 index 0000000000..4610cf8fc5 --- /dev/null +++ b/examples/resources/issue_label/example_1.tf @@ -0,0 +1,6 @@ +# Create a new, red colored label +resource "github_issue_label" "test_repo" { + repository = "test-repo" + name = "Urgent" + color = "FF0000" +} diff --git a/examples/resources/issue_labels/example_1.tf b/examples/resources/issue_labels/example_1.tf new file mode 100644 index 0000000000..dd9ea9236c --- /dev/null +++ b/examples/resources/issue_labels/example_1.tf @@ -0,0 +1,14 @@ +# Create a new, red colored label +resource "github_issue_labels" "test_repo" { + repository = "test-repo" + + label { + name = "Urgent" + color = "FF0000" + } + + label { + name = "Critical" + color = "FF0000" + } +} diff --git a/examples/resources/membership/example_1.tf b/examples/resources/membership/example_1.tf new file mode 100644 index 0000000000..ffc6e358ee --- /dev/null +++ b/examples/resources/membership/example_1.tf @@ -0,0 +1,5 @@ +# Add a user to the organization +resource "github_membership" "membership_for_some_user" { + username = "SomeUser" + role = "member" +} diff --git a/examples/resources/organization_block/example_1.tf b/examples/resources/organization_block/example_1.tf new file mode 100644 index 0000000000..0b8af6fafe --- /dev/null +++ b/examples/resources/organization_block/example_1.tf @@ -0,0 +1,3 @@ +resource "github_organization_block" "example" { + username = "paultyng" +} diff --git a/examples/resources/organization_custom_properties/example_1.tf b/examples/resources/organization_custom_properties/example_1.tf new file mode 100644 index 0000000000..b27e48758a --- /dev/null +++ b/examples/resources/organization_custom_properties/example_1.tf @@ -0,0 +1,12 @@ +resource "github_organization_custom_properties" "environment" { + property_name = "environment" + value_type = "single_select" + required = true + description = "The deployment environment for this repository" + default_value = "development" + allowed_values = [ + "development", + "staging", + "production" + ] +} diff --git a/examples/resources/organization_custom_properties/example_2.tf b/examples/resources/organization_custom_properties/example_2.tf new file mode 100644 index 0000000000..21685e3a45 --- /dev/null +++ b/examples/resources/organization_custom_properties/example_2.tf @@ -0,0 +1,7 @@ +resource "github_organization_custom_properties" "team_contact" { + property_name = "team_contact" + value_type = "string" + required = false + description = "Contact information for the team managing this repository" + values_editable_by = "org_and_repo_actors" +} diff --git a/examples/resources/organization_custom_properties/example_3.tf b/examples/resources/organization_custom_properties/example_3.tf new file mode 100644 index 0000000000..569bc0a24f --- /dev/null +++ b/examples/resources/organization_custom_properties/example_3.tf @@ -0,0 +1,6 @@ +resource "github_organization_custom_properties" "owner" { + property_name = "owner" + value_type = "string" + required = true + description = "The team or individual responsible for this repository" +} diff --git a/examples/resources/organization_custom_properties/example_4.tf b/examples/resources/organization_custom_properties/example_4.tf new file mode 100644 index 0000000000..cf449c4d54 --- /dev/null +++ b/examples/resources/organization_custom_properties/example_4.tf @@ -0,0 +1,7 @@ +resource "github_organization_custom_properties" "archived" { + property_name = "archived" + value_type = "true_false" + required = false + description = "Whether this repository is archived" + default_value = "false" +} diff --git a/examples/resources/organization_custom_role/example_1.tf b/examples/resources/organization_custom_role/example_1.tf new file mode 100644 index 0000000000..bb5b0ebc21 --- /dev/null +++ b/examples/resources/organization_custom_role/example_1.tf @@ -0,0 +1,26 @@ +resource "github_organization_custom_role" "example" { + name = "example" + description = "Example custom role that uses the read role as its base" + base_role = "read" + permissions = [ + "add_assignee", + "add_label", + "bypass_branch_protection", + "close_issue", + "close_pull_request", + "mark_as_duplicate", + "create_tag", + "delete_issue", + "delete_tag", + "manage_deploy_keys", + "push_protected_branch", + "read_code_scanning", + "reopen_issue", + "reopen_pull_request", + "request_pr_review", + "resolve_dependabot_alerts", + "resolve_secret_scanning_alerts", + "view_secret_scanning_alerts", + "write_code_scanning" + ] +} diff --git a/examples/resources/organization_project/example_1.tf b/examples/resources/organization_project/example_1.tf new file mode 100644 index 0000000000..d758491b32 --- /dev/null +++ b/examples/resources/organization_project/example_1.tf @@ -0,0 +1,4 @@ +resource "github_organization_project" "project" { + name = "A Organization Project" + body = "This is a organization project." +} diff --git a/examples/resources/organization_repository_role/example_1.tf b/examples/resources/organization_repository_role/example_1.tf new file mode 100644 index 0000000000..62905b7e26 --- /dev/null +++ b/examples/resources/organization_repository_role/example_1.tf @@ -0,0 +1,9 @@ +resource "github_organization_repository_role" "example" { + name = "example" + base_role = "read" + + permissions = [ + "add_assignee", + "add_label" + ] +} diff --git a/examples/resources/organization_role/example_1.tf b/examples/resources/organization_role/example_1.tf new file mode 100644 index 0000000000..a9d7605c62 --- /dev/null +++ b/examples/resources/organization_role/example_1.tf @@ -0,0 +1,9 @@ +resource "github_organization_role" "example" { + name = "example" + base_role = "read" + + permissions = [ + "read_organization_custom_org_role", + "read_organization_custom_repo_role" + ] +} diff --git a/examples/resources/organization_role_team/example_1.tf b/examples/resources/organization_role_team/example_1.tf new file mode 100644 index 0000000000..1b8f396be3 --- /dev/null +++ b/examples/resources/organization_role_team/example_1.tf @@ -0,0 +1,4 @@ +resource "github_organization_role_team" "example" { + role_id = 1234 + team_slug = "example-team" +} diff --git a/examples/resources/organization_role_team/example_2.tf b/examples/resources/organization_role_team/example_2.tf new file mode 100644 index 0000000000..a3ae1d452a --- /dev/null +++ b/examples/resources/organization_role_team/example_2.tf @@ -0,0 +1,10 @@ +locals { + security_manager_id = one([for x in data.github_organization_roles.all_roles.roles : x.role_id if x.name == "security_manager"]) +} + +data "github_organization_roles" "all_roles" {} + +resource "github_organization_role_team" "security_managers" { + role_id = local.security_manager_id + team_slug = "example-team" +} diff --git a/examples/resources/organization_role_team_assignment/example_1.tf b/examples/resources/organization_role_team_assignment/example_1.tf new file mode 100644 index 0000000000..4765152749 --- /dev/null +++ b/examples/resources/organization_role_team_assignment/example_1.tf @@ -0,0 +1,8 @@ +resource "github_team" "test-team" { + name = "test-team" +} + +resource "github_organization_role_team_assignment" "test-team-role-assignment" { + team_slug = github_team.test-team.slug + role_id = "8132" # all_repo_read (predefined) +} diff --git a/examples/resources/organization_role_user/example_1.tf b/examples/resources/organization_role_user/example_1.tf new file mode 100644 index 0000000000..743929075a --- /dev/null +++ b/examples/resources/organization_role_user/example_1.tf @@ -0,0 +1,4 @@ +resource "github_organization_role_user" "example" { + role_id = 1234 + login = "example-user" +} diff --git a/examples/resources/organization_ruleset/example_1.tf b/examples/resources/organization_ruleset/example_1.tf new file mode 100644 index 0000000000..1b5bc6422d --- /dev/null +++ b/examples/resources/organization_ruleset/example_1.tf @@ -0,0 +1,85 @@ +resource "github_organization_ruleset" "example" { + name = "example" + target = "branch" + enforcement = "active" + + conditions { + ref_name { + include = ["~ALL"] + exclude = [] + } + } + + bypass_actors { + actor_id = 13473 + actor_type = "Integration" + bypass_mode = "always" + } + + rules { + creation = true + update = true + deletion = true + required_linear_history = true + required_signatures = true + + branch_name_pattern { + name = "example" + negate = false + operator = "starts_with" + pattern = "ex" + } + + required_workflows { + do_not_enforce_on_create = true + required_workflow { + repository_id = 1234 + path = ".github/workflows/ci.yml" + ref = "main" + } + } + + required_code_scanning { + required_code_scanning_tool { + alerts_threshold = "errors" + security_alerts_threshold = "high_or_higher" + tool = "CodeQL" + } + } + } +} + +# Example with push ruleset +# Note: Push targets must NOT have ref_name in conditions, only repository_name or repository_id +resource "github_organization_ruleset" "example_push" { + name = "example_push" + target = "push" + enforcement = "active" + + conditions { + repository_name { + include = ["~ALL"] + exclude = [] + } + } + + rules { + # Push targets only support these rules: + # file_path_restriction, max_file_size, max_file_path_length, file_extension_restriction + file_path_restriction { + restricted_file_paths = [".github/workflows/*", "*.env"] + } + + max_file_size { + max_file_size = 100 # 100 MB + } + + max_file_path_length { + max_file_path_length = 255 + } + + file_extension_restriction { + restricted_file_extensions = ["*.exe", "*.dll", "*.so"] + } + } +} diff --git a/examples/resources/organization_security_manager/example_1.tf b/examples/resources/organization_security_manager/example_1.tf new file mode 100644 index 0000000000..17b2487944 --- /dev/null +++ b/examples/resources/organization_security_manager/example_1.tf @@ -0,0 +1,8 @@ +resource "github_team" "some_team" { + name = "SomeTeam" + description = "Some cool team" +} + +resource "github_organization_security_manager" "some_team" { + team_slug = github_team.some_team.slug +} diff --git a/examples/resources/organization_settings/example_1.tf b/examples/resources/organization_settings/example_1.tf new file mode 100644 index 0000000000..23e588e31b --- /dev/null +++ b/examples/resources/organization_settings/example_1.tf @@ -0,0 +1,28 @@ +resource "github_organization_settings" "test" { + billing_email = "test@example.com" + company = "Test Company" + blog = "https://example.com" + email = "test@example.com" + twitter_username = "Test" + location = "Test Location" + name = "Test Name" + description = "Test Description" + has_organization_projects = true + has_repository_projects = true + default_repository_permission = "read" + members_can_create_repositories = true + members_can_create_public_repositories = true + members_can_create_private_repositories = true + members_can_create_internal_repositories = true + members_can_create_pages = true + members_can_create_public_pages = true + members_can_create_private_pages = true + members_can_fork_private_repositories = true + web_commit_signoff_required = true + advanced_security_enabled_for_new_repositories = false + dependabot_alerts_enabled_for_new_repositories= false + dependabot_security_updates_enabled_for_new_repositories = false + dependency_graph_enabled_for_new_repositories = false + secret_scanning_enabled_for_new_repositories = false + secret_scanning_push_protection_enabled_for_new_repositories = false +} diff --git a/examples/resources/organization_webhook/example_1.tf b/examples/resources/organization_webhook/example_1.tf new file mode 100644 index 0000000000..71142bc08d --- /dev/null +++ b/examples/resources/organization_webhook/example_1.tf @@ -0,0 +1,13 @@ +resource "github_organization_webhook" "foo" { + name = "web" + + configuration { + url = "https://google.de/" + content_type = "form" + insecure_ssl = false + } + + active = false + + events = ["issues"] +} diff --git a/examples/resources/project_card/example_1.tf b/examples/resources/project_card/example_1.tf new file mode 100644 index 0000000000..ec4c13ae8a --- /dev/null +++ b/examples/resources/project_card/example_1.tf @@ -0,0 +1,14 @@ +resource "github_organization_project" "project" { + name = "An Organization Project" + body = "This is an organization project." +} + +resource "github_project_column" "column" { + project_id = github_organization_project.project.id + name = "Backlog" +} + +resource "github_project_card" "card" { + column_id = github_project_column.column.column_id + note = "## Unaccepted 👇" +} diff --git a/examples/resources/project_card/example_2.tf b/examples/resources/project_card/example_2.tf new file mode 100644 index 0000000000..b834807116 --- /dev/null +++ b/examples/resources/project_card/example_2.tf @@ -0,0 +1,28 @@ +resource "github_repository" "test" { + name = "myrepo" + has_projects = true + has_issues = true +} + +resource "github_issue" "test" { + repository = github_repository.test.id + title = "Test issue title" + body = "Test issue body" +} + +resource "github_repository_project" "test" { + name = "test" + repository = github_repository.test.name + body = "this is a test project" +} + +resource "github_project_column" "test" { + project_id = github_repository_project.test.id + name = "Backlog" +} + +resource "github_project_card" "test" { + column_id = github_project_column.test.column_id + content_id = github_issue.test.issue_id + content_type = "Issue" +} diff --git a/examples/resources/project_column/example_1.tf b/examples/resources/project_column/example_1.tf new file mode 100644 index 0000000000..ecdf9bfb83 --- /dev/null +++ b/examples/resources/project_column/example_1.tf @@ -0,0 +1,9 @@ +resource "github_organization_project" "project" { + name = "A Organization Project" + body = "This is an organization project." +} + +resource "github_project_column" "column" { + project_id = github_organization_project.project.id + name = "a column" +} diff --git a/examples/resources/release/example_1.tf b/examples/resources/release/example_1.tf new file mode 100644 index 0000000000..3ae5a91060 --- /dev/null +++ b/examples/resources/release/example_1.tf @@ -0,0 +1,11 @@ +resource "github_repository" "repo" { + name = "repo" + description = "GitHub repo managed by Terraform" + + private = false +} + +resource "github_release" "example" { + repository = github_repository.repo.name + tag_name = "v1.0.0" +} diff --git a/examples/resources/release/example_2.tf b/examples/resources/release/example_2.tf new file mode 100644 index 0000000000..2aefac5141 --- /dev/null +++ b/examples/resources/release/example_2.tf @@ -0,0 +1,18 @@ +resource "github_repository" "example" { + name = "repo" + auto_init = true +} + +resource "github_branch" "example" { + repository = github_repository.example.name + branch = "branch_name" + source_branch = github_repository.example.default_branch +} + +resource "github_release" "example" { + repository = github_repository.example.name + tag_name = "v1.0.0" + target_commitish = github_branch.example.branch + draft = false + prerelease = false +} diff --git a/examples/resources/repository/example_1.tf b/examples/resources/repository/example_1.tf new file mode 100644 index 0000000000..5d87ccdfa8 --- /dev/null +++ b/examples/resources/repository/example_1.tf @@ -0,0 +1,12 @@ +resource "github_repository" "example" { + name = "example" + description = "My awesome codebase" + + visibility = "public" + + template { + owner = "github" + repository = "terraform-template-module" + include_all_branches = true + } +} diff --git a/examples/resources/repository/example_2.tf b/examples/resources/repository/example_2.tf new file mode 100644 index 0000000000..fcf599b252 --- /dev/null +++ b/examples/resources/repository/example_2.tf @@ -0,0 +1,13 @@ +resource "github_repository" "example" { + name = "example" + description = "My awesome web page" + + private = false + + pages { + source { + branch = "master" + path = "/docs" + } + } +} diff --git a/examples/resources/repository/example_3.tf b/examples/resources/repository/example_3.tf new file mode 100644 index 0000000000..b2e9f0b7a9 --- /dev/null +++ b/examples/resources/repository/example_3.tf @@ -0,0 +1,7 @@ +resource "github_repository" "forked_repo" { + name = "forked-repository" + description = "This is a fork of another repository" + fork = true + source_owner = "some-org" + source_repo = "original-repository" +} diff --git a/examples/resources/repository_autolink_reference/example_1.tf b/examples/resources/repository_autolink_reference/example_1.tf new file mode 100644 index 0000000000..577f699b82 --- /dev/null +++ b/examples/resources/repository_autolink_reference/example_1.tf @@ -0,0 +1,14 @@ +resource "github_repository" "repo" { + name = "my-repo" + description = "GitHub repo managed by Terraform" + + private = false +} + +resource "github_repository_autolink_reference" "autolink" { + repository = github_repository.repo.name + + key_prefix = "TICKET-" + + target_url_template = "https://example.com/TICKET?query=" +} diff --git a/examples/resources/repository_collaborator/example_1.tf b/examples/resources/repository_collaborator/example_1.tf new file mode 100644 index 0000000000..8aa3a72428 --- /dev/null +++ b/examples/resources/repository_collaborator/example_1.tf @@ -0,0 +1,6 @@ +# Add a collaborator to a repository +resource "github_repository_collaborator" "a_repo_collaborator" { + repository = "our-cool-repo" + username = "SomeUser" + permission = "admin" +} diff --git a/examples/resources/repository_collaborators/example_1.tf b/examples/resources/repository_collaborators/example_1.tf new file mode 100644 index 0000000000..630e0d1b17 --- /dev/null +++ b/examples/resources/repository_collaborators/example_1.tf @@ -0,0 +1,23 @@ +# Add collaborators to a repository +resource "github_team" "some_team" { + name = "SomeTeam" + description = "Some cool team" +} + +resource "github_repository" "some_repo" { + name = "some-repo" +} + +resource "github_repository_collaborators" "some_repo_collaborators" { + repository = github_repository.some_repo.name + + user { + permission = "admin" + username = "SomeUser" + } + + team { + permission = "pull" + team_id = github_team.some_team.slug + } +} diff --git a/examples/resources/repository_custom_property/example_1.tf b/examples/resources/repository_custom_property/example_1.tf new file mode 100644 index 0000000000..be5eb8fb8c --- /dev/null +++ b/examples/resources/repository_custom_property/example_1.tf @@ -0,0 +1,10 @@ +resource "github_repository" "example" { + name = "example" + description = "My awesome codebase" +} +resource "github_repository_custom_property" "string" { + repository = github_repository.example.name + property_name = "my-cool-property" + property_type = "string" + property_value = ["test"] +} diff --git a/examples/resources/repository_dependabot_security_updates/example_1.tf b/examples/resources/repository_dependabot_security_updates/example_1.tf new file mode 100644 index 0000000000..47c1e95457 --- /dev/null +++ b/examples/resources/repository_dependabot_security_updates/example_1.tf @@ -0,0 +1,14 @@ +resource "github_repository" "repo" { + name = "my-repo" + description = "GitHub repo managed by Terraform" + + private = false + + vulnerability_alerts = true +} + + +resource "github_repository_dependabot_security_updates" "example" { + repository = github_repository.test.name + enabled = true +} diff --git a/examples/resources/repository_deploy_key/example_1.tf b/examples/resources/repository_deploy_key/example_1.tf new file mode 100644 index 0000000000..2bf08c4167 --- /dev/null +++ b/examples/resources/repository_deploy_key/example_1.tf @@ -0,0 +1,12 @@ +# Generate an ssh key using provider "hashicorp/tls" +resource "tls_private_key" "example_repository_deploy_key" { + algorithm = "ED25519" +} + +# Add the ssh key as a deploy key +resource "github_repository_deploy_key" "example_repository_deploy_key" { + title = "Repository test key" + repository = "test-repo" + key = tls_private_key.example_repository_deploy_key.public_key_openssh + read_only = true +} diff --git a/examples/resources/repository_deployment_branch_policy/example_1.tf b/examples/resources/repository_deployment_branch_policy/example_1.tf new file mode 100644 index 0000000000..ae13bf3be7 --- /dev/null +++ b/examples/resources/repository_deployment_branch_policy/example_1.tf @@ -0,0 +1,16 @@ +resource "github_repository_environment" "env" { + repository = "my_repo" + environment = "my_env" + deployment_branch_policy { + protected_branches = false + custom_branch_policies = true + } +} + +resource "github_repository_deployment_branch_policy" "foo" { + depends_on = [github_repository_environment.env] + + repository = "my_repo" + environment_name = "my_env" + name = "foo" +} diff --git a/examples/resources/repository_environment/example_1.tf b/examples/resources/repository_environment/example_1.tf new file mode 100644 index 0000000000..fa22218d71 --- /dev/null +++ b/examples/resources/repository_environment/example_1.tf @@ -0,0 +1,21 @@ +data "github_user" "current" { + username = "" +} + +resource "github_repository" "example" { + name = "A Repository Project" + description = "My awesome codebase" +} + +resource "github_repository_environment" "example" { + environment = "example" + repository = github_repository.example.name + prevent_self_review = true + reviewers { + users = [data.github_user.current.id] + } + deployment_branch_policy { + protected_branches = true + custom_branch_policies = false + } +} diff --git a/examples/resources/repository_environment/example_2.tf b/examples/resources/repository_environment/example_2.tf new file mode 100644 index 0000000000..1d209897b7 --- /dev/null +++ b/examples/resources/repository_environment/example_2.tf @@ -0,0 +1,4 @@ +import { + to = github_repository_environment.example + id = "myrepo:myenv" +} diff --git a/examples/resources/repository_environment_deployment_policy/example_1.tf b/examples/resources/repository_environment_deployment_policy/example_1.tf new file mode 100644 index 0000000000..27bea257b6 --- /dev/null +++ b/examples/resources/repository_environment_deployment_policy/example_1.tf @@ -0,0 +1,26 @@ +data "github_user" "current" { + username = "" +} + +resource "github_repository" "test" { + name = "tf-acc-test-%s" +} + +resource "github_repository_environment" "test" { + repository = github_repository.test.name + environment = "environment/test" + wait_timer = 10000 + reviewers { + users = [data.github_user.current.id] + } + deployment_branch_policy { + protected_branches = false + custom_branch_policies = true + } +} + +resource "github_repository_environment_deployment_policy" "test" { + repository = github_repository.test.name + environment = github_repository_environment.test.environment + branch_pattern = "releases/*" +} diff --git a/examples/resources/repository_environment_deployment_policy/example_2.tf b/examples/resources/repository_environment_deployment_policy/example_2.tf new file mode 100644 index 0000000000..9d7df80516 --- /dev/null +++ b/examples/resources/repository_environment_deployment_policy/example_2.tf @@ -0,0 +1,27 @@ + +data "github_user" "current" { + username = "" +} + +resource "github_repository" "test" { + name = "tf-acc-test-%s" +} + +resource "github_repository_environment" "test" { + repository = github_repository.test.name + environment = "environment/test" + wait_timer = 10000 + reviewers { + users = [data.github_user.current.id] + } + deployment_branch_policy { + protected_branches = false + custom_branch_policies = true + } +} + +resource "github_repository_environment_deployment_policy" "test" { + repository = github_repository.test.name + environment = github_repository_environment.test.environment + tag_pattern = "v*" +} diff --git a/examples/resources/repository_environment_deployment_policy/example_3.tf b/examples/resources/repository_environment_deployment_policy/example_3.tf new file mode 100644 index 0000000000..451b768b22 --- /dev/null +++ b/examples/resources/repository_environment_deployment_policy/example_3.tf @@ -0,0 +1,4 @@ +import { + to = github_repository_environment_deployment_policy.example + id = "myrepo:myenv:123456" +} diff --git a/examples/resources/repository_file/example_1.tf b/examples/resources/repository_file/example_1.tf new file mode 100644 index 0000000000..8fda073871 --- /dev/null +++ b/examples/resources/repository_file/example_1.tf @@ -0,0 +1,17 @@ + +resource "github_repository" "foo" { + name = "example" + auto_init = true +} + +resource "github_repository_file" "foo" { + repository = github_repository.foo.name + branch = "main" + file = ".gitignore" + content = "**/*.tfstate" + commit_message = "Managed by Terraform" + commit_author = "Terraform User" + commit_email = "terraform@example.com" + overwrite_on_create = true +} + diff --git a/examples/resources/repository_file/example_2.tf b/examples/resources/repository_file/example_2.tf new file mode 100644 index 0000000000..0cd472fba5 --- /dev/null +++ b/examples/resources/repository_file/example_2.tf @@ -0,0 +1,18 @@ + +resource "github_repository" "foo" { + name = "example" + auto_init = true +} + +resource "github_repository_file" "foo" { + repository = github_repository.foo.name + branch = "does/not/exist" + file = ".gitignore" + content = "**/*.tfstate" + commit_message = "Managed by Terraform" + commit_author = "Terraform User" + commit_email = "terraform@example.com" + overwrite_on_create = true + autocreate_branch = true +} + diff --git a/examples/resources/repository_milestone/example_1.tf b/examples/resources/repository_milestone/example_1.tf new file mode 100644 index 0000000000..7d15cf570a --- /dev/null +++ b/examples/resources/repository_milestone/example_1.tf @@ -0,0 +1,6 @@ +# Create a milestone for a repository +resource "github_repository_milestone" "example" { + owner = "example-owner" + repository = "example-repository" + title = "v1.1.0" +} diff --git a/examples/resources/repository_project/example_1.tf b/examples/resources/repository_project/example_1.tf new file mode 100644 index 0000000000..124f525dfc --- /dev/null +++ b/examples/resources/repository_project/example_1.tf @@ -0,0 +1,11 @@ +resource "github_repository" "example" { + name = "example" + description = "My awesome codebase" + has_projects = true +} + +resource "github_repository_project" "project" { + name = "A Repository Project" + repository = "${github_repository.example.name}" + body = "This is a repository project." +} diff --git a/examples/resources/repository_pull_request/example_1.tf b/examples/resources/repository_pull_request/example_1.tf new file mode 100644 index 0000000000..0fae030c4f --- /dev/null +++ b/examples/resources/repository_pull_request/example_1.tf @@ -0,0 +1,7 @@ +resource "github_repository_pull_request" "example" { + base_repository = "example-repository" + base_ref = "main" + head_ref = "feature-branch" + title = "My newest feature" + body = "This will change everything" +} diff --git a/examples/resources/repository_ruleset/example_1.tf b/examples/resources/repository_ruleset/example_1.tf new file mode 100644 index 0000000000..f903a7001a --- /dev/null +++ b/examples/resources/repository_ruleset/example_1.tf @@ -0,0 +1,70 @@ +resource "github_repository" "example" { + name = "example" + description = "Example repository" +} + +resource "github_repository_ruleset" "example" { + name = "example" + repository = github_repository.example.name + target = "branch" + enforcement = "active" + + conditions { + ref_name { + include = ["~ALL"] + exclude = [] + } + } + + bypass_actors { + actor_id = 13473 + actor_type = "Integration" + bypass_mode = "always" + } + + rules { + creation = true + update = true + deletion = true + required_linear_history = true + required_signatures = true + + required_deployments { + required_deployment_environments = ["test"] + } + + required_code_scanning { + required_code_scanning_tool { + alerts_threshold = "errors" + security_alerts_threshold = "high_or_higher" + tool = "CodeQL" + } + } + } +} + +# Example with push ruleset +resource "github_repository_ruleset" "example_push" { + name = "example_push" + repository = github_repository.example.name + target = "push" + enforcement = "active" + + rules { + file_path_restriction { + restricted_file_paths = [".github/workflows/*", "*.env"] + } + + max_file_size { + max_file_size = 100 # 100 MB + } + + max_file_path_length { + max_file_path_length = 255 + } + + file_extension_restriction { + restricted_file_extensions = ["*.exe", "*.dll", "*.so"] + } + } +} diff --git a/examples/resources/repository_topics/example_1.tf b/examples/resources/repository_topics/example_1.tf new file mode 100644 index 0000000000..6408079514 --- /dev/null +++ b/examples/resources/repository_topics/example_1.tf @@ -0,0 +1,8 @@ +data "github_repository" "test" { + name = "test" +} + +resource "github_repository_topics" "test" { + repository = github_repository.test.name + topics = ["topic-1", "topic-2"] +} diff --git a/examples/resources/repository_webhook/example_1.tf b/examples/resources/repository_webhook/example_1.tf new file mode 100644 index 0000000000..e568d39794 --- /dev/null +++ b/examples/resources/repository_webhook/example_1.tf @@ -0,0 +1,21 @@ +resource "github_repository" "repo" { + name = "foo" + description = "Terraform acceptance tests" + homepage_url = "http://example.com/" + + visibility = "public" +} + +resource "github_repository_webhook" "foo" { + repository = github_repository.repo.name + + configuration { + url = "https://google.de/" + content_type = "form" + insecure_ssl = false + } + + active = false + + events = ["issues"] +} diff --git a/examples/resources/team/example_1.tf b/examples/resources/team/example_1.tf new file mode 100644 index 0000000000..6c0ed30c98 --- /dev/null +++ b/examples/resources/team/example_1.tf @@ -0,0 +1,6 @@ +# Add a team to the organization +resource "github_team" "some_team" { + name = "some-team" + description = "Some cool team" + privacy = "closed" +} diff --git a/examples/resources/team_members/example_1.tf b/examples/resources/team_members/example_1.tf new file mode 100644 index 0000000000..1f97c62b01 --- /dev/null +++ b/examples/resources/team_members/example_1.tf @@ -0,0 +1,29 @@ +# Add a user to the organization +resource "github_membership" "membership_for_some_user" { + username = "SomeUser" + role = "member" +} + +resource "github_membership" "membership_for_another_user" { + username = "AnotherUser" + role = "member" +} + +resource "github_team" "some_team" { + name = "SomeTeam" + description = "Some cool team" +} + +resource "github_team_members" "some_team_members" { + team_id = github_team.some_team.id + + members { + username = "SomeUser" + role = "maintainer" + } + + members { + username = "AnotherUser" + role = "member" + } +} diff --git a/examples/resources/team_membership/example_1.tf b/examples/resources/team_membership/example_1.tf new file mode 100644 index 0000000000..c96a4d2c38 --- /dev/null +++ b/examples/resources/team_membership/example_1.tf @@ -0,0 +1,16 @@ +# Add a user to the organization +resource "github_membership" "membership_for_some_user" { + username = "SomeUser" + role = "member" +} + +resource "github_team" "some_team" { + name = "SomeTeam" + description = "Some cool team" +} + +resource "github_team_membership" "some_team_membership" { + team_id = github_team.some_team.id + username = "SomeUser" + role = "member" +} diff --git a/examples/resources/team_repository/example_1.tf b/examples/resources/team_repository/example_1.tf new file mode 100644 index 0000000000..c2276ec830 --- /dev/null +++ b/examples/resources/team_repository/example_1.tf @@ -0,0 +1,15 @@ +# Add a repository to the team +resource "github_team" "some_team" { + name = "SomeTeam" + description = "Some cool team" +} + +resource "github_repository" "some_repo" { + name = "some-repo" +} + +resource "github_team_repository" "some_team_repo" { + team_id = github_team.some_team.id + repository = github_repository.some_repo.name + permission = "pull" +} diff --git a/examples/resources/team_settings/example_1.tf b/examples/resources/team_settings/example_1.tf new file mode 100644 index 0000000000..6df1f7f3e2 --- /dev/null +++ b/examples/resources/team_settings/example_1.tf @@ -0,0 +1,14 @@ +# Add a repository to the team +resource "github_team" "some_team" { + name = "SomeTeam" + description = "Some cool team" +} + +resource "github_team_settings" "code_review_settings" { + team_id = github_team.some_team.id + review_request_delegation { + algorithm = "ROUND_ROBIN" + member_count = 1 + notify = true + } +} diff --git a/examples/resources/team_sync_group_mapping/example_1.tf b/examples/resources/team_sync_group_mapping/example_1.tf new file mode 100644 index 0000000000..025c53983a --- /dev/null +++ b/examples/resources/team_sync_group_mapping/example_1.tf @@ -0,0 +1,15 @@ + +data "github_organization_team_sync_groups" "example_groups" {} + +resource "github_team_sync_group_mapping" "example_group_mapping" { + team_slug = "example" + + dynamic "group" { + for_each = [for g in data.github_organization_team_sync_groups.example_groups.groups : g if g.group_name == "some_team_group"] + content { + group_id = group.value.group_id + group_name = group.value.group_name + group_description = group.value.group_description + } + } +} diff --git a/examples/resources/user_gpg_key/example_1.tf b/examples/resources/user_gpg_key/example_1.tf new file mode 100644 index 0000000000..3b3165f269 --- /dev/null +++ b/examples/resources/user_gpg_key/example_1.tf @@ -0,0 +1,3 @@ +resource "github_user_gpg_key" "example" { + armored_public_key = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n...\n-----END PGP PUBLIC KEY BLOCK-----" +} diff --git a/examples/resources/user_invitation_accepter/example_1.tf b/examples/resources/user_invitation_accepter/example_1.tf new file mode 100644 index 0000000000..eaf70ea04e --- /dev/null +++ b/examples/resources/user_invitation_accepter/example_1.tf @@ -0,0 +1,19 @@ +resource "github_repository" "example" { + name = "example-repo" +} + +resource "github_repository_collaborator" "example" { + repository = github_repository.example.name + username = "example-username" + permission = "push" +} + +provider "github" { + alias = "invitee" + token = var.invitee_token +} + +resource "github_user_invitation_accepter" "example" { + provider = "github.invitee" + invitation_id = github_repository_collaborator.example.invitation_id +} diff --git a/examples/resources/user_ssh_key/example_1.tf b/examples/resources/user_ssh_key/example_1.tf new file mode 100644 index 0000000000..d6d3f5d702 --- /dev/null +++ b/examples/resources/user_ssh_key/example_1.tf @@ -0,0 +1,4 @@ +resource "github_user_ssh_key" "example" { + title = "example title" + key = file("~/.ssh/id_rsa.pub") +} diff --git a/examples/resources/workflow_repository_permissions/example_1.tf b/examples/resources/workflow_repository_permissions/example_1.tf new file mode 100644 index 0000000000..f2ea2480d9 --- /dev/null +++ b/examples/resources/workflow_repository_permissions/example_1.tf @@ -0,0 +1,9 @@ +resource "github_repository" "example" { + name = "my-repository" +} + +resource "github_workflow_repository_permissions" "test" { + default_workflow_permissions = "read" + can_approve_pull_request_reviews = true + repository = github_repository.example.name +} diff --git a/go.mod b/go.mod index b1090713c9..ec64548147 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,15 @@ module github.com/integrations/terraform-provider-github/v6 -go 1.24.4 +go 1.25.0 require ( + github.com/client9/misspell v0.3.4 github.com/go-jose/go-jose/v3 v3.0.4 + github.com/golangci/golangci-lint/v2 v2.10.1 github.com/google/go-github/v83 v83.0.0 github.com/google/uuid v1.6.0 github.com/hashicorp/go-cty v1.5.0 + github.com/hashicorp/terraform-plugin-docs v0.24.0 github.com/hashicorp/terraform-plugin-log v0.10.0 github.com/hashicorp/terraform-plugin-sdk/v2 v2.38.2 github.com/hashicorp/terraform-plugin-testing v1.14.0 @@ -16,24 +19,121 @@ require ( ) require ( + 4d63.com/gocheckcompilerdirectives v1.3.0 // indirect + 4d63.com/gochecknoglobals v0.2.2 // indirect + codeberg.org/chavacava/garif v0.2.0 // indirect + codeberg.org/polyfloyd/go-errorlint v1.9.0 // indirect + dev.gaijin.team/go/exhaustruct/v4 v4.0.0 // indirect + dev.gaijin.team/go/golib v0.6.0 // indirect + github.com/4meepo/tagalign v1.4.3 // indirect + github.com/Abirdcfly/dupword v0.1.7 // indirect + github.com/AdminBenni/iota-mixing v1.0.0 // indirect + github.com/AlwxSin/noinlineerr v1.0.5 // indirect + github.com/Antonboom/errname v1.1.1 // indirect + github.com/Antonboom/nilnil v1.1.1 // indirect + github.com/Antonboom/testifylint v1.6.4 // indirect + github.com/BurntSushi/toml v1.6.0 // indirect + github.com/Djarvur/go-err113 v0.1.1 // indirect + github.com/Kunde21/markdownfmt/v3 v3.1.0 // indirect + github.com/Masterminds/goutils v1.1.1 // indirect + github.com/Masterminds/semver/v3 v3.4.0 // indirect + github.com/Masterminds/sprig/v3 v3.2.3 // indirect + github.com/MirrexOne/unqueryvet v1.5.3 // indirect + github.com/OpenPeeDeeP/depguard/v2 v2.2.1 // indirect github.com/ProtonMail/go-crypto v1.1.6 // indirect github.com/agext/levenshtein v1.2.2 // indirect + github.com/alecthomas/chroma/v2 v2.23.1 // indirect + github.com/alecthomas/go-check-sumtype v0.3.1 // indirect + github.com/alexkohler/nakedret/v2 v2.0.6 // indirect + github.com/alexkohler/prealloc v1.0.2 // indirect + github.com/alfatraining/structtag v1.0.0 // indirect + github.com/alingse/asasalint v0.0.11 // indirect + github.com/alingse/nilnesserr v0.2.0 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect + github.com/armon/go-radix v1.0.0 // indirect + github.com/ashanbrown/forbidigo/v2 v2.3.0 // indirect + github.com/ashanbrown/makezero/v2 v2.1.0 // indirect + github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bgentry/speakeasy v0.1.0 // indirect + github.com/bkielbasa/cyclop v1.2.3 // indirect + github.com/blizzy78/varnamelen v0.8.0 // indirect + github.com/bmatcuk/doublestar/v4 v4.9.1 // indirect + github.com/bombsimon/wsl/v4 v4.7.0 // indirect + github.com/bombsimon/wsl/v5 v5.6.0 // indirect + github.com/breml/bidichk v0.3.3 // indirect + github.com/breml/errchkjson v0.4.1 // indirect + github.com/butuzov/ireturn v0.4.0 // indirect + github.com/butuzov/mirror v1.3.0 // indirect + github.com/catenacyber/perfsprint v0.10.1 // indirect + github.com/ccojocar/zxcvbn-go v1.0.4 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/charithe/durationcheck v0.0.11 // indirect + github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect + github.com/charmbracelet/lipgloss v1.1.0 // indirect + github.com/charmbracelet/x/ansi v0.10.1 // indirect + github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect + github.com/charmbracelet/x/term v0.2.1 // indirect + github.com/ckaznocha/intrange v0.3.1 // indirect github.com/cloudflare/circl v1.6.1 // indirect + github.com/curioswitch/go-reassign v0.3.0 // indirect + github.com/daixiang0/gci v0.13.7 // indirect + github.com/dave/dst v0.27.3 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/denis-tingaikin/go-header v0.5.0 // indirect + github.com/dlclark/regexp2 v1.11.5 // indirect + github.com/ettle/strcase v0.2.0 // indirect github.com/fatih/color v1.18.0 // indirect + github.com/fatih/structtag v1.2.0 // indirect + github.com/firefart/nonamedreturns v1.0.6 // indirect + github.com/fsnotify/fsnotify v1.5.4 // indirect + github.com/fzipp/gocyclo v0.6.0 // indirect + github.com/ghostiam/protogetter v0.3.20 // indirect + github.com/go-critic/go-critic v0.14.3 // indirect + github.com/go-toolsmith/astcast v1.1.0 // indirect + github.com/go-toolsmith/astcopy v1.1.0 // indirect + github.com/go-toolsmith/astequal v1.2.0 // indirect + github.com/go-toolsmith/astfmt v1.1.0 // indirect + github.com/go-toolsmith/astp v1.1.0 // indirect + github.com/go-toolsmith/strparse v1.1.0 // indirect + github.com/go-toolsmith/typep v1.1.0 // indirect + github.com/go-viper/mapstructure/v2 v2.5.0 // indirect + github.com/go-xmlfmt/xmlfmt v1.1.3 // indirect + github.com/gobwas/glob v0.2.3 // indirect + github.com/godoc-lint/godoc-lint v0.11.2 // indirect + github.com/gofrs/flock v0.13.0 // indirect github.com/golang/protobuf v1.5.4 // indirect + github.com/golangci/asciicheck v0.5.0 // indirect + github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 // indirect + github.com/golangci/go-printf-func-name v0.1.1 // indirect + github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d // indirect + github.com/golangci/golines v0.15.0 // indirect + github.com/golangci/misspell v0.8.0 // indirect + github.com/golangci/plugin-module-register v0.1.2 // indirect + github.com/golangci/revgrep v0.8.0 // indirect + github.com/golangci/swaggoswag v0.0.0-20250504205917-77f2aca3143e // indirect + github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e // indirect github.com/google/go-cmp v0.7.0 // indirect github.com/google/go-querystring v1.2.0 // indirect - github.com/hashicorp/errwrap v1.0.0 // indirect + github.com/gordonklaus/ineffassign v0.2.0 // indirect + github.com/gostaticanalysis/analysisutil v0.7.1 // indirect + github.com/gostaticanalysis/comment v1.5.0 // indirect + github.com/gostaticanalysis/forcetypeassert v0.2.0 // indirect + github.com/gostaticanalysis/nilerr v0.1.2 // indirect + github.com/hashicorp/cli v1.1.7 // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-checkpoint v0.5.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect + github.com/hashicorp/go-immutable-radix/v2 v2.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-plugin v1.7.0 // indirect github.com/hashicorp/go-retryablehttp v0.7.7 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.8.0 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hc-install v0.9.2 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/hcl/v2 v2.24.0 // indirect github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-exec v0.24.0 // indirect @@ -42,28 +142,138 @@ require ( github.com/hashicorp/terraform-registry-address v0.4.0 // indirect github.com/hashicorp/terraform-svchost v0.1.1 // indirect github.com/hashicorp/yamux v0.1.2 // indirect - github.com/kr/text v0.2.0 // indirect + github.com/hexops/gotextdiff v1.0.3 // indirect + github.com/huandu/xstrings v1.3.3 // indirect + github.com/imdario/mergo v0.3.15 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/jgautheron/goconst v1.8.2 // indirect + github.com/jingyugao/rowserrcheck v1.1.1 // indirect + github.com/jjti/go-spancheck v0.6.5 // indirect + github.com/julz/importas v0.2.0 // indirect + github.com/karamaru-alpha/copyloopvar v1.2.2 // indirect + github.com/kisielk/errcheck v1.9.0 // indirect + github.com/kkHAIKE/contextcheck v1.1.6 // indirect + github.com/kulti/thelper v0.7.1 // indirect + github.com/kunwardeep/paralleltest v1.0.15 // indirect + github.com/lasiar/canonicalheader v1.1.2 // indirect + github.com/ldez/exptostd v0.4.5 // indirect + github.com/ldez/gomoddirectives v0.8.0 // indirect + github.com/ldez/grignotin v0.10.1 // indirect + github.com/ldez/structtags v0.6.1 // indirect + github.com/ldez/tagliatelle v0.7.2 // indirect + github.com/ldez/usetesting v0.5.0 // indirect + github.com/leonklingele/grouper v1.1.2 // indirect + github.com/lucasb-eyer/go-colorful v1.2.0 // indirect + github.com/macabu/inamedparam v0.2.0 // indirect + github.com/magiconair/properties v1.8.6 // indirect + github.com/manuelarte/embeddedstructfieldcheck v0.4.0 // indirect + github.com/manuelarte/funcorder v0.5.0 // indirect + github.com/maratori/testableexamples v1.0.1 // indirect + github.com/maratori/testpackage v1.1.2 // indirect + github.com/matoous/godox v1.1.0 // indirect github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-runewidth v0.0.16 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/mgechev/revive v1.14.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/moricho/tparallel v0.3.2 // indirect + github.com/muesli/termenv v0.16.0 // indirect + github.com/nakabonne/nestif v0.3.1 // indirect + github.com/nishanths/exhaustive v0.12.0 // indirect + github.com/nishanths/predeclared v0.2.2 // indirect + github.com/nunnatsa/ginkgolinter v0.23.0 // indirect github.com/oklog/run v1.1.0 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect + github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/posener/complete v1.2.3 // indirect + github.com/prometheus/client_golang v1.12.1 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.32.1 // indirect + github.com/prometheus/procfs v0.7.3 // indirect + github.com/quasilyte/go-ruleguard v0.4.5 // indirect + github.com/quasilyte/go-ruleguard/dsl v0.3.23 // indirect + github.com/quasilyte/gogrep v0.5.0 // indirect + github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect + github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect + github.com/raeperd/recvcheck v0.2.0 // indirect + github.com/rivo/uniseg v0.4.7 // indirect + github.com/rogpeppe/go-internal v1.14.1 // indirect + github.com/ryancurrah/gomodguard v1.4.1 // indirect + github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect + github.com/sanposhiho/wastedassign/v2 v2.1.0 // indirect + github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect + github.com/sashamelentyev/interfacebloat v1.1.0 // indirect + github.com/sashamelentyev/usestdlibvars v1.29.0 // indirect + github.com/securego/gosec/v2 v2.23.0 // indirect + github.com/shopspring/decimal v1.3.1 // indirect github.com/shurcooL/graphql v0.0.0-20240915155400-7ee5256398cf // indirect + github.com/sirupsen/logrus v1.9.4 // indirect + github.com/sivchari/containedctx v1.0.3 // indirect + github.com/sonatard/noctx v0.4.0 // indirect + github.com/sourcegraph/go-diff v0.7.0 // indirect + github.com/spf13/afero v1.15.0 // indirect + github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/cobra v1.10.2 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/spf13/pflag v1.0.10 // indirect + github.com/spf13/viper v1.12.0 // indirect + github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect + github.com/stbenjam/no-sprintf-host-port v0.3.1 // indirect + github.com/stretchr/objx v0.5.2 // indirect + github.com/stretchr/testify v1.11.1 // indirect + github.com/subosito/gotenv v1.4.1 // indirect + github.com/tetafro/godot v1.5.4 // indirect + github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67 // indirect + github.com/timonwong/loggercheck v0.11.0 // indirect + github.com/tomarrell/wrapcheck/v2 v2.12.0 // indirect + github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect + github.com/ultraware/funlen v0.2.0 // indirect + github.com/ultraware/whitespace v0.2.0 // indirect + github.com/uudashr/gocognit v1.2.0 // indirect + github.com/uudashr/iface v1.4.1 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect + github.com/xen0n/gosmopolitan v1.3.0 // indirect + github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect + github.com/yagipy/maintidx v1.0.0 // indirect + github.com/yeya24/promlinter v0.3.0 // indirect + github.com/ykadowak/zerologlint v0.1.5 // indirect + github.com/yuin/goldmark v1.7.7 // indirect + github.com/yuin/goldmark-meta v1.1.0 // indirect github.com/zclconf/go-cty v1.17.0 // indirect - golang.org/x/mod v0.32.0 // indirect - golang.org/x/net v0.49.0 // indirect + gitlab.com/bosi/decorder v0.4.2 // indirect + go-simpler.org/musttag v0.14.0 // indirect + go-simpler.org/sloglint v0.11.1 // indirect + go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect + go.augendre.info/arangolint v0.4.0 // indirect + go.augendre.info/fatcontext v0.9.0 // indirect + go.uber.org/multierr v1.10.0 // indirect + go.uber.org/zap v1.27.0 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect + golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b // indirect + golang.org/x/exp/typeparams v0.0.0-20260209203927-2842357ff358 // indirect + golang.org/x/mod v0.33.0 // indirect + golang.org/x/net v0.50.0 // indirect golang.org/x/sync v0.19.0 // indirect golang.org/x/sys v0.41.0 // indirect golang.org/x/text v0.34.0 // indirect - golang.org/x/tools v0.41.0 // indirect + golang.org/x/tools v0.42.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c // indirect google.golang.org/grpc v1.75.1 // indirect google.golang.org/protobuf v1.36.9 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + honnef.co/go/tools v0.7.0 // indirect + mvdan.cc/gofumpt v0.9.2 // indirect + mvdan.cc/unparam v0.0.0-20251027182757-5beb8c8f8f15 // indirect ) diff --git a/go.sum b/go.sum index 32c05367ce..d518a5cb97 100644 --- a/go.sum +++ b/go.sum @@ -1,53 +1,349 @@ +4d63.com/gocheckcompilerdirectives v1.3.0 h1:Ew5y5CtcAAQeTVKUVFrE7EwHMrTO6BggtEj8BZSjZ3A= +4d63.com/gocheckcompilerdirectives v1.3.0/go.mod h1:ofsJ4zx2QAuIP/NO/NAh1ig6R1Fb18/GI7RVMwz7kAY= +4d63.com/gochecknoglobals v0.2.2 h1:H1vdnwnMaZdQW/N+NrkT1SZMTBmcwHe9Vq8lJcYYTtU= +4d63.com/gochecknoglobals v0.2.2/go.mod h1:lLxwTQjL5eIesRbvnzIP3jZtG140FnTdz+AlMa+ogt0= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +codeberg.org/chavacava/garif v0.2.0 h1:F0tVjhYbuOCnvNcU3YSpO6b3Waw6Bimy4K0mM8y6MfY= +codeberg.org/chavacava/garif v0.2.0/go.mod h1:P2BPbVbT4QcvLZrORc2T29szK3xEOlnl0GiPTJmEqBQ= +codeberg.org/polyfloyd/go-errorlint v1.9.0 h1:VkdEEmA1VBpH6ecQoMR4LdphVI3fA4RrCh2an7YmodI= +codeberg.org/polyfloyd/go-errorlint v1.9.0/go.mod h1:GPRRu2LzVijNn4YkrZYJfatQIdS+TrcK8rL5Xs24qw8= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +dev.gaijin.team/go/exhaustruct/v4 v4.0.0 h1:873r7aNneqoBB3IaFIzhvt2RFYTuHgmMjoKfwODoI1Y= +dev.gaijin.team/go/exhaustruct/v4 v4.0.0/go.mod h1:aZ/k2o4Y05aMJtiux15x8iXaumE88YdiB0Ai4fXOzPI= +dev.gaijin.team/go/golib v0.6.0 h1:v6nnznFTs4bppib/NyU1PQxobwDHwCXXl15P7DV5Zgo= +dev.gaijin.team/go/golib v0.6.0/go.mod h1:uY1mShx8Z/aNHWDyAkZTkX+uCi5PdX7KsG1eDQa2AVE= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/4meepo/tagalign v1.4.3 h1:Bnu7jGWwbfpAie2vyl63Zup5KuRv21olsPIha53BJr8= +github.com/4meepo/tagalign v1.4.3/go.mod h1:00WwRjiuSbrRJnSVeGWPLp2epS5Q/l4UEy0apLLS37c= +github.com/Abirdcfly/dupword v0.1.7 h1:2j8sInznrje4I0CMisSL6ipEBkeJUJAmK1/lfoNGWrQ= +github.com/Abirdcfly/dupword v0.1.7/go.mod h1:K0DkBeOebJ4VyOICFdppB23Q0YMOgVafM0zYW0n9lF4= +github.com/AdminBenni/iota-mixing v1.0.0 h1:Os6lpjG2dp/AE5fYBPAA1zfa2qMdCAWwPMCgpwKq7wo= +github.com/AdminBenni/iota-mixing v1.0.0/go.mod h1:i4+tpAaB+qMVIV9OK3m4/DAynOd5bQFaOu+2AhtBCNY= +github.com/AlwxSin/noinlineerr v1.0.5 h1:RUjt63wk1AYWTXtVXbSqemlbVTb23JOSRiNsshj7TbY= +github.com/AlwxSin/noinlineerr v1.0.5/go.mod h1:+QgkkoYrMH7RHvcdxdlI7vYYEdgeoFOVjU9sUhw/rQc= +github.com/Antonboom/errname v1.1.1 h1:bllB7mlIbTVzO9jmSWVWLjxTEbGBVQ1Ff/ClQgtPw9Q= +github.com/Antonboom/errname v1.1.1/go.mod h1:gjhe24xoxXp0ScLtHzjiXp0Exi1RFLKJb0bVBtWKCWQ= +github.com/Antonboom/nilnil v1.1.1 h1:9Mdr6BYd8WHCDngQnNVV0b554xyisFioEKi30sksufQ= +github.com/Antonboom/nilnil v1.1.1/go.mod h1:yCyAmSw3doopbOWhJlVci+HuyNRuHJKIv6V2oYQa8II= +github.com/Antonboom/testifylint v1.6.4 h1:gs9fUEy+egzxkEbq9P4cpcMB6/G0DYdMeiFS87UiqmQ= +github.com/Antonboom/testifylint v1.6.4/go.mod h1:YO33FROXX2OoUfwjz8g+gUxQXio5i9qpVy7nXGbxDD4= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk= +github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Djarvur/go-err113 v0.1.1 h1:eHfopDqXRwAi+YmCUas75ZE0+hoBHJ2GQNLYRSxao4g= +github.com/Djarvur/go-err113 v0.1.1/go.mod h1:IaWJdYFLg76t2ihfflPZnM1LIQszWOsFDh2hhhAVF6k= +github.com/Kunde21/markdownfmt/v3 v3.1.0 h1:KiZu9LKs+wFFBQKhrZJrFZwtLnCCWJahL+S+E/3VnM0= +github.com/Kunde21/markdownfmt/v3 v3.1.0/go.mod h1:tPXN1RTyOzJwhfHoon9wUr4HGYmWgVxSQN6VBJDkrVc= +github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= +github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= +github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= +github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= +github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/MirrexOne/unqueryvet v1.5.3 h1:LpT3rsH+IY3cQddWF9bg4C7jsbASdGnrOSofY8IPEiw= +github.com/MirrexOne/unqueryvet v1.5.3/go.mod h1:fs9Zq6eh1LRIhsDIsxf9PONVUjYdFHdtkHIgZdJnyPU= +github.com/OpenPeeDeeP/depguard/v2 v2.2.1 h1:vckeWVESWp6Qog7UZSARNqfu/cZqvki8zsuj3piCMx4= +github.com/OpenPeeDeeP/depguard/v2 v2.2.1/go.mod h1:q4DKzC4UcVaAvcfd41CZh0PWpGgzrVxUYBlgKNGquUo= github.com/ProtonMail/go-crypto v1.1.6 h1:ZcV+Ropw6Qn0AX9brlQLAUXfqLBc7Bl+f/DmNxpLfdw= github.com/ProtonMail/go-crypto v1.1.6/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE= github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= +github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= +github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= +github.com/alecthomas/chroma/v2 v2.23.1 h1:nv2AVZdTyClGbVQkIzlDm/rnhk1E9bU9nXwmZ/Vk/iY= +github.com/alecthomas/chroma/v2 v2.23.1/go.mod h1:NqVhfBR0lte5Ouh3DcthuUCTUpDC9cxBOfyMbMQPs3o= +github.com/alecthomas/go-check-sumtype v0.3.1 h1:u9aUvbGINJxLVXiFvHUlPEaD7VDULsrxJb4Aq31NLkU= +github.com/alecthomas/go-check-sumtype v0.3.1/go.mod h1:A8TSiN3UPRw3laIgWEUOHHLPa6/r9MtoigdlP5h3K/E= +github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs= +github.com/alecthomas/repr v0.5.2/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/alexkohler/nakedret/v2 v2.0.6 h1:ME3Qef1/KIKr3kWX3nti3hhgNxw6aqN5pZmQiFSsuzQ= +github.com/alexkohler/nakedret/v2 v2.0.6/go.mod h1:l3RKju/IzOMQHmsEvXwkqMDzHHvurNQfAgE1eVmT40Q= +github.com/alexkohler/prealloc v1.0.2 h1:MPo8cIkGkZytq7WNH9UHv3DIX1mPz1RatPXnZb0zHWQ= +github.com/alexkohler/prealloc v1.0.2/go.mod h1:fT39Jge3bQrfA7nPMDngUfvUbQGQeJyGQnR+913SCig= +github.com/alfatraining/structtag v1.0.0 h1:2qmcUqNcCoyVJ0up879K614L9PazjBSFruTB0GOFjCc= +github.com/alfatraining/structtag v1.0.0/go.mod h1:p3Xi5SwzTi+Ryj64DqjLWz7XurHxbGsq6y3ubePJPus= +github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw= +github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= +github.com/alingse/nilnesserr v0.2.0 h1:raLem5KG7EFVb4UIDAXgrv3N2JIaffeKNtcEXkEWd/w= +github.com/alingse/nilnesserr v0.2.0/go.mod h1:1xJPrXonEtX7wyTq8Dytns5P2hNzoWymVUIaKm4HNFg= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= +github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/ashanbrown/forbidigo/v2 v2.3.0 h1:OZZDOchCgsX5gvToVtEBoV2UWbFfI6RKQTir2UZzSxo= +github.com/ashanbrown/forbidigo/v2 v2.3.0/go.mod h1:5p6VmsG5/1xx3E785W9fouMxIOkvY2rRV9nMdWadd6c= +github.com/ashanbrown/makezero/v2 v2.1.0 h1:snuKYMbqosNokUKm+R6/+vOPs8yVAi46La7Ck6QYSaE= +github.com/ashanbrown/makezero/v2 v2.1.0/go.mod h1:aEGT/9q3S8DHeE57C88z2a6xydvgx8J5hgXIGWgo0MY= +github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= +github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bkielbasa/cyclop v1.2.3 h1:faIVMIGDIANuGPWH031CZJTi2ymOQBULs9H21HSMa5w= +github.com/bkielbasa/cyclop v1.2.3/go.mod h1:kHTwA9Q0uZqOADdupvcFJQtp/ksSnytRMe8ztxG8Fuo= +github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ089M= +github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= +github.com/bmatcuk/doublestar/v4 v4.9.1 h1:X8jg9rRZmJd4yRy7ZeNDRnM+T3ZfHv15JiBJ/avrEXE= +github.com/bmatcuk/doublestar/v4 v4.9.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= +github.com/bombsimon/wsl/v4 v4.7.0 h1:1Ilm9JBPRczjyUs6hvOPKvd7VL1Q++PL8M0SXBDf+jQ= +github.com/bombsimon/wsl/v4 v4.7.0/go.mod h1:uV/+6BkffuzSAVYD+yGyld1AChO7/EuLrCF/8xTiapg= +github.com/bombsimon/wsl/v5 v5.6.0 h1:4z+/sBqC5vUmSp1O0mS+czxwH9+LKXtCWtHH9rZGQL8= +github.com/bombsimon/wsl/v5 v5.6.0/go.mod h1:Uqt2EfrMj2NV8UGoN1f1Y3m0NpUVCsUdrNCdet+8LvU= +github.com/breml/bidichk v0.3.3 h1:WSM67ztRusf1sMoqH6/c4OBCUlRVTKq+CbSeo0R17sE= +github.com/breml/bidichk v0.3.3/go.mod h1:ISbsut8OnjB367j5NseXEGGgO/th206dVa427kR8YTE= +github.com/breml/errchkjson v0.4.1 h1:keFSS8D7A2T0haP9kzZTi7o26r7kE3vymjZNeNDRDwg= +github.com/breml/errchkjson v0.4.1/go.mod h1:a23OvR6Qvcl7DG/Z4o0el6BRAjKnaReoPQFciAl9U3s= github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/FBatYVw= github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c= +github.com/butuzov/ireturn v0.4.0 h1:+s76bF/PfeKEdbG8b54aCocxXmi0wvYdOVsWxVO7n8E= +github.com/butuzov/ireturn v0.4.0/go.mod h1:ghI0FrCmap8pDWZwfPisFD1vEc56VKH4NpQUxDHta70= +github.com/butuzov/mirror v1.3.0 h1:HdWCXzmwlQHdVhwvsfBb2Au0r3HyINry3bDWLYXiKoc= +github.com/butuzov/mirror v1.3.0/go.mod h1:AEij0Z8YMALaq4yQj9CPPVYOyJQyiexpQEQgihajRfI= +github.com/catenacyber/perfsprint v0.10.1 h1:u7Riei30bk46XsG8nknMhKLXG9BcXz3+3tl/WpKm0PQ= +github.com/catenacyber/perfsprint v0.10.1/go.mod h1:DJTGsi/Zufpuus6XPGJyKOTMELe347o6akPvWG9Zcsc= +github.com/ccojocar/zxcvbn-go v1.0.4 h1:FWnCIRMXPj43ukfX000kvBZvV6raSxakYr1nzyNrUcc= +github.com/ccojocar/zxcvbn-go v1.0.4/go.mod h1:3GxGX+rHmueTUMvm5ium7irpyjmm7ikxYFOSJB21Das= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/charithe/durationcheck v0.0.11 h1:g1/EX1eIiKS57NTWsYtHDZ/APfeXKhye1DidBcABctk= +github.com/charithe/durationcheck v0.0.11/go.mod h1:x5iZaixRNl8ctbM+3B2RrPG5t856TxRyVQEnbIEM2X4= +github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc h1:4pZI35227imm7yK2bGPcfpFEmuY1gc2YSTShr4iJBfs= +github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc/go.mod h1:X4/0JoqgTIPSFcRA/P6INZzIuyqdFY5rm8tb41s9okk= +github.com/charmbracelet/lipgloss v1.1.0 h1:vYXsiLHVkK7fp74RkV7b2kq9+zDLoEU4MZoFqR/noCY= +github.com/charmbracelet/lipgloss v1.1.0/go.mod h1:/6Q8FR2o+kj8rz4Dq0zQc3vYf7X+B0binUUBwA0aL30= +github.com/charmbracelet/x/ansi v0.10.1 h1:rL3Koar5XvX0pHGfovN03f5cxLbCF2YvLeyz7D2jVDQ= +github.com/charmbracelet/x/ansi v0.10.1/go.mod h1:3RQDQ6lDnROptfpWuUVIUG64bD2g2BgntdxH0Ya5TeE= +github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd h1:vy0GVL4jeHEwG5YOXDmi86oYw2yuYUGqz6a8sLwg0X8= +github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs= +github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ= +github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/ckaznocha/intrange v0.3.1 h1:j1onQyXvHUsPWujDH6WIjhyH26gkRt/txNlV7LspvJs= +github.com/ckaznocha/intrange v0.3.1/go.mod h1:QVepyz1AkUoFQkpEqksSYpNpUo3c5W7nWh/s6SHIJJk= +github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0= github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/curioswitch/go-reassign v0.3.0 h1:dh3kpQHuADL3cobV/sSGETA8DOv457dwl+fbBAhrQPs= +github.com/curioswitch/go-reassign v0.3.0/go.mod h1:nApPCCTtqLJN/s8HfItCcKV0jIPwluBOvZP+dsJGA88= github.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s= github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= +github.com/daixiang0/gci v0.13.7 h1:+0bG5eK9vlI08J+J/NWGbWPTNiXPG4WhNLJOkSxWITQ= +github.com/daixiang0/gci v0.13.7/go.mod h1:812WVN6JLFY9S6Tv76twqmNqevN0pa3SX3nih0brVzQ= +github.com/dave/dst v0.27.3 h1:P1HPoMza3cMEquVf9kKy8yXsFirry4zEnWOdYPOoIzY= +github.com/dave/dst v0.27.3/go.mod h1:jHh6EOibnHgcUW3WjKHisiooEkYwqpHLBSX1iOBhEyc= +github.com/dave/jennifer v1.7.1 h1:B4jJJDHelWcDhlRQxWeo0Npa/pYKBLrirAQoTN45txo= +github.com/dave/jennifer v1.7.1/go.mod h1:nXbxhEmQfOZhWml3D1cDK5M1FLnMSozpbFN/m3RmGZc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/denis-tingaikin/go-header v0.5.0 h1:SRdnP5ZKvcO9KKRP1KJrhFR3RrlGuD+42t4429eC9k8= +github.com/denis-tingaikin/go-header v0.5.0/go.mod h1:mMenU5bWrok6Wl2UsZjy+1okegmwQ3UgWl4V1D8gjlY= +github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ= +github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/ettle/strcase v0.2.0 h1:fGNiVF21fHXpX1niBgk0aROov1LagYsOwV/xqKDKR/Q= +github.com/ettle/strcase v0.2.0/go.mod h1:DajmHElDSaX76ITe3/VHVyMin4LWSJN5Z909Wp+ED1A= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= +github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= +github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/firefart/nonamedreturns v1.0.6 h1:vmiBcKV/3EqKY3ZiPxCINmpS431OcE1S47AQUwhrg8E= +github.com/firefart/nonamedreturns v1.0.6/go.mod h1:R8NisJnSIpvPWheCq0mNRXJok6D8h7fagJTF8EMEwCo= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= +github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= +github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= +github.com/ghostiam/protogetter v0.3.20 h1:oW7OPFit2FxZOpmMRPP9FffU4uUpfeE/rEdE1f+MzD0= +github.com/ghostiam/protogetter v0.3.20/go.mod h1:FjIu5Yfs6FT391m+Fjp3fbAYJ6rkL/J6ySpZBfnODuI= +github.com/go-critic/go-critic v0.14.3 h1:5R1qH2iFeo4I/RJU8vTezdqs08Egi4u5p6vOESA0pog= +github.com/go-critic/go-critic v0.14.3/go.mod h1:xwntfW6SYAd7h1OqDzmN6hBX/JxsEKl5up/Y2bsxgVQ= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.6.2 h1:6Q86EsPXMa7c3YZ3aLAQsMA0VlWmy43r6FHqa/UNbRM= github.com/go-git/go-billy/v5 v5.6.2/go.mod h1:rcFC2rAsp/erv7CMz9GczHcuD0D32fWzH+MJAU+jaUU= github.com/go-git/go-git/v5 v5.14.0 h1:/MD3lCrGjCen5WfEAzKg00MJJffKhC8gzS80ycmCi60= github.com/go-git/go-git/v5 v5.14.0/go.mod h1:Z5Xhoia5PcWA3NF8vRLURn9E5FRhSl7dGj9ItW3Wk5k= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-jose/go-jose/v3 v3.0.4 h1:Wp5HA7bLQcKnf6YYao/4kpRpVMp/yf6+pJKV8WFSaNY= github.com/go-jose/go-jose/v3 v3.0.4/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= +github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/go-toolsmith/astcast v1.1.0 h1:+JN9xZV1A+Re+95pgnMgDboWNVnIMMQXwfBwLRPgSC8= +github.com/go-toolsmith/astcast v1.1.0/go.mod h1:qdcuFWeGGS2xX5bLM/c3U9lewg7+Zu4mr+xPwZIB4ZU= +github.com/go-toolsmith/astcopy v1.1.0 h1:YGwBN0WM+ekI/6SS6+52zLDEf8Yvp3n2seZITCUBt5s= +github.com/go-toolsmith/astcopy v1.1.0/go.mod h1:hXM6gan18VA1T/daUEHCFcYiW8Ai1tIwIzHY6srfEAw= +github.com/go-toolsmith/astequal v1.0.3/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= +github.com/go-toolsmith/astequal v1.1.0/go.mod h1:sedf7VIdCL22LD8qIvv7Nn9MuWJruQA/ysswh64lffQ= +github.com/go-toolsmith/astequal v1.2.0 h1:3Fs3CYZ1k9Vo4FzFhwwewC3CHISHDnVUPC4x0bI2+Cw= +github.com/go-toolsmith/astequal v1.2.0/go.mod h1:c8NZ3+kSFtFY/8lPso4v8LuJjdJiUFVnSuU3s0qrrDY= +github.com/go-toolsmith/astfmt v1.1.0 h1:iJVPDPp6/7AaeLJEruMsBUlOYCmvg0MoCfJprsOmcco= +github.com/go-toolsmith/astfmt v1.1.0/go.mod h1:OrcLlRwu0CuiIBp/8b5PYF9ktGVZUjlNMV634mhwuQ4= +github.com/go-toolsmith/astp v1.1.0 h1:dXPuCl6u2llURjdPLLDxJeZInAeZ0/eZwFJmqZMnpQA= +github.com/go-toolsmith/astp v1.1.0/go.mod h1:0T1xFGz9hicKs8Z5MfAqSUitoUYS30pDMsRVIDHs8CA= +github.com/go-toolsmith/pkgload v1.2.2 h1:0CtmHq/02QhxcF7E9N5LIFcYFsMR5rdovfqTtRKkgIk= +github.com/go-toolsmith/pkgload v1.2.2/go.mod h1:R2hxLNRKuAsiXCo2i5J6ZQPhnPMOVtU+f0arbFPWCus= +github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= +github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQiyP2Bvw= +github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= +github.com/go-toolsmith/typep v1.1.0 h1:fIRYDyF+JywLfqzyhdiHzRop/GQDxxNhLGQ6gFUNHus= +github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig= +github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro= +github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-xmlfmt/xmlfmt v1.1.3 h1:t8Ey3Uy7jDSEisW2K3somuMKIpzktkWptA0iFCnRUWY= +github.com/go-xmlfmt/xmlfmt v1.1.3/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= +github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= +github.com/godoc-lint/godoc-lint v0.11.2 h1:Bp0FkJWoSdNsBikdNgIcgtaoo+xz6I/Y9s5WSBQUeeM= +github.com/godoc-lint/godoc-lint v0.11.2/go.mod h1:iVpGdL1JCikNH2gGeAn3Hh+AgN5Gx/I/cxV+91L41jo= +github.com/gofrs/flock v0.13.0 h1:95JolYOvGMqeH31+FC7D2+uULf6mG61mEZ/A8dRYMzw= +github.com/gofrs/flock v0.13.0/go.mod h1:jxeyy9R1auM5S6JYDBhDt+E2TCo7DkratH4Pgi8P+Z0= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ= github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/golangci/asciicheck v0.5.0 h1:jczN/BorERZwK8oiFBOGvlGPknhvq0bjnysTj4nUfo0= +github.com/golangci/asciicheck v0.5.0/go.mod h1:5RMNAInbNFw2krqN6ibBxN/zfRFa9S6tA1nPdM0l8qQ= +github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 h1:WUvBfQL6EW/40l6OmeSBYQJNSif4O11+bmWEz+C7FYw= +github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32/go.mod h1:NUw9Zr2Sy7+HxzdjIULge71wI6yEg1lWQr7Evcu8K0E= +github.com/golangci/go-printf-func-name v0.1.1 h1:hIYTFJqAGp1iwoIfsNTpoq1xZAarogrvjO9AfiW3B4U= +github.com/golangci/go-printf-func-name v0.1.1/go.mod h1:Es64MpWEZbh0UBtTAICOZiB+miW53w/K9Or/4QogJss= +github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d h1:viFft9sS/dxoYY0aiOTsLKO2aZQAPT4nlQCsimGcSGE= +github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d/go.mod h1:ivJ9QDg0XucIkmwhzCDsqcnxxlDStoTl89jDMIoNxKY= +github.com/golangci/golangci-lint/v2 v2.10.1 h1:flhw5Px6ojbLyEFzXvJn5B2HEdkkRlkhE1SnmCbQBiE= +github.com/golangci/golangci-lint/v2 v2.10.1/go.mod h1:dBsrOk6zj0vDhlTv+IiJGqkDokR24IVTS7W3EVfPTQY= +github.com/golangci/golines v0.15.0 h1:Qnph25g8Y1c5fdo1X7GaRDGgnMHgnxh4Gk4VfPTtRx0= +github.com/golangci/golines v0.15.0/go.mod h1:AZjXd23tbHMpowhtnGlj9KCNsysj72aeZVVHnVcZx10= +github.com/golangci/misspell v0.8.0 h1:qvxQhiE2/5z+BVRo1kwYA8yGz+lOlu5Jfvtx2b04Jbg= +github.com/golangci/misspell v0.8.0/go.mod h1:WZyyI2P3hxPY2UVHs3cS8YcllAeyfquQcKfdeE9AFVg= +github.com/golangci/plugin-module-register v0.1.2 h1:e5WM6PO6NIAEcij3B053CohVp3HIYbzSuP53UAYgOpg= +github.com/golangci/plugin-module-register v0.1.2/go.mod h1:1+QGTsKBvAIvPvoY/os+G5eoqxWn70HYDm2uvUyGuVw= +github.com/golangci/revgrep v0.8.0 h1:EZBctwbVd0aMeRnNUsFogoyayvKHyxlV3CdUA46FX2s= +github.com/golangci/revgrep v0.8.0/go.mod h1:U4R/s9dlXZsg8uJmaR1GrloUr14D7qDl8gi2iPXJH8k= +github.com/golangci/swaggoswag v0.0.0-20250504205917-77f2aca3143e h1:ai0EfmVYE2bRA5htgAG9r7s3tHsfjIhN98WshBTJ9jM= +github.com/golangci/swaggoswag v0.0.0-20250504205917-77f2aca3143e/go.mod h1:Vrn4B5oR9qRwM+f54koyeH3yzphlecwERs0el27Fr/s= +github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e h1:gD6P7NEo7Eqtt0ssnqSJNNndxe69DOQ24A5h7+i3KpM= +github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e/go.mod h1:h+wZwLjUTJnm/P2rwlbJdRPZXOzaT36/FwnPnY2inzc= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= @@ -56,10 +352,43 @@ github.com/google/go-github/v83 v83.0.0 h1:Ydy4gAfqxrnFUwXAuKl/OMhhGa0KtMtnJ3Eoz github.com/google/go-github/v83 v83.0.0/go.mod h1:gbqarhK37mpSu8Xy7sz21ITtznvzouyHSAajSaYCHe8= github.com/google/go-querystring v1.2.0 h1:yhqkPbu2/OH+V9BfpCVPZkNmUXhb2gBxJArfhIxNtP0= github.com/google/go-querystring v1.2.0/go.mod h1:8IFJqpSRITyJ8QhQ13bmbeMBDfmeEJZD5A0egEOmkqU= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 h1:z2ogiKUYzX5Is6zr/vP9vJGqPwcdqsWjOt+V8J7+bTc= +github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83/go.mod h1:MxpfABSjhmINe3F1It9d+8exIHFvUqtLIRCdOGNXqiI= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gordonklaus/ineffassign v0.2.0 h1:Uths4KnmwxNJNzq87fwQQDDnbNb7De00VOk9Nu0TySs= +github.com/gordonklaus/ineffassign v0.2.0/go.mod h1:TIpymnagPSexySzs7F9FnO1XFTy8IT3a59vmZp5Y9Lw= +github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk= +github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= +github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= +github.com/gostaticanalysis/comment v1.5.0 h1:X82FLl+TswsUMpMh17srGRuKaaXprTaytmEpgnKIDu8= +github.com/gostaticanalysis/comment v1.5.0/go.mod h1:V6eb3gpCv9GNVqb6amXzEUX3jXLVK/AdA+IrAMSqvEc= +github.com/gostaticanalysis/forcetypeassert v0.2.0 h1:uSnWrrUEYDr86OCxWa4/Tp2jeYDlogZiZHzGkWFefTk= +github.com/gostaticanalysis/forcetypeassert v0.2.0/go.mod h1:M5iPavzE9pPqWyeiVXSFghQjljW1+l/Uke3PXHS6ILY= +github.com/gostaticanalysis/nilerr v0.1.2 h1:S6nk8a9N8g062nsx63kUkF6AzbHGw7zzyHMcpu52xQU= +github.com/gostaticanalysis/nilerr v0.1.2/go.mod h1:A19UHhoY3y8ahoL7YKz6sdjDtduwTSI4CsymaC2htPA= +github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= +github.com/gostaticanalysis/testutil v0.5.0 h1:Dq4wT1DdTwTGCQQv3rl3IvD5Ld0E6HiY+3Zh0sUGqw8= +github.com/gostaticanalysis/testutil v0.5.0/go.mod h1:OLQSbuM6zw2EvCcXTz1lVq5unyoNft372msDY0nY5Hs= +github.com/hashicorp/cli v1.1.7 h1:/fZJ+hNdwfTSfsxMBa9WWMlfjUZbX8/LnUxgAd7lCVU= +github.com/hashicorp/cli v1.1.7/go.mod h1:e6Mfpga9OCT1vqzFuoGZiiF/KaG9CbUfO5s3ghU3YgU= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= @@ -69,6 +398,9 @@ github.com/hashicorp/go-cty v1.5.0 h1:EkQ/v+dDNUqnuVpmS5fPqyY71NXVgT5gf32+57xY8g github.com/hashicorp/go-cty v1.5.0/go.mod h1:lFUCG5kd8exDobgSfyj4ONE/dc822kiYMguVKdHGMLM= github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-immutable-radix/v2 v2.1.0 h1:CUW5RYIcysz+D3B+l1mDeXrQ7fUvGGCwJfdASSzbrfo= +github.com/hashicorp/go-immutable-radix/v2 v2.1.0/go.mod h1:hgdqLXA4f6NIjRVisM1TJ9aOJVNRqKZj+xDGF6m7PBw= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-plugin v1.7.0 h1:YghfQH/0QmPNc/AZMTFE3ac8fipZyZECHdDPshfk+mA= @@ -78,10 +410,17 @@ github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFO github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.8.0 h1:KAkNb1HAiZd1ukkxDFGmokVZe1Xy9HG6NUp+bPle2i4= github.com/hashicorp/go-version v1.8.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hc-install v0.9.2 h1:v80EtNX4fCVHqzL9Lg/2xkp62bbvQMnvPQ0G+OmtO24= github.com/hashicorp/hc-install v0.9.2/go.mod h1:XUqBQNnuT4RsxoxiM9ZaUk0NX8hi2h+Lb6/c0OZnC/I= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/hcl/v2 v2.24.0 h1:2QJdZ454DSsYGoaE6QheQZjtKZSUs9Nh2izTWiwQxvE= github.com/hashicorp/hcl/v2 v2.24.0/go.mod h1:oGoO1FIQYfn/AgyOhlg9qLC6/nOJPX3qGbkZpYAcqfM= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= @@ -90,6 +429,8 @@ github.com/hashicorp/terraform-exec v0.24.0 h1:mL0xlk9H5g2bn0pPF6JQZk5YlByqSqrO5 github.com/hashicorp/terraform-exec v0.24.0/go.mod h1:lluc/rDYfAhYdslLJQg3J0oDqo88oGQAdHR+wDqFvo4= github.com/hashicorp/terraform-json v0.27.2 h1:BwGuzM6iUPqf9JYM/Z4AF1OJ5VVJEEzoKST/tRDBJKU= github.com/hashicorp/terraform-json v0.27.2/go.mod h1:GzPLJ1PLdUG5xL6xn1OXWIjteQRT2CNT9o/6A9mi9hE= +github.com/hashicorp/terraform-plugin-docs v0.24.0 h1:YNZYd+8cpYclQyXbl1EEngbld8w7/LPOm99GD5nikIU= +github.com/hashicorp/terraform-plugin-docs v0.24.0/go.mod h1:YLg+7LEwVmRuJc0EuCw0SPLxuQXw5mW8iJ5ml/kvi+o= github.com/hashicorp/terraform-plugin-go v0.29.0 h1:1nXKl/nSpaYIUBU1IG/EsDOX0vv+9JxAltQyDMpq5mU= github.com/hashicorp/terraform-plugin-go v0.29.0/go.mod h1:vYZbIyvxyy0FWSmDHChCqKvI40cFTDGSb3D8D70i9GM= github.com/hashicorp/terraform-plugin-log v0.10.0 h1:eu2kW6/QBVdN4P3Ju2WiB2W3ObjkAsyfBsL3Wh1fj3g= @@ -104,12 +445,49 @@ github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc= github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8= github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns= +github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= +github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4= +github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= +github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jgautheron/goconst v1.8.2 h1:y0XF7X8CikZ93fSNT6WBTb/NElBu9IjaY7CCYQrCMX4= +github.com/jgautheron/goconst v1.8.2/go.mod h1:A0oxgBCHy55NQn6sYpO7UdnA9p+h7cPtoOZUmvNIako= github.com/jhump/protoreflect v1.17.0 h1:qOEr613fac2lOuTgWN4tPAtLL7fUSbuJL5X5XumQh94= github.com/jhump/protoreflect v1.17.0/go.mod h1:h9+vUUL38jiBzck8ck+6G/aeMX8Z4QUY/NiJPwPNi+8= +github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= +github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= +github.com/jjti/go-spancheck v0.6.5 h1:lmi7pKxa37oKYIMScialXUK6hP3iY5F1gu+mLBPgYB8= +github.com/jjti/go-spancheck v0.6.5/go.mod h1:aEogkeatBrbYsyW6y5TgDfihCulDYciL1B7rG2vSsrU= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/julz/importas v0.2.0 h1:y+MJN/UdL63QbFJHws9BVC5RpA2iq0kpjrFajTGivjQ= +github.com/julz/importas v0.2.0/go.mod h1:pThlt589EnCYtMnmhmRYY/qn9lCf/frPOK+WMx3xiJY= +github.com/karamaru-alpha/copyloopvar v1.2.2 h1:yfNQvP9YaGQR7VaWLYcfZUlRP2eo2vhExWKxD/fP6q0= +github.com/karamaru-alpha/copyloopvar v1.2.2/go.mod h1:oY4rGZqZ879JkJMtX3RRkcXRkmUvH0x35ykgaKgsgJY= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kisielk/errcheck v1.9.0 h1:9xt1zI9EBfcYBvdU1nVrzMzzUPUtPKs9bVSIM3TAb3M= +github.com/kisielk/errcheck v1.9.0/go.mod h1:kQxWMMVZgIkDq7U8xtG/n2juOjbLgZtedi0D+/VL/i8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kkHAIKE/contextcheck v1.1.6 h1:7HIyRcnyzxL9Lz06NGhiKvenXq7Zw6Q0UQu/ttjfJCE= +github.com/kkHAIKE/contextcheck v1.1.6/go.mod h1:3dDbMRNBFaq8HFXWC1JyvDSPm43CmE6IuHam8Wr0rkg= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -117,6 +495,44 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kulti/thelper v0.7.1 h1:fI8QITAoFVLx+y+vSyuLBP+rcVIB8jKooNSCT2EiI98= +github.com/kulti/thelper v0.7.1/go.mod h1:NsMjfQEy6sd+9Kfw8kCP61W1I0nerGSYSFnGaxQkcbs= +github.com/kunwardeep/paralleltest v1.0.15 h1:ZMk4Qt306tHIgKISHWFJAO1IDQJLc6uDyJMLyncOb6w= +github.com/kunwardeep/paralleltest v1.0.15/go.mod h1:di4moFqtfz3ToSKxhNjhOZL+696QtJGCFe132CbBLGk= +github.com/lasiar/canonicalheader v1.1.2 h1:vZ5uqwvDbyJCnMhmFYimgMZnJMjwljN5VGY0VKbMXb4= +github.com/lasiar/canonicalheader v1.1.2/go.mod h1:qJCeLFS0G/QlLQ506T+Fk/fWMa2VmBUiEI2cuMK4djI= +github.com/ldez/exptostd v0.4.5 h1:kv2ZGUVI6VwRfp/+bcQ6Nbx0ghFWcGIKInkG/oFn1aQ= +github.com/ldez/exptostd v0.4.5/go.mod h1:QRjHRMXJrCTIm9WxVNH6VW7oN7KrGSht69bIRwvdFsM= +github.com/ldez/gomoddirectives v0.8.0 h1:JqIuTtgvFC2RdH1s357vrE23WJF2cpDCPFgA/TWDGpk= +github.com/ldez/gomoddirectives v0.8.0/go.mod h1:jutzamvZR4XYJLr0d5Honycp4Gy6GEg2mS9+2YX3F1Q= +github.com/ldez/grignotin v0.10.1 h1:keYi9rYsgbvqAZGI1liek5c+jv9UUjbvdj3Tbn5fn4o= +github.com/ldez/grignotin v0.10.1/go.mod h1:UlDbXFCARrXbWGNGP3S5vsysNXAPhnSuBufpTEbwOas= +github.com/ldez/structtags v0.6.1 h1:bUooFLbXx41tW8SvkfwfFkkjPYvFFs59AAMgVg6DUBk= +github.com/ldez/structtags v0.6.1/go.mod h1:YDxVSgDy/MON6ariaxLF2X09bh19qL7MtGBN5MrvbdY= +github.com/ldez/tagliatelle v0.7.2 h1:KuOlL70/fu9paxuxbeqlicJnCspCRjH0x8FW+NfgYUk= +github.com/ldez/tagliatelle v0.7.2/go.mod h1:PtGgm163ZplJfZMZ2sf5nhUT170rSuPgBimoyYtdaSI= +github.com/ldez/usetesting v0.5.0 h1:3/QtzZObBKLy1F4F8jLuKJiKBjjVFi1IavpoWbmqLwc= +github.com/ldez/usetesting v0.5.0/go.mod h1:Spnb4Qppf8JTuRgblLrEWb7IE6rDmUpGvxY3iRrzvDQ= +github.com/leonklingele/grouper v1.1.2 h1:o1ARBDLOmmasUaNDesWqWCIFH3u7hoFlM84YrjT3mIY= +github.com/leonklingele/grouper v1.1.2/go.mod h1:6D0M/HVkhs2yRKRFZUoGjeDy7EZTfFBE9gl4kjmIGkA= +github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= +github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= +github.com/macabu/inamedparam v0.2.0 h1:VyPYpOc10nkhI2qeNUdh3Zket4fcZjEWe35poddBCpE= +github.com/macabu/inamedparam v0.2.0/go.mod h1:+Pee9/YfGe5LJ62pYXqB89lJ+0k5bsR8Wgz/C0Zlq3U= +github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/manuelarte/embeddedstructfieldcheck v0.4.0 h1:3mAIyaGRtjK6EO9E73JlXLtiy7ha80b2ZVGyacxgfww= +github.com/manuelarte/embeddedstructfieldcheck v0.4.0/go.mod h1:z8dFSyXqp+fC6NLDSljRJeNQJJDWnY7RoWFzV3PC6UM= +github.com/manuelarte/funcorder v0.5.0 h1:llMuHXXbg7tD0i/LNw8vGnkDTHFpTnWqKPI85Rknc+8= +github.com/manuelarte/funcorder v0.5.0/go.mod h1:Yt3CiUQthSBMBxjShjdXMexmzpP8YGvGLjrxJNkO2hA= +github.com/maratori/testableexamples v1.0.1 h1:HfOQXs+XgfeRBJ+Wz0XfH+FHnoY9TVqL6Fcevpzy4q8= +github.com/maratori/testableexamples v1.0.1/go.mod h1:XE2F/nQs7B9N08JgyRmdGjYVGqxWwClLPCGSQhXQSrQ= +github.com/maratori/testpackage v1.1.2 h1:ffDSh+AgqluCLMXhM19f/cpvQAKygKAJXFl9aUjmbqs= +github.com/maratori/testpackage v1.1.2/go.mod h1:8F24GdVDFW5Ew43Et02jamrVMNXLUNaOynhDssITGfc= +github.com/matoous/godox v1.1.0 h1:W5mqwbyWrwZv6OQ5Z1a/DHGMOvXYCBP3+Ht7KMoJhq4= +github.com/matoous/godox v1.1.0/go.mod h1:jgE/3fUXiTurkdHOLT5WEkThTSuE7yxHv5iWPa80afs= +github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= +github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= @@ -125,38 +541,206 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= +github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mgechev/revive v1.14.0 h1:CC2Ulb3kV7JFYt+izwORoS3VT/+Plb8BvslI/l1yZsc= +github.com/mgechev/revive v1.14.0/go.mod h1:MvnujelCZBZCaoDv5B3foPo6WWgULSSFxvfxp7GsPfo= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/moricho/tparallel v0.3.2 h1:odr8aZVFA3NZrNybggMkYO3rgPRcqjeQUlBBFVxKHTI= +github.com/moricho/tparallel v0.3.2/go.mod h1:OQ+K3b4Ln3l2TZveGCywybl68glfLEwFGqvnjok8b+U= +github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc= +github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nakabonne/nestif v0.3.1 h1:wm28nZjhQY5HyYPx+weN3Q65k6ilSBxDb8v5S81B81U= +github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= +github.com/nishanths/exhaustive v0.12.0 h1:vIY9sALmw6T/yxiASewa4TQcFsVYZQQRUQJhKRf3Swg= +github.com/nishanths/exhaustive v0.12.0/go.mod h1:mEZ95wPIZW+x8kC4TgC+9YCUgiST7ecevsVDTgc2obs= +github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= +github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= +github.com/nunnatsa/ginkgolinter v0.23.0 h1:x3o4DGYOWbBMP/VdNQKgSj+25aJKx2Pe6lHr8gBcgf8= +github.com/nunnatsa/ginkgolinter v0.23.0/go.mod h1:9qN1+0akwXEccwV1CAcCDfcoBlWXHB+ML9884pL4SZ4= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= +github.com/onsi/ginkgo/v2 v2.28.1 h1:S4hj+HbZp40fNKuLUQOYLDgZLwNUVn19N3Atb98NCyI= +github.com/onsi/ginkgo/v2 v2.28.1/go.mod h1:CLtbVInNckU3/+gC8LzkGUb9oF+e8W8TdUsxPwvdOgE= +github.com/onsi/gomega v1.39.1 h1:1IJLAad4zjPn2PsnhH70V4DKRFlrCzGBNrNaru+Vf28= +github.com/onsi/gomega v1.39.1/go.mod h1:hL6yVALoTOxeWudERyfppUcZXjMwIMLnuSfruD2lcfg= +github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= +github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= +github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= +github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= +github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= +github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= +github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= +github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/pjbgf/sha1cd v0.3.2 h1:a9wb0bp1oC2TGwStyn0Umc/IGKQnEgF0vVaZ8QF8eo4= github.com/pjbgf/sha1cd v0.3.2/go.mod h1:zQWigSxVmsHEZow5qaLtPYxpcKMMQpa09ixqBxuCS6A= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/quasilyte/go-ruleguard v0.4.5 h1:AGY0tiOT5hJX9BTdx/xBdoCubQUAE2grkqY2lSwvZcA= +github.com/quasilyte/go-ruleguard v0.4.5/go.mod h1:Vl05zJ538vcEEwu16V/Hdu7IYZWyKSwIy4c88Ro1kRE= +github.com/quasilyte/go-ruleguard/dsl v0.3.23 h1:lxjt5B6ZCiBeeNO8/oQsegE6fLeCzuMRoVWSkXC4uvY= +github.com/quasilyte/go-ruleguard/dsl v0.3.23/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= +github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= +github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= +github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= +github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= +github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= +github.com/raeperd/recvcheck v0.2.0 h1:GnU+NsbiCqdC2XX5+vMZzP+jAJC5fht7rcVTAhX74UI= +github.com/raeperd/recvcheck v0.2.0/go.mod h1:n04eYkwIR0JbgD73wT8wL4JjPC3wm0nFtzBnWNocnYU= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= +github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryancurrah/gomodguard v1.4.1 h1:eWC8eUMNZ/wM/PWuZBv7JxxqT5fiIKSIyTvjb7Elr+g= +github.com/ryancurrah/gomodguard v1.4.1/go.mod h1:qnMJwV1hX9m+YJseXEBhd2s90+1Xn6x9dLz11ualI1I= +github.com/ryanrolds/sqlclosecheck v0.5.1 h1:dibWW826u0P8jNLsLN+En7+RqWWTYrjCB9fJfSfdyCU= +github.com/ryanrolds/sqlclosecheck v0.5.1/go.mod h1:2g3dUjoS6AL4huFdv6wn55WpLIDjY7ZgUR4J8HOO/XQ= +github.com/sanposhiho/wastedassign/v2 v2.1.0 h1:crurBF7fJKIORrV85u9UUpePDYGWnwvv3+A96WvwXT0= +github.com/sanposhiho/wastedassign/v2 v2.1.0/go.mod h1:+oSmSC+9bQ+VUAxA66nBb0Z7N8CK7mscKTDYC6aIek4= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEVZGK7IN2kJkjTuQ= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.2/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU= +github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= +github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= +github.com/sashamelentyev/usestdlibvars v1.29.0 h1:8J0MoRrw4/NAXtjQqTHrbW9NN+3iMf7Knkq057v4XOQ= +github.com/sashamelentyev/usestdlibvars v1.29.0/go.mod h1:8PpnjHMk5VdeWlVb4wCdrB8PNbLqZ3wBZTZWkrpZZL8= +github.com/securego/gosec/v2 v2.23.0 h1:h4TtF64qFzvnkqvsHC/knT7YC5fqyOCItlVR8+ptEBo= +github.com/securego/gosec/v2 v2.23.0/go.mod h1:qRHEgXLFuYUDkI2T7W7NJAmOkxVhkR0x9xyHOIcMNZ0= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= +github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= +github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/githubv4 v0.0.0-20260209031235-2402fdf4a9ed h1:KT7hI8vYXgU0s2qaMkrfq9tCA1w/iEPgfredVP+4Tzw= github.com/shurcooL/githubv4 v0.0.0-20260209031235-2402fdf4a9ed/go.mod h1:zqMwyHmnN/eDOZOdiTohqIUKUrTFX62PNlu7IJdu0q8= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= github.com/shurcooL/graphql v0.0.0-20240915155400-7ee5256398cf h1:o1uxfymjZ7jZ4MsgCErcwWGtVKSiNAXtS59Lhs6uI/g= github.com/shurcooL/graphql v0.0.0-20240915155400-7ee5256398cf/go.mod h1:9dIRpgIY7hVhoqfe0/FcYp0bpInZaT7dc3BYOprrIUE= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w= +github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g= +github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+Wwfd0XE= +github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= github.com/skeema/knownhosts v1.3.1 h1:X2osQ+RAjK76shCbvhHHHVl3ZlgDm8apHEHFqRjnBY8= github.com/skeema/knownhosts v1.3.1/go.mod h1:r7KTdC8l4uxWRyK2TpQZ/1o5HaSzh06ePQNxPwTcfiY= +github.com/sonatard/noctx v0.4.0 h1:7MC/5Gg4SQ4lhLYR6mvOP6mQVSxCrdyiExo7atBs27o= +github.com/sonatard/noctx v0.4.0/go.mod h1:64XdbzFb18XL4LporKXp8poqZtPKbCrqQ402CV+kJas= +github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= +github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= +github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= +github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= +github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= +github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= +github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= +github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= +github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= +github.com/stbenjam/no-sprintf-host-port v0.3.1 h1:AyX7+dxI4IdLBPtDbsGAyqiTSLpCP9hWRrXQDU4Cm/g= +github.com/stbenjam/no-sprintf-host-port v0.3.1/go.mod h1:ODbZesTCHMVKthBHskvUUexdcNHAQRXk9NpSsL8p/HQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= +github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA= +github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= +github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= +github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= +github.com/tetafro/godot v1.5.4 h1:u1ww+gqpRLiIA16yF2PV1CV1n/X3zhyezbNXC3E14Sg= +github.com/tetafro/godot v1.5.4/go.mod h1:eOkMrVQurDui411nBY2FA05EYH01r14LuWY/NrVDVcU= +github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67 h1:9LPGD+jzxMlnk5r6+hJnar67cgpDIz/iyD+rfl5r2Vk= +github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67/go.mod h1:mkjARE7Yr8qU23YcGMSALbIxTQ9r9QBVahQOBRfU460= +github.com/timonwong/loggercheck v0.11.0 h1:jdaMpYBl+Uq9mWPXv1r8jc5fC3gyXx4/WGwTnnNKn4M= +github.com/timonwong/loggercheck v0.11.0/go.mod h1:HEAWU8djynujaAVX7QI65Myb8qgfcZ1uKbdpg3ZzKl8= +github.com/tomarrell/wrapcheck/v2 v2.12.0 h1:H/qQ1aNWz/eeIhxKAFvkfIA+N7YDvq6TWVFL27Of9is= +github.com/tomarrell/wrapcheck/v2 v2.12.0/go.mod h1:AQhQuZd0p7b6rfW+vUwHm5OMCGgp63moQ9Qr/0BpIWo= +github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= +github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= +github.com/ultraware/funlen v0.2.0 h1:gCHmCn+d2/1SemTdYMiKLAHFYxTYz7z9VIDRaTGyLkI= +github.com/ultraware/funlen v0.2.0/go.mod h1:ZE0q4TsJ8T1SQcjmkhN/w+MceuatI6pBFSxxyteHIJA= +github.com/ultraware/whitespace v0.2.0 h1:TYowo2m9Nfj1baEQBjuHzvMRbp19i+RCcRYrSWoFa+g= +github.com/ultraware/whitespace v0.2.0/go.mod h1:XcP1RLD81eV4BW8UhQlpaR+SDc2givTvyI8a586WjW8= +github.com/uudashr/gocognit v1.2.0 h1:3BU9aMr1xbhPlvJLSydKwdLN3tEUUrzPSSM8S4hDYRA= +github.com/uudashr/gocognit v1.2.0/go.mod h1:k/DdKPI6XBZO1q7HgoV2juESI2/Ofj9AcHPZhBBdrTU= +github.com/uudashr/iface v1.4.1 h1:J16Xl1wyNX9ofhpHmQ9h9gk5rnv2A6lX/2+APLTo0zU= +github.com/uudashr/iface v1.4.1/go.mod h1:pbeBPlbuU2qkNDn0mmfrxP2X+wjPMIQAy+r1MBXSXtg= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= @@ -166,11 +750,50 @@ github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAh github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= +github.com/xen0n/gosmopolitan v1.3.0 h1:zAZI1zefvo7gcpbCOrPSHJZJYA9ZgLfJqtKzZ5pHqQM= +github.com/xen0n/gosmopolitan v1.3.0/go.mod h1:rckfr5T6o4lBtM1ga7mLGKZmLxswUoH1zxHgNXOsEt4= +github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= +github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= +github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM= +github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= +github.com/yeya24/promlinter v0.3.0 h1:JVDbMp08lVCP7Y6NP3qHroGAO6z2yGKQtS5JsjqtoFs= +github.com/yeya24/promlinter v0.3.0/go.mod h1:cDfJQQYv9uYciW60QT0eeHlFodotkYZlL+YcPQN+mW4= +github.com/ykadowak/zerologlint v0.1.5 h1:Gy/fMz1dFQN9JZTPjv1hxEk+sRWm05row04Yoolgdiw= +github.com/ykadowak/zerologlint v0.1.5/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yuin/goldmark v1.7.7 h1:5m9rrB1sW3JUMToKFQfb+FGt1U7r57IHu5GrYrG2nqU= +github.com/yuin/goldmark v1.7.7/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= +github.com/yuin/goldmark-meta v1.1.0 h1:pWw+JLHGZe8Rk0EGsMVssiNb/AaPMHfSRszZeUeiOUc= +github.com/yuin/goldmark-meta v1.1.0/go.mod h1:U4spWENafuA7Zyg+Lj5RqK/MF+ovMYtBvXi1lBb2VP0= github.com/zclconf/go-cty v1.17.0 h1:seZvECve6XX4tmnvRzWtJNHdscMtYEx5R7bnnVyd/d0= github.com/zclconf/go-cty v1.17.0/go.mod h1:wqFzcImaLTI6A5HfsRwB0nj5n0MRZFwmey8YoFPPs3U= github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940 h1:4r45xpDWB6ZMSMNJFMOjqrGHynW3DIBuR2H9j0ug+Mo= github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940/go.mod h1:CmBdvvj3nqzfzJ6nTCIwDTPZ56aVGvDrmztiO5g3qrM= +gitlab.com/bosi/decorder v0.4.2 h1:qbQaV3zgwnBZ4zPMhGLW4KZe7A7NwxEhJx39R3shffo= +gitlab.com/bosi/decorder v0.4.2/go.mod h1:muuhHoaJkA9QLcYHq4Mj8FJUwDZ+EirSHRiaTcTf6T8= +go-simpler.org/assert v0.9.0 h1:PfpmcSvL7yAnWyChSjOz6Sp6m9j5lyK8Ok9pEL31YkQ= +go-simpler.org/assert v0.9.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28= +go-simpler.org/musttag v0.14.0 h1:XGySZATqQYSEV3/YTy+iX+aofbZZllJaqwFWs+RTtSo= +go-simpler.org/musttag v0.14.0/go.mod h1:uP8EymctQjJ4Z1kUnjX0u2l60WfUdQxCwSNKzE1JEOE= +go-simpler.org/sloglint v0.11.1 h1:xRbPepLT/MHPTCA6TS/wNfZrDzkGvCCqUv4Bdwc3H7s= +go-simpler.org/sloglint v0.11.1/go.mod h1:2PowwiCOK8mjiF+0KGifVOT8ZsCNiFzvfyJeJOIt8MQ= +go.abhg.dev/goldmark/frontmatter v0.2.0 h1:P8kPG0YkL12+aYk2yU3xHv4tcXzeVnN+gU0tJ5JnxRw= +go.abhg.dev/goldmark/frontmatter v0.2.0/go.mod h1:XqrEkZuM57djk7zrlRUB02x8I5J0px76YjkOzhB4YlU= +go.augendre.info/arangolint v0.4.0 h1:xSCZjRoS93nXazBSg5d0OGCi9APPLNMmmLrC995tR50= +go.augendre.info/arangolint v0.4.0/go.mod h1:l+f/b4plABuFISuKnTGD4RioXiCCgghv2xqst/xOvAA= +go.augendre.info/fatcontext v0.9.0 h1:Gt5jGD4Zcj8CDMVzjOJITlSb9cEch54hjRRlN3qDojE= +go.augendre.info/fatcontext v0.9.0/go.mod h1:L94brOAT1OOUNue6ph/2HnwxoNlds9aXDF2FcUntbNw= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= @@ -183,90 +806,403 @@ go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFh go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps= go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b h1:M2rDM6z3Fhozi9O7NWsxAkg/yqS/lQJ6PmkyIV3YP+o= +golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b/go.mod h1:3//PLf8L/X+8b4vuAfHzxeRUl04Adcb341+IGKfnqS8= +golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20260209203927-2842357ff358 h1:qWFG1Dj7TBjOjOvhEOkmyGPVoquqUKnIU0lEVLp8xyk= +golang.org/x/exp/typeparams v0.0.0-20260209203927-2842357ff358/go.mod h1:4Mzdyp/6jzw9auFDJ3OMF5qksa7UvPnzKqTVGcb04ms= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c= -golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= +golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= -golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.50.0 h1:ucWh9eiCGyDR3vtzso0WMQinm2Dnt8cFMuQa9K33J60= +golang.org/x/net v0.50.0/go.mod h1:UgoSli3F/pBgdJBHCTc+tp3gmrU4XswgGRgtnwWTfyM= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.35.0 h1:Mv2mzuHuZuY2+bkyWXIHMfhNdJAdwW3FuWeCPYN5GVQ= golang.org/x/oauth2 v0.35.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk= golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= +golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc= -golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= +golang.org/x/tools v0.42.0 h1:uNgphsn75Tdz5Ji2q36v/nsFSfR/9BRFvqhGBaJGd5k= +golang.org/x/tools v0.42.0/go.mod h1:Ma6lCIwGZvHK6XtgbswSoWroEkhugApmsXyrUmBhfr0= +golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM= +golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= +golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= +golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated/go.mod h1:RVAQXBGNv1ib0J382/DPCRS/BPnsGebyM1Gj5VSDpG8= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c h1:qXWI/sQtv5UKboZ/zUk7h+mrf/lXORyI+n9DKDAusdg= google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c/go.mod h1:gw1tLEfykwDz2ET4a12jcXt4couGAm7IwsVaTy0Sflo= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.75.1 h1:/ODCNEuf9VghjgO3rqLcfg8fiOP0nSluljWFlDxELLI= google.golang.org/grpc v1.75.1/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7Iw= google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.7.0 h1:w6WUp1VbkqPEgLz4rkBzH/CSU6HkoqNLp6GstyTx3lU= +honnef.co/go/tools v0.7.0/go.mod h1:pm29oPxeP3P82ISxZDgIYeOaf9ta6Pi0EWvCFoLG2vc= +mvdan.cc/gofumpt v0.9.2 h1:zsEMWL8SVKGHNztrx6uZrXdp7AX8r421Vvp23sz7ik4= +mvdan.cc/gofumpt v0.9.2/go.mod h1:iB7Hn+ai8lPvofHd9ZFGVg2GOr8sBUw1QUWjNbmIL/s= +mvdan.cc/unparam v0.0.0-20251027182757-5beb8c8f8f15 h1:ssMzja7PDPJV8FStj7hq9IKiuiKhgz9ErWw+m68e7DI= +mvdan.cc/unparam v0.0.0-20251027182757-5beb8c8f8f15/go.mod h1:4M5MMXl2kW6fivUT6yRGpLLPNfuGtU2Z0cPvFquGDYU= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/templates/data-sources/actions_environment_public_key.md.tmpl b/templates/data-sources/actions_environment_public_key.md.tmpl new file mode 100644 index 0000000000..896a057efc --- /dev/null +++ b/templates/data-sources/actions_environment_public_key.md.tmpl @@ -0,0 +1,27 @@ +--- +page_title: "GitHub: github_actions_environment_public_key" +description: |- + Get information on a GitHub Actions Environment Public Key. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_environment_public_key + +Use this data source to retrieve information about a GitHub Actions public key of a specific environment. This data source is required to be used with other GitHub secrets interactions. Note that the provider `token` must have admin rights to a repository to retrieve the action public keys of it's environments. + +## Example Usage + +{{tffile "examples/data-sources/actions_environment_public_key/example_1.tf"}} + +## Argument Reference + +* `repository` - (Required) Name of the repository to get public key from. +* `environment` - (Required) Name of the environment to get public key from. + +## Attributes Reference + +* `key_id` - ID of the key that has been retrieved. +* `key` - Actual key retrieved. diff --git a/templates/data-sources/actions_environment_secrets.md.tmpl b/templates/data-sources/actions_environment_secrets.md.tmpl new file mode 100644 index 0000000000..057d9ac1dd --- /dev/null +++ b/templates/data-sources/actions_environment_secrets.md.tmpl @@ -0,0 +1,26 @@ +--- +page_title: "GitHub: github_actions_environment_secrets" +description: |- + Get Actions secrets of the repository environment +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_actions\_environment\_secrets + +Use this data source to retrieve the list of secrets of the repository environment. + +## Example Usage + +{{tffile "examples/data-sources/actions_environment_secrets/example_1.tf"}} + +## Argument Reference + +## Attributes Reference + +* `secrets` - list of secrets for the environment + * `name` - Name of the secret + * `created_at` - Timestamp of the secret creation + * `updated_at` - Timestamp of the secret last update diff --git a/templates/data-sources/actions_environment_variables.md.tmpl b/templates/data-sources/actions_environment_variables.md.tmpl new file mode 100644 index 0000000000..de598cb0f5 --- /dev/null +++ b/templates/data-sources/actions_environment_variables.md.tmpl @@ -0,0 +1,27 @@ +--- +page_title: "GitHub: github_actions_environment_variables" +description: |- + Get Actions variables of the repository environment +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_actions\_environment\_variables + +Use this data source to retrieve the list of variables of the repository environment. + +## Example Usage + +{{tffile "examples/data-sources/actions_environment_variables/example_1.tf"}} + +## Argument Reference + +## Attributes Reference + +* `variables` - list of variables for the environment + * `name` - Name of the variable + * `value` - Value of the variable + * `created_at` - Timestamp of the variable creation + * `updated_at` - Timestamp of the variable last update diff --git a/templates/data-sources/actions_organization_oidc_subject_claim_customization_template.md.tmpl b/templates/data-sources/actions_organization_oidc_subject_claim_customization_template.md.tmpl new file mode 100644 index 0000000000..33f585fbe4 --- /dev/null +++ b/templates/data-sources/actions_organization_oidc_subject_claim_customization_template.md.tmpl @@ -0,0 +1,23 @@ +--- +page_title: "GitHub: github_actions_organization_oidc_subject_claim_customization_template" +description: |- + Get a GitHub Actions organization OpenID Connect customization template +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_organization_oidc_subject_claim_customization_template + +Use this data source to retrieve the OpenID Connect subject claim customization template for an organization + +## Example Usage + +{{tffile "examples/data-sources/actions_organization_oidc_subject_claim_customization_template/example_1.tf"}} + +## Argument Reference + +## Attributes Reference + +* `include_claim_keys` - The list of OpenID Connect claim keys. diff --git a/templates/data-sources/actions_organization_public_key.md.tmpl b/templates/data-sources/actions_organization_public_key.md.tmpl new file mode 100644 index 0000000000..6c5f223966 --- /dev/null +++ b/templates/data-sources/actions_organization_public_key.md.tmpl @@ -0,0 +1,22 @@ +--- +page_title: "GitHub: github_actions_organization_public_key" +description: |- + Get information on a GitHub Actions Organization Public Key. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_organization_public_key + +Use this data source to retrieve information about a GitHub Actions Organization public key. This data source is required to be used with other GitHub secrets interactions. Note that the provider `token` must have admin rights to an organization to retrieve it's action public key. + +## Example Usage + +{{tffile "examples/data-sources/actions_organization_public_key/example_1.tf"}} + +## Attributes Reference + +* `key_id` - ID of the key that has been retrieved. +* `key` - Actual key retrieved. diff --git a/templates/data-sources/actions_organization_registration_token.md.tmpl b/templates/data-sources/actions_organization_registration_token.md.tmpl new file mode 100644 index 0000000000..0dc32103d8 --- /dev/null +++ b/templates/data-sources/actions_organization_registration_token.md.tmpl @@ -0,0 +1,24 @@ +--- +page_title: "GitHub: github_actions_organization_registration_token" +description: |- + Get a GitHub Actions organization registration token. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_organization_registration_token + +Use this data source to retrieve a GitHub Actions organization registration token. This token can then be used to register a self-hosted runner. + +## Example Usage + +{{tffile "examples/data-sources/actions_organization_registration_token/example_1.tf"}} + +## Argument Reference + +## Attributes Reference + +* `token` - The token that has been retrieved. +* `expires_at` - The token expiration date. diff --git a/templates/data-sources/actions_organization_secrets.md.tmpl b/templates/data-sources/actions_organization_secrets.md.tmpl new file mode 100644 index 0000000000..65da66ff6e --- /dev/null +++ b/templates/data-sources/actions_organization_secrets.md.tmpl @@ -0,0 +1,27 @@ +--- +page_title: "GitHub: github_actions_organization_secrets" +description: |- + Get actions secrets of the organization +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_actions\_organization\_secrets + +Use this data source to retrieve the list of secrets of the organization. + +## Example Usage + +{{tffile "examples/data-sources/actions_organization_secrets/example_1.tf"}} + +## Argument Reference + +## Attributes Reference + +* `secrets` - list of secrets for the repository + * `name` - Secret name + * `visibility` - Secret visibility + * `created_at` - Timestamp of the secret creation + * `updated_at` - Timestamp of the secret last update diff --git a/templates/data-sources/actions_organization_variables.md.tmpl b/templates/data-sources/actions_organization_variables.md.tmpl new file mode 100644 index 0000000000..9830849f1e --- /dev/null +++ b/templates/data-sources/actions_organization_variables.md.tmpl @@ -0,0 +1,28 @@ +--- +page_title: "GitHub: github_actions_organization_variables" +description: |- + Get Actions variables of the organization +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_actions\_organization\_variables + +Use this data source to retrieve the list of variables of the organization. + +## Example Usage + +{{tffile "examples/data-sources/actions_organization_variables/example_1.tf"}} + +## Argument Reference + +## Attributes Reference + +* `variables` - list of variables for the repository + * `name` - Name of the variable + * `value` - Value of the variable + * `visibility` - Visibility of the variable + * `created_at` - Timestamp of the variable creation + * `updated_at` - Timestamp of the variable last update diff --git a/templates/data-sources/actions_public_key.md.tmpl b/templates/data-sources/actions_public_key.md.tmpl new file mode 100644 index 0000000000..5e2e4320c3 --- /dev/null +++ b/templates/data-sources/actions_public_key.md.tmpl @@ -0,0 +1,26 @@ +--- +page_title: "GitHub: github_actions_public_key" +description: |- + Get information on a GitHub Actions Public Key. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_public_key + +Use this data source to retrieve information about a GitHub Actions public key. This data source is required to be used with other GitHub secrets interactions. Note that the provider `token` must have admin rights to a repository to retrieve it's action public key. + +## Example Usage + +{{tffile "examples/data-sources/actions_public_key/example_1.tf"}} + +## Argument Reference + +* `repository` - (Required) Name of the repository to get public key from. + +## Attributes Reference + +* `key_id` - ID of the key that has been retrieved. +* `key` - Actual key retrieved. diff --git a/templates/data-sources/actions_registration_token.md.tmpl b/templates/data-sources/actions_registration_token.md.tmpl new file mode 100644 index 0000000000..e56fef0e72 --- /dev/null +++ b/templates/data-sources/actions_registration_token.md.tmpl @@ -0,0 +1,26 @@ +--- +page_title: "GitHub: github_actions_registration_token" +description: |- + Get a GitHub Actions repository registration token. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_registration_token + +Use this data source to retrieve a GitHub Actions repository registration token. This token can then be used to register a self-hosted runner. + +## Example Usage + +{{tffile "examples/data-sources/actions_registration_token/example_1.tf"}} + +## Argument Reference + +* `repository` - (Required) Name of the repository to get a GitHub Actions registration token for. + +## Attributes Reference + +* `token` - The token that has been retrieved. +* `expires_at` - The token expiration date. diff --git a/templates/data-sources/actions_repository_oidc_subject_claim_customization_template.md.tmpl b/templates/data-sources/actions_repository_oidc_subject_claim_customization_template.md.tmpl new file mode 100644 index 0000000000..4c2d375090 --- /dev/null +++ b/templates/data-sources/actions_repository_oidc_subject_claim_customization_template.md.tmpl @@ -0,0 +1,26 @@ +--- +page_title: "GitHub: github_actions_repository_oidc_subject_claim_customization_template" +description: |- + Get a GitHub Actions repository's OpenID Connect customization template +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_repository_oidc_subject_claim_customization_template + +Use this data source to retrieve the OpenID Connect subject claim customization template for a repository + +## Example Usage + +{{tffile "examples/data-sources/actions_repository_oidc_subject_claim_customization_template/example_1.tf"}} + +## Argument Reference + +* `name` - (Required) Name of the repository to get the OpenID Connect subject claim customization template for. + +## Attributes Reference + +* `use_default` - Whether the repository uses the default template. +* `include_claim_keys` - The list of OpenID Connect claim keys. diff --git a/templates/data-sources/actions_secrets.md.tmpl b/templates/data-sources/actions_secrets.md.tmpl new file mode 100644 index 0000000000..5d23d0ece8 --- /dev/null +++ b/templates/data-sources/actions_secrets.md.tmpl @@ -0,0 +1,29 @@ +--- +page_title: "GitHub: github_actions_secrets" +description: |- + Get actions secrets for a repository +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_actions\_secrets + +Use this data source to retrieve the list of secrets for a GitHub repository. + +## Example Usage + +{{tffile "examples/data-sources/actions_secrets/example_1.tf"}} + +## Argument Reference + +* `name` - (Optional) The name of the repository. +* `full_name` - (Optional) Full name of the repository (in `org/name` format). + +## Attributes Reference + +* `secrets` - list of secrets for the repository + * `name` - Secret name + * `created_at` - Timestamp of the secret creation + * `updated_at` - Timestamp of the secret last update diff --git a/templates/data-sources/actions_variables.md.tmpl b/templates/data-sources/actions_variables.md.tmpl new file mode 100644 index 0000000000..316df12a2a --- /dev/null +++ b/templates/data-sources/actions_variables.md.tmpl @@ -0,0 +1,30 @@ +--- +page_title: "GitHub: github_actions_variables" +description: |- + Get Actions variables for a repository +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_actions\_variables + +Use this data source to retrieve the list of variables for a GitHub repository. + +## Example Usage + +{{tffile "examples/data-sources/actions_variables/example_1.tf"}} + +## Argument Reference + +* `name` - (Optional) The name of the repository. +* `full_name` - (Optional) Full name of the repository (in `org/name` format). + +## Attributes Reference + +* `variables` - list of variables for the repository + * `name` - Name of the variable + * `value` - Value of the variable + * `created_at` - Timestamp of the variable creation + * `updated_at` - Timestamp of the variable last update diff --git a/templates/data-sources/app.md.tmpl b/templates/data-sources/app.md.tmpl new file mode 100644 index 0000000000..2b25ad457b --- /dev/null +++ b/templates/data-sources/app.md.tmpl @@ -0,0 +1,33 @@ +--- +page_title: "GitHub: github_app" +description: |- + Get information about an app. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_app + +Use this data source to retrieve information about an app. + +## Example Usage + +{{tffile "examples/data-sources/app/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `slug` - (Required) The URL-friendly name of your GitHub App. + +## Attribute Reference + +The following additional attributes are exported: + +* `description` - The app's description. + +* `name` - The app's full name. + +* `node_id` - The Node ID of the app. diff --git a/templates/data-sources/app_token.md.tmpl b/templates/data-sources/app_token.md.tmpl new file mode 100644 index 0000000000..7e03ebe506 --- /dev/null +++ b/templates/data-sources/app_token.md.tmpl @@ -0,0 +1,33 @@ +--- +page_title: "GitHub: github_app_token" +description: |- + Generate a GitHub APP JWT. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_app\_token + +Use this data source to generate a [GitHub App JWT](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app). + +## Example Usage + +{{tffile "examples/data-sources/app_token/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `app_id` - (Required) This is the ID of the GitHub App. + +* `installation_id` - (Required) This is the ID of the GitHub App installation. + +* `pem_file` - (Required) This is the contents of the GitHub App private key PEM file. + +## Attribute Reference + +The following additional attributes are exported: + +* `token` - The generated GitHub APP JWT. diff --git a/templates/data-sources/branch.md.tmpl b/templates/data-sources/branch.md.tmpl new file mode 100644 index 0000000000..7771187753 --- /dev/null +++ b/templates/data-sources/branch.md.tmpl @@ -0,0 +1,35 @@ +--- +page_title: "GitHub: github_branch" +description: |- + Get information about a repository branch. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_branch + +Use this data source to retrieve information about a repository branch. + +## Example Usage + +{{tffile "examples/data-sources/branch/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `repository` - (Required) The GitHub repository name. + +* `branch` - (Required) The repository branch to retrieve. + +## Attribute Reference + +The following additional attributes are exported: + +* `etag` - An etag representing the Branch object. + +* `ref` - A string representing a branch reference, in the form of `refs/heads/`. + +* `sha` - A string storing the reference's `HEAD` commit's SHA1. diff --git a/templates/data-sources/branch_protection_rules.md.tmpl b/templates/data-sources/branch_protection_rules.md.tmpl new file mode 100644 index 0000000000..71fbaba079 --- /dev/null +++ b/templates/data-sources/branch_protection_rules.md.tmpl @@ -0,0 +1,29 @@ +--- +page_title: "GitHub: github_branch_protection_rules" +description: |- + Get information about a repository branch protection rules. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_branch\_protection\_rules + +Use this data source to retrieve a list of repository branch protection rules. + +## Example Usage + +{{tffile "examples/data-sources/branch_protection_rules/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `repository` - (Required) The GitHub repository name. + +## Attribute Reference + +* `rules` - Collection of Branch Protection Rules. Each of the results conforms to the following scheme: + + * `pattern` - Identifies the protection rule pattern. diff --git a/templates/data-sources/codespaces_organization_public_key.md.tmpl b/templates/data-sources/codespaces_organization_public_key.md.tmpl new file mode 100644 index 0000000000..1fcde64801 --- /dev/null +++ b/templates/data-sources/codespaces_organization_public_key.md.tmpl @@ -0,0 +1,22 @@ +--- +page_title: "GitHub: github_codespaces_organization_public_key" +description: |- + Get information on a GitHub Codespaces Organization Public Key. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_codespaces_organization_public_key + +Use this data source to retrieve information about a GitHub Codespaces Organization public key. This data source is required to be used with other GitHub secrets interactions. Note that the provider `token` must have admin rights to an organization to retrieve it's Codespaces public key. + +## Example Usage + +{{tffile "examples/data-sources/codespaces_organization_public_key/example_1.tf"}} + +## Attributes Reference + +* `key_id` - ID of the key that has been retrieved. +* `key` - Actual key retrieved. diff --git a/templates/data-sources/codespaces_organization_secrets.md.tmpl b/templates/data-sources/codespaces_organization_secrets.md.tmpl new file mode 100644 index 0000000000..2cc4caaf76 --- /dev/null +++ b/templates/data-sources/codespaces_organization_secrets.md.tmpl @@ -0,0 +1,27 @@ +--- +page_title: "GitHub: github_codespaces_organization_secrets" +description: |- + Get codespaces secrets of the organization +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_codespaces\_organization\_secrets + +Use this data source to retrieve the list of codespaces secrets of the organization. + +## Example Usage + +{{tffile "examples/data-sources/codespaces_organization_secrets/example_1.tf"}} + +## Argument Reference + +## Attributes Reference + +* `secrets` - list of secrets for the repository + * `name` - Secret name + * `visibility` - Secret visibility + * `created_at` - Timestamp of the secret creation + * `updated_at` - Timestamp of the secret last update diff --git a/templates/data-sources/codespaces_public_key.md.tmpl b/templates/data-sources/codespaces_public_key.md.tmpl new file mode 100644 index 0000000000..98cfc184d4 --- /dev/null +++ b/templates/data-sources/codespaces_public_key.md.tmpl @@ -0,0 +1,26 @@ +--- +page_title: "GitHub: github_codespaces_public_key" +description: |- + Get information on a GitHub Codespaces Public Key. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_codespaces_public_key + +Use this data source to retrieve information about a GitHub Codespaces public key. This data source is required to be used with other GitHub secrets interactions. Note that the provider `token` must have admin rights to a repository to retrieve it's Codespaces public key. + +## Example Usage + +{{tffile "examples/data-sources/codespaces_public_key/example_1.tf"}} + +## Argument Reference + +* `repository` - (Required) Name of the repository to get public key from. + +## Attributes Reference + +* `key_id` - ID of the key that has been retrieved. +* `key` - Actual key retrieved. diff --git a/templates/data-sources/codespaces_secrets.md.tmpl b/templates/data-sources/codespaces_secrets.md.tmpl new file mode 100644 index 0000000000..36b7d2af9c --- /dev/null +++ b/templates/data-sources/codespaces_secrets.md.tmpl @@ -0,0 +1,29 @@ +--- +page_title: "GitHub: github_codespaces_secrets" +description: |- + Get codespaces secrets for a repository +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_codespaces\_secrets + +Use this data source to retrieve the list of codespaces secrets for a GitHub repository. + +## Example Usage + +{{tffile "examples/data-sources/codespaces_secrets/example_1.tf"}} + +## Argument Reference + +* `name` - (Optional) The name of the repository. +* `full_name` - (Optional) Full name of the repository (in `org/name` format). + +## Attributes Reference + +* `secrets` - list of codespaces secrets for the repository + * `name` - Secret name + * `created_at` - Timestamp of the secret creation + * `updated_at` - Timestamp of the secret last update diff --git a/templates/data-sources/codespaces_user_public_key.md.tmpl b/templates/data-sources/codespaces_user_public_key.md.tmpl new file mode 100644 index 0000000000..b8a874c507 --- /dev/null +++ b/templates/data-sources/codespaces_user_public_key.md.tmpl @@ -0,0 +1,22 @@ +--- +page_title: "GitHub: github_codespaces_user_public_key" +description: |- + Get information on a GitHub Codespaces User Public Key. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_codespaces_user_public_key + +Use this data source to retrieve information about a GitHub Codespaces User public key. This data source is required to be used with other GitHub secrets interactions. Note that the provider `token` must have admin rights to an user to retrieve it's Codespaces public key. + +## Example Usage + +{{tffile "examples/data-sources/codespaces_user_public_key/example_1.tf"}} + +## Attributes Reference + +* `key_id` - ID of the key that has been retrieved. +* `key` - Actual key retrieved. diff --git a/templates/data-sources/codespaces_user_secrets.md.tmpl b/templates/data-sources/codespaces_user_secrets.md.tmpl new file mode 100644 index 0000000000..77011f848a --- /dev/null +++ b/templates/data-sources/codespaces_user_secrets.md.tmpl @@ -0,0 +1,27 @@ +--- +page_title: "GitHub: github_codespaces_user_secrets" +description: |- + Get codespaces secrets of the user +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_codespaces\_user\_secrets + +Use this data source to retrieve the list of codespaces secrets of the user. + +## Example Usage + +{{tffile "examples/data-sources/codespaces_user_secrets/example_1.tf"}} + +## Argument Reference + +## Attributes Reference + +* `secrets` - list of secrets for the repository + * `name` - Secret name + * `visibility` - Secret visibility + * `created_at` - Timestamp of the secret creation + * `updated_at` - Timestamp of the secret last update diff --git a/templates/data-sources/collaborators.md.tmpl b/templates/data-sources/collaborators.md.tmpl new file mode 100644 index 0000000000..dd499f6772 --- /dev/null +++ b/templates/data-sources/collaborators.md.tmpl @@ -0,0 +1,67 @@ +--- +page_title: "GitHub: github_collaborators" +description: |- + Get the collaborators for a given repository. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_collaborators + +Use this data source to retrieve the collaborators for a given repository. + +## Example Usage + +{{tffile "examples/data-sources/collaborators/example_1.tf"}} + +## Arguments Reference + +* `owner` - (Required) The organization that owns the repository. + +* `repository` - (Required) The name of the repository. + +* `affiliation` - (Optional) Filter collaborators returned by their affiliation. Can be one of: `outside`, `direct`, `all`. Defaults to `all`. + +* `permission` - (Optional) Filter collaborators returned by their permission. Can be one of: `pull`, `triage`, `push`, `maintain`, `admin`. Defaults to not doing any filtering on permission. + +## Attributes Reference + +* `collaborator` - An Array of GitHub collaborators. Each `collaborator` block consists of the fields documented below. + +--- + +The `collaborator` block consists of: + +* `login` - The collaborator's login. + +* `id` - The ID of the collaborator. + +* `url` - The GitHub API URL for the collaborator. + +* `html_url` - The GitHub HTML URL for the collaborator. + +* `followers_url` - The GitHub API URL for the collaborator's followers. + +* `following_url` - The GitHub API URL for those following the collaborator. + +* `gists_url` - The GitHub API URL for the collaborator's gists. + +* `starred_url` - The GitHub API URL for the collaborator's starred repositories. + +* `subscriptions_url` - The GitHub API URL for the collaborator's subscribed repositories. + +* `organizations_url` - The GitHub API URL for the collaborator's organizations. + +* `repos_url` - The GitHub API URL for the collaborator's repositories. + +* `events_url` - The GitHub API URL for the collaborator's events. + +* `received_events_url` - The GitHub API URL for the collaborator's received events. + +* `type` - The type of the collaborator (ex. `user`). + +* `site_admin` - Whether the user is a GitHub admin. + +* `permission` - The permission of the collaborator. diff --git a/templates/data-sources/dependabot_organization_public_key.md.tmpl b/templates/data-sources/dependabot_organization_public_key.md.tmpl new file mode 100644 index 0000000000..3d1e97a003 --- /dev/null +++ b/templates/data-sources/dependabot_organization_public_key.md.tmpl @@ -0,0 +1,22 @@ +--- +page_title: "GitHub: github_dependabot_organization_public_key" +description: |- + Get information on a GitHub Dependabot Organization Public Key. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_dependabot_organization_public_key + +Use this data source to retrieve information about a GitHub Dependabot Organization public key. This data source is required to be used with other GitHub secrets interactions. Note that the provider `token` must have admin rights to an organization to retrieve it's Dependabot public key. + +## Example Usage + +{{tffile "examples/data-sources/dependabot_organization_public_key/example_1.tf"}} + +## Attributes Reference + +* `key_id` - ID of the key that has been retrieved. +* `key` - Actual key retrieved. diff --git a/templates/data-sources/dependabot_organization_secrets.md.tmpl b/templates/data-sources/dependabot_organization_secrets.md.tmpl new file mode 100644 index 0000000000..e6791c4ade --- /dev/null +++ b/templates/data-sources/dependabot_organization_secrets.md.tmpl @@ -0,0 +1,27 @@ +--- +page_title: "GitHub: github_dependabot_organization_secrets" +description: |- + Get dependabot secrets of the organization +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_dependabot\_organization\_secrets + +Use this data source to retrieve the list of dependabot secrets of the organization. + +## Example Usage + +{{tffile "examples/data-sources/dependabot_organization_secrets/example_1.tf"}} + +## Argument Reference + +## Attributes Reference + +* `secrets` - list of secrets for the repository + * `name` - Secret name + * `visibility` - Secret visibility + * `created_at` - Timestamp of the secret creation + * `updated_at` - Timestamp of the secret last update diff --git a/templates/data-sources/dependabot_public_key.md.tmpl b/templates/data-sources/dependabot_public_key.md.tmpl new file mode 100644 index 0000000000..a01909cf4c --- /dev/null +++ b/templates/data-sources/dependabot_public_key.md.tmpl @@ -0,0 +1,26 @@ +--- +page_title: "GitHub: github_dependabot_public_key" +description: |- + Get information on a GitHub Dependabot Public Key. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_dependabot_public_key + +Use this data source to retrieve information about a GitHub Dependabot public key. This data source is required to be used with other GitHub secrets interactions. Note that the provider `token` must have admin rights to a repository to retrieve it's Dependabot public key. + +## Example Usage + +{{tffile "examples/data-sources/dependabot_public_key/example_1.tf"}} + +## Argument Reference + +* `repository` - (Required) Name of the repository to get public key from. + +## Attributes Reference + +* `key_id` - ID of the key that has been retrieved. +* `key` - Actual key retrieved. diff --git a/templates/data-sources/dependabot_secrets.md.tmpl b/templates/data-sources/dependabot_secrets.md.tmpl new file mode 100644 index 0000000000..1441040d59 --- /dev/null +++ b/templates/data-sources/dependabot_secrets.md.tmpl @@ -0,0 +1,29 @@ +--- +page_title: "GitHub: github_dependabot_secrets" +description: |- + Get dependabot secrets for a repository +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_dependabot\_secrets + +Use this data source to retrieve the list of dependabot secrets for a GitHub repository. + +## Example Usage + +{{tffile "examples/data-sources/dependabot_secrets/example_1.tf"}} + +## Argument Reference + +* `name` - (Optional) The name of the repository. +* `full_name` - (Optional) Full name of the repository (in `org/name` format). + +## Attributes Reference + +* `secrets` - list of dependabot secrets for the repository + * `name` - Secret name + * `created_at` - Timestamp of the secret creation + * `updated_at` - Timestamp of the secret last update diff --git a/templates/data-sources/enterprise.md.tmpl b/templates/data-sources/enterprise.md.tmpl new file mode 100644 index 0000000000..706c25ec55 --- /dev/null +++ b/templates/data-sources/enterprise.md.tmpl @@ -0,0 +1,31 @@ +--- +page_title: "Github: github_enterprise" +description: |- + Get an enterprise. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_enterprise + +Use this data source to retrieve basic information about a GitHub enterprise. + +## Example Usage + +``` +data "github_enterprise" "example" { + slug = "example-co" +} +``` + +## Attributes Reference + +* `id` - The ID of the enterprise. +* `database_id` - The database ID of the enterprise. +* `slug` - The URL slug identifying the enterprise. +* `name` - The name of the enterprise. +* `description` - The description of the enterprise. +* `created_at` - The time the enterprise was created. +* `url` - The url for the enterprise. diff --git a/templates/data-sources/external_groups.md.tmpl b/templates/data-sources/external_groups.md.tmpl new file mode 100644 index 0000000000..09d1e9a5d6 --- /dev/null +++ b/templates/data-sources/external_groups.md.tmpl @@ -0,0 +1,31 @@ +--- +page_title: "GitHub: github_external_groups" +description: |- + Retrieve external groups belonging to an organization. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_external\_groups + +Use this data source to retrieve external groups belonging to an organization. + +## Example Usage + +{{tffile "examples/data-sources/external_groups/example_1.tf"}} + +## Argument Reference + +N/A. This resource will retrieve all the external groups belonging to an organization. + +## Attributes Reference + +* `external_groups` - an array of external groups belonging to the organization. Each group consists of the fields documented below. + +--- + +* `group_id` - the ID of the group. +* `group_name` - the name of the group. +* `updated_at` - the date the group was last updated. diff --git a/templates/data-sources/ip_ranges.md.tmpl b/templates/data-sources/ip_ranges.md.tmpl new file mode 100644 index 0000000000..cc2c2e63da --- /dev/null +++ b/templates/data-sources/ip_ranges.md.tmpl @@ -0,0 +1,53 @@ +--- +page_title: "GitHub: github_ip_ranges" +description: |- + Get information on GitHub's IP addresses. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_ip_ranges + +Use this data source to retrieve information about GitHub's IP addresses. + +## Example Usage + +{{tffile "examples/data-sources/ip_ranges/example_1.tf"}} + +## Attributes Reference + +- `actions` - An array of IP addresses in CIDR format specifying the addresses that incoming requests from GitHub Actions will originate from. +- `actions_ipv4` - A subset of the `actions` array that contains IP addresses in IPv4 CIDR format. +- `actions_ipv6` - A subset of the `actions` array that contains IP addresses in IPv6 CIDR format. +- `actions_macos` - An array of IP addresses in CIDR format specifying the addresses that GitHub Actions macOS runners will originate from. +- `actions_macos_ipv4` - A subset of the `actions_macos` array that contains IP addresses in IPv4 CIDR format. +- `actions_macos_ipv6` - A subset of the `actions_macos` array that contains IP addresses in IPv6 CIDR format. +- `dependabot` - **Deprecated.** Dependabot now uses GitHub Actions IP addresses. An array of IP addresses in CIDR format specifying the A records for Dependabot. +- `dependabot_ipv4` - **Deprecated.** A subset of the `dependabot` array that contains IP addresses in IPv4 CIDR format. +- `dependabot_ipv6` - **Deprecated.** A subset of the `dependabot` array that contains IP addresses in IPv6 CIDR format. +- `github_enterprise_importer` - An array of IP addresses in CIDR format specifying the addresses that GitHub Enterprise Importer will originate from. +- `github_enterprise_importer_ipv4` - A subset of the `github_enterprise_importer` array that contains IP addresses in IPv4 CIDR format. +- `github_enterprise_importer_ipv6` - A subset of the `github_enterprise_importer` array that contains IP addresses in IPv6 CIDR format. +- `hooks` - An Array of IP addresses in CIDR format specifying the addresses that incoming service hooks will originate from. +- `hooks_ipv4` - A subset of the `hooks` array that contains IP addresses in IPv4 CIDR format. +- `hooks_ipv6` - A subset of the `hooks` array that contains IP addresses in IPv6 CIDR format. +- `git` - An Array of IP addresses in CIDR format specifying the Git servers. +- `git_ipv4` - A subset of the `git` array that contains IP addresses in IPv4 CIDR format. +- `git_ipv6` - A subset of the `git` array that contains IP addresses in IPv6 CIDR format. +- `web` - An Array of IP addresses in CIDR format for GitHub Web. +- `web_ipv4` - A subset of the `web` array that contains IP addresses in IPv4 CIDR format. +- `web_ipv6` - A subset of the `web` array that contains IP addresses in IPv6 CIDR format. +- `api` - An Array of IP addresses in CIDR format for the GitHub API. +- `api_ipv4` - A subset of the `api` array that contains IP addresses in IPv4 CIDR format. +- `api_ipv6` - A subset of the `api` array that contains IP addresses in IPv6 CIDR format. +- `packages` - An Array of IP addresses in CIDR format specifying the A records for GitHub Packages. +- `packages_ipv4` - A subset of the `packages` array that contains IP addresses in IPv4 CIDR format. +- `packages_ipv6` - A subset of the `packages` array that contains IP addresses in IPv6 CIDR format. +- `pages` - An Array of IP addresses in CIDR format specifying the A records for GitHub Pages. +- `pages_ipv4` - A subset of the `pages` array that contains IP addresses in IPv4 CIDR format. +- `pages_ipv6` - A subset of the `pages` array that contains IP addresses in IPv6 CIDR format. +- `importer` - An Array of IP addresses in CIDR format specifying the A records for GitHub Importer. +- `importer_ipv4` - A subset of the `importer` array that contains IP addresses in IPv4 CIDR format. +- `importer_ipv6` - A subset of the `importer` array that contains IP addresses in IPv6 CIDR format. diff --git a/templates/data-sources/issue_labels.md.tmpl b/templates/data-sources/issue_labels.md.tmpl new file mode 100644 index 0000000000..849e32f030 --- /dev/null +++ b/templates/data-sources/issue_labels.md.tmpl @@ -0,0 +1,29 @@ +--- +page_title: "GitHub: github_issue_labels" +description: |- + Get the labels for a given repository. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_issue_labels + +Use this data source to retrieve the labels for a given repository. + +## Example Usage + +{{tffile "examples/data-sources/issue_labels/example_1.tf"}} + +## Arguments Reference + +* `repository` - (Required) The name of the repository. + +## Attributes Reference + +* `labels` - The list of this repository's labels. Each element of `labels` has the following attributes: + * `name` - The name of the label. + * `color` - The hexadecimal color code for the label, without the leading #. + * `description` - A short description of the label. + * `url` - The URL of the label. diff --git a/templates/data-sources/membership.md.tmpl b/templates/data-sources/membership.md.tmpl new file mode 100644 index 0000000000..fa1e34eb07 --- /dev/null +++ b/templates/data-sources/membership.md.tmpl @@ -0,0 +1,30 @@ +--- +page_title: "GitHub: github_membership" +description: |- + Get information on user membership in an organization. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_membership + +Use this data source to find out if a user is a member of your organization, as well as what role they have within it. If the user's membership in the organization is pending their acceptance of an invite, the role they would have once they accept will be returned. + +## Example Usage + +{{tffile "examples/data-sources/membership/example_1.tf"}} + +## Argument Reference + +* `username` - (Required) The username to lookup in the organization. + +* `organization` - (Optional) The organization to check for the above username. + +## Attributes Reference + +* `username` - The username. +* `role` - `admin` or `member` -- the role the user has within the organization. +* `etag` - An etag representing the membership object. +* `state` - `active` or `pending` -- the state of membership within the organization. `active` if the member has accepted the invite, or `pending` if the invite is still pending. diff --git a/templates/data-sources/organization.md.tmpl b/templates/data-sources/organization.md.tmpl new file mode 100644 index 0000000000..e0a0ec2f36 --- /dev/null +++ b/templates/data-sources/organization.md.tmpl @@ -0,0 +1,58 @@ +--- +page_title: "GitHub: github_organization" +description: |- + Get an organization. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization + +Use this data source to retrieve basic information about a GitHub Organization. + +## Example Usage + +{{tffile "examples/data-sources/organization/example_1.tf"}} + +## Argument Reference + +* `name` - (Required) The name of the organization. +* `ignore_archived_repos` - (Optional) Whether or not to include archived repos in the `repositories` list. Defaults to `false`. +* `summary_only` - (Optional) Exclude the repos, members and other attributes from the returned result. Defaults to `false`. + +## Attributes Reference + +* `id` - The ID of the organization +* `node_id` - GraphQL global node ID for use with the v4 API +* `name` - The organization's public profile name +* `orgname` - The organization's name as used in URLs and the API +* `login` - The organization account login +* `description` - The organization account description +* `plan` - The organization account plan name +* `repositories` - (`list`) A list of the full names of the repositories in the organization formatted as `owner/name` strings +* `members` - **Deprecated**: use `users` instead by replacing `github_organization.example.members` to `github_organization.example.users[*].login` which will give you the same value, expect this field to be removed in next major version +* `users` - (`list`) A list with the members of the organization with following fields: + * `id` - The ID of the member + * `login` - The members login + * `email` - Publicly available email + * `role` - Member role `ADMIN`, `MEMBER` +* `two_factor_requirement_enabled` - Whether two-factor authentication is required for all members of the organization. +* `default_repository_permission` - Default permission level members have for organization repositories. +* `members_allowed_repository_creation_type` - The type of repository allowed to be created by members of the organization. Can be one of `ALL`, `PUBLIC`, `PRIVATE`, `NONE`. +* `members_can_create_repositories` - Whether non-admin organization members can create repositories. +* `members_can_create_internal_repositories` - Whether organization members can create internal repositories. +* `members_can_create_private_repositories` - Whether organization members can create private repositories. +* `members_can_create_public_repositories` - Whether organization members can create public repositories. +* `members_can_create_pages` - Whether organization members can create pages sites. +* `members_can_create_public_pages` - Whether organization members can create public pages sites. +* `members_can_create_private_pages` - Whether organization members can create private pages sites. +* `members_can_fork_private_repositories` - Whether organization members can create private repository forks. +* `web_commit_signoff_required` - Whether organization members must sign all commits. +* `advanced_security_enabled_for_new_repositories` - Whether advanced security is enabled for new repositories. +* `dependabot_alerts_enabled_for_new_repositories` - Whether Dependabot alerts is automatically enabled for new repositories. +* `dependabot_security_updates_enabled_for_new_repositories` - Whether Dependabot security updates is automatically enabled for new repositories. +* `dependency_graph_enabled_for_new_repositories` - Whether dependency graph is automatically enabled for new repositories. +* `secret_scanning_enabled_for_new_repositories` - Whether secret scanning is automatically enabled for new repositories. +* `secret_scanning_push_protection_enabled_for_new_repositories` - Whether secret scanning push protection is automatically enabled for new repositories. diff --git a/templates/data-sources/organization_app_installations.md.tmpl b/templates/data-sources/organization_app_installations.md.tmpl new file mode 100644 index 0000000000..4f9b0542c6 --- /dev/null +++ b/templates/data-sources/organization_app_installations.md.tmpl @@ -0,0 +1,41 @@ +--- +page_title: "GitHub: github_organization_app_installations" +description: |- + Get information on all GitHub App installations of the organization. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_organization\_app_installations + +Use this data source to retrieve all GitHub App installations of the organization. + +## Example Usage + +To retrieve *all* GitHub App installations of the organization: + +{{tffile "examples/data-sources/organization_app_installations/example_1.tf"}} + +## Attributes Reference + +* `installations` - List of GitHub App installations in the organization. Each `installation` block consists of the fields documented below. + +--- + +The `installation` block consists of: + +* `id` - The ID of the GitHub App installation. +* `app_slug` - The URL-friendly name of the GitHub App. +* `app_id` - The ID of the GitHub App. +* `repository_selection` - Whether the installation has access to all repositories or only selected ones. Possible values are `all` or `selected`. +* `permissions` - A map of the permissions granted to the GitHub App installation. +* `events` - The list of events the GitHub App installation subscribes to. +* `client_id` - The OAuth client ID of the GitHub App. +* `target_id` - The ID of the account the GitHub App is installed on. +* `target_type` - The type of account the GitHub App is installed on. Possible values are `Organization` or `User`. +* `suspended` - Whether the GitHub App installation is currently suspended. +* `single_file_paths` - The list of single file paths the GitHub App installation has access to. +* `created_at` - The date the GitHub App installation was created. +* `updated_at` - The date the GitHub App installation was last updated. diff --git a/templates/data-sources/organization_custom_properties.md.tmpl b/templates/data-sources/organization_custom_properties.md.tmpl new file mode 100644 index 0000000000..8c6a4e8073 --- /dev/null +++ b/templates/data-sources/organization_custom_properties.md.tmpl @@ -0,0 +1,39 @@ +--- +page_title: "GitHub: github_organization_custom_properties" +description: |- + Get information about a GitHub organization custom property +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization_custom_properties + +Use this data source to retrieve information about a GitHub organization custom property. + +## Example Usage + +{{tffile "examples/data-sources/organization_custom_properties/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `property_name` - (Required) The name of the custom property to retrieve. + +## Attributes Reference + +* `property_name` - The name of the custom property. + +* `value_type` - The type of the custom property. Can be one of `string`, `single_select`, `multi_select`, or `true_false`. + +* `required` - Whether the custom property is required. + +* `description` - The description of the custom property. + +* `default_value` - The default value of the custom property. + +* `allowed_values` - List of allowed values for the custom property. Only populated when `value_type` is `single_select` or `multi_select`. + +* `values_editable_by` - Who can edit the values of the custom property. Can be one of `org_actors` or `org_and_repo_actors`. diff --git a/templates/data-sources/organization_custom_role.md.tmpl b/templates/data-sources/organization_custom_role.md.tmpl new file mode 100644 index 0000000000..3756fbd2e1 --- /dev/null +++ b/templates/data-sources/organization_custom_role.md.tmpl @@ -0,0 +1,36 @@ +--- +page_title: "GitHub: github_organization_custom_role" +description: |- + Get a custom role from a GitHub Organization for use in repositories. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_organization\_custom\_role + +~> **Note:** This data source is deprecated, please use the `github_organization_repository_role` data source instead. + +Use this data source to retrieve information about a custom role in a GitHub Organization. + +~> Note: Custom roles are currently only available in GitHub Enterprise Cloud. + +## Example Usage + +{{tffile "examples/data-sources/organization_custom_role/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name of the custom role. + +## Attributes Reference + +The following additional attributes are exported: + +* `id` - The ID of the custom role. +* `description` - The description for the custom role. +* `base_role` - The system role from which the role inherits permissions. +* `permissions` - A list of additional permissions included in this role. diff --git a/templates/data-sources/organization_external_identities.md.tmpl b/templates/data-sources/organization_external_identities.md.tmpl new file mode 100644 index 0000000000..4a9daa1613 --- /dev/null +++ b/templates/data-sources/organization_external_identities.md.tmpl @@ -0,0 +1,47 @@ +--- +page_title: "GitHub: github_organization_external_identities" +description: |- + Get a list of organization members and their SAML linked external identity NameID +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization_external_identities + +Use this data source to retrieve each organization member's SAML or SCIM user attributes. + +## Example Usage + +{{tffile "examples/data-sources/organization_external_identities/example_1.tf"}} + +## Attributes Reference + +- `identities` - An Array of identities returned from GitHub + +--- + +Each element in the `identities` block consists of: + +- `login` - The username of the GitHub user +- `saml_identity` - An Object containing the user's SAML data. This object will be empty if the user is not managed by SAML. +- `scim_identity` - An Object contining the user's SCIM data. This object will be empty if the user is not managed by SCIM. + +--- + +If a user is managed by SAML, the `saml_identity` object will contain: + +- `name_id` - The member's SAML NameID +- `username` - The member's SAML Username +- `family_name` - The member's SAML Family Name +- `given_name` - The member's SAML Given Name + +--- + +If a user is managed by SCIM, the `scim_identity` object will contain: + +- `username` - The member's SCIM Username. (will be empty string if user is not managed by SCIM) +- `groups` - The member's SCIM Groups +- `family_name` - The member's SCIM Family Name +- `given_name` - The member's SCIM Given Name diff --git a/templates/data-sources/organization_ip_allow_list.md.tmpl b/templates/data-sources/organization_ip_allow_list.md.tmpl new file mode 100644 index 0000000000..2ce4985267 --- /dev/null +++ b/templates/data-sources/organization_ip_allow_list.md.tmpl @@ -0,0 +1,32 @@ +--- +page_title: "GitHub: github_organization_ip_allow_list" +description: |- + Get the IP allow list of an organization. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization_ip_allow_list + +Use this data source to retrieve information about the IP allow list of an organization. The allow list for IP addresses will block access to private resources via the web, API, and Git from any IP addresses that are not on the allow list. + +## Example Usage + +{{tffile "examples/data-sources/organization_ip_allow_list/example_1.tf"}} + +## Attributes Reference + +* `ip_allow_list` - An Array of allowed IP addresses. + +--- + +Each element in the `ip_allow_list` block consists of: + +* `id` - The ID of the IP allow list entry. +* `name` - The name of the IP allow list entry. +* `allow_list_value` - A single IP address or range of IP addresses in CIDR notation. +* `is_active` - Whether the entry is currently active. +* `created_at` - Identifies the date and time when the object was created. +* `updated_at` - Identifies the date and time when the object was last updated. diff --git a/templates/data-sources/organization_repository_role.md.tmpl b/templates/data-sources/organization_repository_role.md.tmpl new file mode 100644 index 0000000000..aa44ba3eae --- /dev/null +++ b/templates/data-sources/organization_repository_role.md.tmpl @@ -0,0 +1,32 @@ +--- +page_title: "GitHub: github_organization_repository_role" +description: |- + Lookup a custom organization repository role. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization_repository_role + +Lookup a custom organization repository role. + +~> **Note**: Custom organization repository roles are currently only available in GitHub Enterprise Cloud. + +## Example Usage + +{{tffile "examples/data-sources/organization_repository_role/example_1.tf"}} + +## Schema + +### Required + +- `role_id` (Number) The ID of the organization repository role. + +### Read-Only + +- `name` (String) The name of the organization repository role. +- `description` (String) The description of the organization repository role. +- `base_role` (String) The system role from which this role inherits permissions. +- `permissions` (Set of String) The permissions included in this role. diff --git a/templates/data-sources/organization_repository_roles.md.tmpl b/templates/data-sources/organization_repository_roles.md.tmpl new file mode 100644 index 0000000000..c677d3a208 --- /dev/null +++ b/templates/data-sources/organization_repository_roles.md.tmpl @@ -0,0 +1,35 @@ +--- +page_title: "GitHub: github_organization_repository_roles" +description: |- + Lookup all custom repository roles in an organization. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization_repository_roles + +Lookup all custom repository roles in an organization. + +~> **Note**: Custom organization repository roles are currently only available in GitHub Enterprise Cloud. + +## Example Usage + +{{tffile "examples/data-sources/organization_repository_roles/example_1.tf"}} + +## Schema + +### Read-Only + +- `roles` (Set of Object, see [schema](#nested-schema-for-roles)) Available organization repository roles. + +## Nested Schema for `roles` + +### Read-Only + +- `role_id` (Number) The ID of the organization repository role. +- `name` (String) The name of the organization repository role. +- `description` (String) The description of the organization repository role. +- `base_role` (String) The system role from which this role inherits permissions. +- `permissions` (Set of String) The permissions included in this role. diff --git a/templates/data-sources/organization_role.md.tmpl b/templates/data-sources/organization_role.md.tmpl new file mode 100644 index 0000000000..760b4b53b4 --- /dev/null +++ b/templates/data-sources/organization_role.md.tmpl @@ -0,0 +1,31 @@ +--- +page_title: "GitHub: github_organization_role" +description: |- + Lookup a custom organization role. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization_role + +Lookup a custom organization role. + +## Example Usage + +{{tffile "examples/data-sources/organization_role/example_1.tf"}} + +## Schema + +### Required + +- `role_id` (Number) The ID of the organization role. + +### Read-Only + +- `name` (String) The name of the organization role. +- `description` (String) The description of the organization role. +- `source` (String) The source of this role; one of `Predefined`, `Organization`, or `Enterprise`. +- `base_role` (String) The system role from which this role inherits permissions. +- `permissions` (Set of String) The permissions included in this role. diff --git a/templates/data-sources/organization_role_teams.md.tmpl b/templates/data-sources/organization_role_teams.md.tmpl new file mode 100644 index 0000000000..910391342b --- /dev/null +++ b/templates/data-sources/organization_role_teams.md.tmpl @@ -0,0 +1,36 @@ +--- +page_title: "GitHub: github_organization_role_teams" +description: |- + Lookup all teams assigned to a custom organization role. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization_role_teams + +Lookup all teams assigned to a custom organization role. + +## Example Usage + +{{tffile "examples/data-sources/organization_role_teams/example_1.tf"}} + +## Schema + +### Required + +- `role_id` (Number) The ID of the organization role. + +### Read-Only + +- `teams` (Set of Object, see [schema](#nested-schema-for-teams)) Teams assigned to the organization role. + +## Nested Schema for `teams` + +### Read-Only + +- `team_id` (Number) The ID of the team. +- `slug` (String) The Slug of the team name. +- `name` (String) The name of the team. +- `permission` (String) The permission that the team will have for its repositories. diff --git a/templates/data-sources/organization_role_users.md.tmpl b/templates/data-sources/organization_role_users.md.tmpl new file mode 100644 index 0000000000..6d32635684 --- /dev/null +++ b/templates/data-sources/organization_role_users.md.tmpl @@ -0,0 +1,34 @@ +--- +page_title: "GitHub: github_organization_role_users" +description: |- + Lookup all users assigned to a custom organization role. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization_role_users + +Lookup all users assigned to a custom organization role. + +## Example Usage + +{{tffile "examples/data-sources/organization_role_users/example_1.tf"}} + +## Schema + +### Required + +- `role_id` (Number) The ID of the organization role. + +### Read-Only + +- `users` (Set of Object, see [schema](#nested-schema-for-users)) Users assigned to the organization role. + +## Nested Schema for `users` + +### Read-Only + +- `user_id` (Number) The ID of the user. +- `login` (String) The login for the GitHub user account. diff --git a/templates/data-sources/organization_roles.md.tmpl b/templates/data-sources/organization_roles.md.tmpl new file mode 100644 index 0000000000..64c37f33d6 --- /dev/null +++ b/templates/data-sources/organization_roles.md.tmpl @@ -0,0 +1,34 @@ +--- +page_title: "GitHub: github_organization_roles" +description: |- + Lookup all custom roles in an organization. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization_roles + +Lookup all custom roles in an organization. + +## Example Usage + +{{tffile "examples/data-sources/organization_roles/example_1.tf"}} + +## Schema + +### Read-Only + +- `roles` (Set of Object, see [schema](#nested-schema-for-roles)) Available organization roles. + +## Nested Schema for `roles` + +### Read-Only + +- `role_id` (Number) The ID of the organization role. +- `name` (String) The name of the organization role. +- `description` (String) The description of the organization role. +- `source` (String) The source of this role; one of `Predefined`, `Organization`, or `Enterprise`. +- `base_role` (String) The system role from which this role inherits permissions. +- `permissions` (Set of String) The permissions included in this role. diff --git a/templates/data-sources/organization_security_managers.md.tmpl b/templates/data-sources/organization_security_managers.md.tmpl new file mode 100644 index 0000000000..0f8a8a5f5d --- /dev/null +++ b/templates/data-sources/organization_security_managers.md.tmpl @@ -0,0 +1,32 @@ +--- +page_title: "GitHub: github_organization_security_managers" +description: |- + Get the security managers for an organization. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization_security_managers + +~> **Note:** This data source is deprecated, please use the `github_organization_role_team` resource instead. + +Use this data source to retrieve the security managers for an organization. + +## Example Usage + +{{tffile "examples/data-sources/organization_security_managers/example_1.tf"}} + +## Attributes Reference + +* `teams` - An list of GitHub teams. Each `team` block consists of the fields documented below. + +---___ + +The `team` block consists of: + +* `id` - Unique identifier of the team. +* `slug` - Name based identifier of the team. +* `name` - Name of the team. +* `permission` - Permission that the team will have for its repositories. diff --git a/templates/data-sources/organization_team_sync_groups.md.tmpl b/templates/data-sources/organization_team_sync_groups.md.tmpl new file mode 100644 index 0000000000..6cc4e6ae6e --- /dev/null +++ b/templates/data-sources/organization_team_sync_groups.md.tmpl @@ -0,0 +1,31 @@ +--- +page_title: "GitHub: github_organization_team_sync_groups" +description: |- + Get the external identity provider (IdP) groups for an organization. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization_team_sync_groups + +Use this data source to retrieve the identity provider (IdP) groups for an organization. + +## Example Usage + +{{tffile "examples/data-sources/organization_team_sync_groups/example_1.tf"}} + +## Attributes Reference + +* `groups` - An Array of GitHub Identity Provider Groups. Each `group` block consists of the fields documented below. + +--- + +The `group` block consists of: + +* `group_id` - The ID of the IdP group. + +* `group_name` - The name of the IdP group. + +* `group_description` - The description of the IdP group. diff --git a/templates/data-sources/organization_teams.md.tmpl b/templates/data-sources/organization_teams.md.tmpl new file mode 100644 index 0000000000..edddc0dde3 --- /dev/null +++ b/templates/data-sources/organization_teams.md.tmpl @@ -0,0 +1,46 @@ +--- +page_title: "GitHub: github_organization_teams" +description: |- + Get information on all GitHub teams of an organization. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_organization\_teams + +Use this data source to retrieve information about all GitHub teams in an organization. + +## Example Usage + +To retrieve *all* teams of the organization: + +{{tffile "examples/data-sources/organization_teams/example_1.tf"}} + +To retrieve only the team's at the root of the organization: + +{{tffile "examples/data-sources/organization_teams/example_2.tf"}} + +## Attributes Reference + +* `teams` - (Required) An Array of GitHub Teams. Each `team` block consists of the fields documented below. +* `root_teams_only` - (Optional) Only return teams that are at the organization's root, i.e. no nested teams. Defaults to `false`. +* `summary_only` - (Optional) Exclude the members and repositories of the team from the returned result. Defaults to `false`. +* `results_per_page` - (Optional) Set the number of results per graphql query. Reducing this number can alleviate timeout errors. Accepts a value between 0 - 100. Defaults to `100`. + +--- + +The `team` block consists of: + +* `id` - The ID of the team. +* `node_id` - The Node ID of the team. +* `slug` - The slug of the team. +* `name` - The team's full name. +* `description` - The team's description. +* `privacy` - The team's privacy type. +* `members` - List of team members. Not returned if `summary_only = true` +* `repositories` - List of team repositories. Not returned if `summary_only = true` +* `parent_team_id` - The ID of the parent team, if there is one. +* `parent_team_slug` - The slug of the parent team, if there is one. +* `parent` - (**DEPRECATED**) The parent team, use `parent_team_id` or `parent_team_slug` instead. diff --git a/templates/data-sources/organization_webhooks.md.tmpl b/templates/data-sources/organization_webhooks.md.tmpl new file mode 100644 index 0000000000..dec1c7d892 --- /dev/null +++ b/templates/data-sources/organization_webhooks.md.tmpl @@ -0,0 +1,33 @@ +--- +page_title: "GitHub: github_organization_webhooks" +description: |- + Get information on all GitHub webhooks of the organization. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_organization\_webhooks + +Use this data source to retrieve all webhooks of the organization. + +## Example Usage + +To retrieve *all* webhooks of the organization: + +{{tffile "examples/data-sources/organization_webhooks/example_1.tf"}} + +## Attributes Reference + +* `webhooks` - An Array of GitHub Webhooks. Each `webhook` block consists of the fields documented below. + +--- + +The `webhook` block consists of: + +* `id` - the ID of the webhook. +* `type` - the type of the webhook. +* `name` - the name of the webhook. +* `url` - the url of the webhook. +* `active` - `true` if the webhook is active. diff --git a/templates/data-sources/ref.md.tmpl b/templates/data-sources/ref.md.tmpl new file mode 100644 index 0000000000..61f1bb051f --- /dev/null +++ b/templates/data-sources/ref.md.tmpl @@ -0,0 +1,37 @@ +--- +page_title: "GitHub: github_ref" +description: |- + Get information about a repository ref. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_ref + +Use this data source to retrieve information about a repository ref. + +## Example Usage + +{{tffile "examples/data-sources/ref/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `owner` - (Required) Owner of the repository. + +* `repository` - (Required) The GitHub repository name. + +* `ref` - (Required) The repository ref to look up. Must be formatted `heads/` for branches, and `tags/` for tags. + +## Attribute Reference + +The following additional attributes are exported: + +* `etag` - An etag representing the ref. + +* `id` - A string storing a reference to the repository name and ref. + +* `sha` - A string storing the reference's `HEAD` commit's SHA1. diff --git a/templates/data-sources/release.md.tmpl b/templates/data-sources/release.md.tmpl new file mode 100644 index 0000000000..8305a2236b --- /dev/null +++ b/templates/data-sources/release.md.tmpl @@ -0,0 +1,69 @@ +--- +page_title: "GitHub: github_release" +description: |- + Get information on a GitHub release. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_release + +Use this data source to retrieve information about a GitHub release in a specific repository. + +## Example Usage + +To retrieve the latest release that is present in a repository: + +{{tffile "examples/data-sources/release/example_1.tf"}} + +To retrieve a specific release from a repository based on its ID: + +{{tffile "examples/data-sources/release/example_2.tf"}} + +Finally, to retrieve a release based on its tag: + +{{tffile "examples/data-sources/release/example_3.tf"}} + +## Argument Reference + +* `repository` - (Required) Name of the repository to retrieve the release from. + +* `owner` - (Required) Owner of the repository. + +* `retrieve_by` - (Required) Describes how to fetch the release. Valid values are `id`, `tag`, `latest`. + +* `release_id` - (Optional) ID of the release to retrieve. Must be specified when `retrieve_by` = `id`. + +* `release_tag` - (Optional) Tag of the release to retrieve. Must be specified when `retrieve_by` = `tag`. + +## Attributes Reference + +* `release_tag` - Tag of release +* `release_id` - ID of release +* `target_commitish` - Commitish value that determines where the Git release is created from +* `name` - Name of release +* `body` - Contents of the description (body) of a release +* `draft` - (`Boolean`) indicates whether the release is a draft +* `prerelease` - (`Boolean`) indicates whether the release is a prerelease +* `created_at` - Date of release creation +* `published_at` - Date of release publishing +* `url` - Base URL of the release +* `html_url` - URL directing to detailed information on the release +* `assets_url` - URL of any associated assets with the release +* `asserts_url` - **Deprecated**: Use `assets_url` resource instead +* `upload_url` - URL that can be used to upload Assets to the release +* `zipball_url` - Download URL of a specific release in `zip` format +* `tarball_url` - Download URL of a specific release in `tar.gz` format +* `assets` - Collection of assets for the release. Each asset conforms to the following schema: + * `id` - ID of the asset + * `url` - URL of the asset + * `node_id` - Node ID of the asset + * `name` - The file name of the asset + * `label` - Label for the asset + * `content_type` - MIME type of the asset + * `size` - Size in byte + * `created_at` - Date the asset was created + * `updated_at` - Date the asset was last updated + * `browser_download_url` - Browser download URL diff --git a/templates/data-sources/release_asset.md.tmpl b/templates/data-sources/release_asset.md.tmpl new file mode 100644 index 0000000000..334a50c9c7 --- /dev/null +++ b/templates/data-sources/release_asset.md.tmpl @@ -0,0 +1,52 @@ +--- +page_title: "GitHub: github_release_asset" +description: |- + Get information on a GitHub release asset. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_release\_asset + +Use this data source to retrieve information about a GitHub release asset. + +## Example Usage + +To retrieve a specific release asset from a repository based on its ID: + +{{tffile "examples/data-sources/release_asset/example_1.tf"}} + +To retrieve a specific release asset from a repository, and download the file into a `file` attribute on the data source: + +{{tffile "examples/data-sources/release_asset/example_2.tf"}} + +To retrieve the first release asset associated with the latest release in a repository: + +{{tffile "examples/data-sources/release_asset/example_3.tf"}} + +To retrieve all release assets associated with the the latest release in a repository: + +{{tffile "examples/data-sources/release_asset/example_4.tf"}} + +## Argument Reference + +* `repository` - (Required) Name of the repository to retrieve the release from +* `owner` - (Required) Owner of the repository +* `asset_id` - (Required) ID of the release asset to retrieve +* `download_file_contents` - (Optional) Whether to download the asset file content into the `file_contents` attribute (defaults to `false`) + +## Attributes Reference + +* `id` - ID of the asset +* `url` - URL of the asset +* `node_id` - Node ID of the asset +* `name` - The file name of the asset +* `label` - Label for the asset +* `content_type` - MIME type of the asset +* `size` - Asset size in bytes +* `created_at` - Date the asset was created +* `updated_at` - Date the asset was last updated +* `browser_download_url` - Browser URL from which the release asset can be downloaded +* `file_contents` - The base64-encoded release asset file contents (requires `download_file_contents` to be `true`) diff --git a/templates/data-sources/repositories.md.tmpl b/templates/data-sources/repositories.md.tmpl new file mode 100644 index 0000000000..ceaee30b2e --- /dev/null +++ b/templates/data-sources/repositories.md.tmpl @@ -0,0 +1,34 @@ +--- +page_title: "GitHub: github_repositories" +description: |- + Search for GitHub repositories +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repositories + +-> **Note:** The data source will return a maximum of `1000` repositories [as documented in official API docs](https://developer.github.com/v3/search/#about-the-search-api). + +Use this data source to retrieve a list of GitHub repositories using a search query. + +## Example Usage + +{{tffile "examples/data-sources/repositories/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `query` - (Required) Search query. See [documentation for the search syntax](https://help.github.com/articles/understanding-the-search-syntax/). +* `sort` - (Optional) Sorts the repositories returned by the specified attribute. Valid values include `stars`, `fork`, and `updated`. Defaults to `updated`. +* `include_repo_id` - (Optional) Returns a list of found repository IDs +* `results_per_page` - (Optional) Set the number of repositories requested per API call. Can be useful to decrease if requests are timing out or to increase to reduce the number of API calls. Defaults to 100. + +## Attributes Reference + +* `full_names` - A list of full names of found repositories (e.g. `hashicorp/terraform`) +* `names` - A list of found repository names (e.g. `terraform`) +* `repo_ids` - (Optional) A list of found repository IDs (e.g. `449898861`) diff --git a/templates/data-sources/repository.md.tmpl b/templates/data-sources/repository.md.tmpl new file mode 100644 index 0000000000..e305ad2f21 --- /dev/null +++ b/templates/data-sources/repository.md.tmpl @@ -0,0 +1,129 @@ +--- +page_title: "GitHub: github_repository" +description: |- + Get details about GitHub repository +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository + +Use this data source to retrieve information about a GitHub repository. + +## Example Usage + +{{tffile "examples/data-sources/repository/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `name` - (Optional) The name of the repository. + +* `full_name` - (Optional) Full name of the repository (in `org/name` format). + +## Attributes Reference + +* `node_id` - the Node ID of the repository. + +* `description` - A description of the repository. + +* `homepage_url` - URL of a page describing the project. + +* `private` - Whether the repository is private. + +* `visibility` - Whether the repository is public, private or internal. + +* `has_issues` - Whether the repository has GitHub Issues enabled. + +* `has_discussions` - Whether the repository has GitHub Discussions enabled. + +* `has_projects` - Whether the repository has the GitHub Projects enabled. + +* `has_wiki` - Whether the repository has the GitHub Wiki enabled. + +* `is_template` - Whether the repository is a template repository. + +* `fork` - Whether the repository is a fork. + +* `allow_merge_commit` - Whether the repository allows merge commits. + +* `allow_squash_merge` - Whether the repository allows squash merges. + +* `allow_rebase_merge` - Whether the repository allows rebase merges. + +* `allow_auto_merge` - Whether the repository allows auto-merging pull requests. + +* `allow_forking` - Whether the repository allows private forking; this is only relevant if the repository is owned by an organization and is private or internal. + +* `squash_merge_commit_title` - The default value for a squash merge commit title. + +* `squash_merge_commit_message` - The default value for a squash merge commit message. + +* `merge_commit_title` - The default value for a merge commit title. + +* `merge_commit_message` - The default value for a merge commit message. + +* `has_downloads` - (**DEPRECATED**) Whether the repository has Downloads feature enabled. This attribute is no longer in use, but it hasn't been removed yet. It will be removed in a future version. See [this discussion](https://github.com/orgs/community/discussions/102145#discussioncomment-8351756). + +* `default_branch` - The name of the default branch of the repository. + +* `primary_language` - The primary language used in the repository. + +* `archived` - Whether the repository is archived. + +* `pages` - The repository's GitHub Pages configuration. + +* `topics` - The list of topics of the repository. + +* `template` - The repository source template configuration. + +* `html_url` - URL to the repository on the web. + +* `ssh_clone_url` - URL that can be provided to `git clone` to clone the repository via SSH. + +* `http_clone_url` - URL that can be provided to `git clone` to clone the repository via HTTPS. + +* `git_clone_url` - URL that can be provided to `git clone` to clone the repository anonymously via the git protocol. + +* `svn_url` - URL that can be provided to `svn checkout` to check out the repository via GitHub's Subversion protocol emulation. + +* `node_id` - GraphQL global node id for use with v4 API + +* `repo_id` - GitHub ID for the repository + +* `repository_license` - An Array of GitHub repository licenses. Each `repository_license` block consists of the fields documented below. + +--- + +The `repository_license` block consists of: + +* `content` - Content of the license file, encoded by encoding scheme mentioned below. +* `download_url` - The URL to download the raw content of the license file. +* `encoding` - The encoding used for the content (e.g., "base64"). +* `git_url` - The URL to access information about the license file as a Git blob. +* `html_url` - The URL to view the license file on GitHub. +* `license` - `license` block consists of the fields documented below. +* `name` - The name of the license file (e.g., "LICENSE"). +* `path` - The path to the license file within the repository. +* `sha` - The SHA hash of the license file. +* `size` - The size of the license file in bytes. +* `type` - The type of the content, (e.g., "file"). +* `url` - The URL to access information about the license file on GitHub. + +The `license` block consists of: + +* `body` - The text of the license. +* `conditions` - Conditions associated with the license. +* `description` - A description of the license. +* `featured` - Indicates if the license is featured. +* `html_url` - The URL to view the license details on GitHub. +* `implementation` - Details about the implementation of the license. +* `key` - A key representing the license type (e.g., "apache-2.0"). +* `limitations` - Limitations associated with the license. +* `name` - The name of the license (e.g., "Apache License 2.0"). +* `permissions` - Permissions associated with the license. +* `spdx_id` - The SPDX identifier for the license (e.g., "Apache-2.0"). +* `url` - The URL to access information about the license on GitHub. diff --git a/templates/data-sources/repository_autolink_references.md.tmpl b/templates/data-sources/repository_autolink_references.md.tmpl new file mode 100644 index 0000000000..18340d1345 --- /dev/null +++ b/templates/data-sources/repository_autolink_references.md.tmpl @@ -0,0 +1,28 @@ +--- +page_title: "GitHub: github_repository_autolink_references" +description: |- + Get autolink references for a Github repository. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_autolink_references + +Use this data source to retrieve autolink references for a repository. + +## Example Usage + +{{tffile "examples/data-sources/repository_autolink_references/example_1.tf"}} + +## Argument Reference + +* `repository` - (Required) Name of the repository to retrieve the autolink references from. + +## Attributes Reference + +* `autolink_references` - The list of this repository's autolink references. Each element of `autolink_references` has the following attributes: + * `key_prefix` - Key prefix. + * `target_url_template` - Target url template. + * `is_alphanumeric` - True if alphanumeric. diff --git a/templates/data-sources/repository_branches.md.tmpl b/templates/data-sources/repository_branches.md.tmpl new file mode 100644 index 0000000000..1a7531b146 --- /dev/null +++ b/templates/data-sources/repository_branches.md.tmpl @@ -0,0 +1,31 @@ +--- +page_title: "GitHub: github_repository_branches" +description: |- + Get information on a GitHub repository's branches. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_branches + +Use this data source to retrieve information about branches in a repository. + +## Example Usage + +{{tffile "examples/data-sources/repository_branches/example_1.tf"}} + +## Argument Reference + +* `repository` - (Required) Name of the repository to retrieve the branches from. + +* `only_protected_branches` - (Optional). If true, the `branches` attributes will be populated only with protected branches. Default: `false`. + +* `only_non_protected_branches` - (Optional). If true, the `branches` attributes will be populated only with non protected branches. Default: `false`. + +## Attributes Reference + +* `branches` - The list of this repository's branches. Each element of `branches` has the following attributes: + * `name` - Name of the branch. + * `protected` - Whether the branch is protected. diff --git a/templates/data-sources/repository_custom_properties.md.tmpl b/templates/data-sources/repository_custom_properties.md.tmpl new file mode 100644 index 0000000000..ec7db23fb2 --- /dev/null +++ b/templates/data-sources/repository_custom_properties.md.tmpl @@ -0,0 +1,27 @@ +--- +page_title: "GitHub: github_repository_custom_properties" +description: |- + Get all custom properties of a repository +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_custom_properties + +Use this data source to retrieve all custom properties of a repository. + +## Example Usage + +{{tffile "examples/data-sources/repository_custom_properties/example_1.tf"}} + +## Argument Reference + +* `repository` - (Required) Name of the repository to retrieve the custom properties from. + +## Attributes Reference + +* `property` - The list of this repository's custom properties. Each element of `property` has the following attributes: + * `property_name` - Name of the property + * `property_value` - Value of the property diff --git a/templates/data-sources/repository_deploy_keys.md.tmpl b/templates/data-sources/repository_deploy_keys.md.tmpl new file mode 100644 index 0000000000..385bbcdbbe --- /dev/null +++ b/templates/data-sources/repository_deploy_keys.md.tmpl @@ -0,0 +1,29 @@ +--- +page_title: "GitHub: github_repository_deploy_keys" +description: |- + Get all deploy keys of a repository +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_deploy_keys + +Use this data source to retrieve all deploy keys of a repository. + +## Example Usage + +{{tffile "examples/data-sources/repository_deploy_keys/example_1.tf"}} + +## Argument Reference + +* `repository` - (Required) Name of the repository to retrieve the branches from. + +## Attributes Reference + +* `keys` - The list of this repository's deploy keys. Each element of `keys` has the following attributes: + * `id` - Key id + * `title` - Key title + * `key` - Key itself + * `verified` - `true` if the key was verified. diff --git a/templates/data-sources/repository_deployment_branch_policies.md.tmpl b/templates/data-sources/repository_deployment_branch_policies.md.tmpl new file mode 100644 index 0000000000..ae9c39be1b --- /dev/null +++ b/templates/data-sources/repository_deployment_branch_policies.md.tmpl @@ -0,0 +1,31 @@ +--- +page_title: "GitHub: github_repository_deployment_branch_policies" +description: |- + Get the list of deployment branch policies for a given repo / env. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_deployment_branch_policies + +~> **Note:** This data source is deprecated, please use the `github_repository_environment_deployment_policies` data source instead. + +Use this data source to retrieve deployment branch policies for a repository / environment. + +## Example Usage + +{{tffile "examples/data-sources/repository_deployment_branch_policies/example_1.tf"}} + +## Argument Reference + +* `repository` - (Required) Name of the repository to retrieve the deployment branch policies from. + +* `environment_name` - (Required) Name of the environment to retrieve the deployment branch policies from. + +## Attributes Reference + +* `deployment_branch_policies` - The list of this repository / environment deployment policies. Each element of `deployment_branch_policies` has the following attributes: + * `id` - Id of the policy. + * `name` - The name pattern that branches must match in order to deploy to the environment. diff --git a/templates/data-sources/repository_environment_deployment_policies.md.tmpl b/templates/data-sources/repository_environment_deployment_policies.md.tmpl new file mode 100644 index 0000000000..7e32a7d6b5 --- /dev/null +++ b/templates/data-sources/repository_environment_deployment_policies.md.tmpl @@ -0,0 +1,29 @@ +--- +page_title: "GitHub: github_repository_environment_deployment_policies" +description: |- + Get the list of environment deployment policies for a given repository environment. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_environment_deployment_policies + +Use this data source to retrieve deployment branch policies for a repository environment. + +## Example Usage + +{{tffile "examples/data-sources/repository_environment_deployment_policies/example_1.tf"}} + +## Argument Reference + +* `repository` - (Required) Name of the repository to retrieve the deployment branch policies from. + +* `environment` - (Required) Name of the environment to retrieve the deployment branch policies from. + +## Attributes Reference + +* `policies` - The list of deployment policies for the repository environment. Each element of `policies` has the following attributes: + * `type` - Type of the policy; this could be `branch` or `tag`. + * `pattern` - The pattern that branch or tag names must match in order to deploy to the environment. diff --git a/templates/data-sources/repository_environments.md.tmpl b/templates/data-sources/repository_environments.md.tmpl new file mode 100644 index 0000000000..8daa67a78a --- /dev/null +++ b/templates/data-sources/repository_environments.md.tmpl @@ -0,0 +1,27 @@ +--- +page_title: "GitHub: github_repository_environments" +description: |- + Get information on a GitHub repository's environments. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_environments + +Use this data source to retrieve information about environments for a repository. + +## Example Usage + +{{tffile "examples/data-sources/repository_environments/example_1.tf"}} + +## Argument Reference + +* `repository` - (Required) Name of the repository to retrieve the environments from. + +## Attributes Reference + +* `environments` - The list of this repository's environments. Each element of `environments` has the following attributes: + * `name` - Environment name. + * `node_id` - Environment node id. diff --git a/templates/data-sources/repository_file.md.tmpl b/templates/data-sources/repository_file.md.tmpl new file mode 100644 index 0000000000..76ace7e5be --- /dev/null +++ b/templates/data-sources/repository_file.md.tmpl @@ -0,0 +1,45 @@ +--- +page_title: "GitHub: github_repository_file" +description: |- + Reads files within a GitHub repository +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_file + +This data source allows you to read files within a GitHub repository. + +## Example Usage + +{{tffile "examples/data-sources/repository_file/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `repository` - (Required) The repository to read the file from. If an unqualified repo name (without an owner) is passed, the owner will be inferred from the owner of the token used to execute the plan. If a name of the type "owner/repo" (with a slash in the middle) is passed, the owner will be as specified and not the owner of the token. + +* `file` - (Required) The path of the file to read. + +* `branch` - (Optional) Git branch. Defaults to the repository's default branch. + +## Attributes Reference + +The following additional attributes are exported: + +* `content` - The file content. + +* `commit_sha` - The SHA of the commit that modified the file. + +* `sha` - The SHA blob of the file. + +* `commit_author` - Committer author name. + +* `commit_email` - Committer email address. + +* `commit_message` - Commit message when file was last updated. + +* `ref` - The name of the commit/branch/tag. diff --git a/templates/data-sources/repository_milestone.md.tmpl b/templates/data-sources/repository_milestone.md.tmpl new file mode 100644 index 0000000000..6c8dddaf73 --- /dev/null +++ b/templates/data-sources/repository_milestone.md.tmpl @@ -0,0 +1,32 @@ +--- +page_title: "GitHub: github_repository_milestone" +description: |- + Get information on a GitHub Repository Milestone. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_milestone + +Use this data source to retrieve information about a specific GitHub milestone in a repository. + +## Example Usage + +{{tffile "examples/data-sources/repository_milestone/example_1.tf"}} + +## Argument Reference + +* `owner` - (Required) Owner of the repository. + +* `repository` - (Required) Name of the repository to retrieve the milestone from. + +* `number` - (Required) The number of the milestone. + +## Attributes Reference + +* `description` - Description of the milestone. +* `due_date` - The milestone due date (in ISO-8601 `yyyy-mm-dd` format). +* `state` - State of the milestone. +* `title` - Title of the milestone. diff --git a/templates/data-sources/repository_pull_request.md.tmpl b/templates/data-sources/repository_pull_request.md.tmpl new file mode 100644 index 0000000000..e47f8e0bbb --- /dev/null +++ b/templates/data-sources/repository_pull_request.md.tmpl @@ -0,0 +1,55 @@ +--- +page_title: "GitHub: github_repository_pull_request" +description: |- + Get information on a single GitHub Pull Request. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_pull_request + +Use this data source to retrieve information about a specific GitHub Pull Request in a repository. + +## Example Usage + +{{tffile "examples/data-sources/repository_pull_request/example_1.tf"}} + +## Argument Reference + +* `base_repository` - (Required) Name of the base repository to retrieve the Pull Request from. + +* `number` - (Required) The number of the Pull Request within the repository. + +* `owner` - (Optional) Owner of the repository. If not provided, the provider's default owner is used. + +## Attributes Reference + +* `base_ref` - Name of the ref (branch) of the Pull Request base. + +* `base_sha` - Head commit SHA of the Pull Request base. + +* `body` - Body of the Pull Request. + +* `draft` - Indicates Whether this Pull Request is a draft. + +* `head_owner` - Owner of the Pull Request head repository. + +* `head_repository` - Name of the Pull Request head repository. + +* `head_sha` - Head commit SHA of the Pull Request head. + +* `labels` - List of label names set on the Pull Request. + +* `maintainer_can_modify` - Indicates whether the base repository maintainers can modify the Pull Request. + +* `opened_at` - Unix timestamp indicating the Pull Request creation time. + +* `opened_by` - GitHub login of the user who opened the Pull Request. + +* `state` - the current Pull Request state - can be "open", "closed" or "merged". + +* `title` - The title of the Pull Request. + +* `updated_at` - The timestamp of the last Pull Request update. diff --git a/templates/data-sources/repository_pull_requests.md.tmpl b/templates/data-sources/repository_pull_requests.md.tmpl new file mode 100644 index 0000000000..cec4db6891 --- /dev/null +++ b/templates/data-sources/repository_pull_requests.md.tmpl @@ -0,0 +1,69 @@ +--- +page_title: "GitHub: github_repository_pull_requests" +description: |- + Get information on multiple GitHub Pull Requests. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_pull_requests + +Use this data source to retrieve information about multiple GitHub Pull Requests in a repository. + +## Example Usage + +{{tffile "examples/data-sources/repository_pull_requests/example_1.tf"}} + +## Argument Reference + +* `base_repository` - (Required) Name of the base repository to retrieve the Pull Requests from. + +* `owner` - (Optional) Owner of the repository. If not provided, the provider's default owner is used. + +* `base_ref` - (Optional) If set, filters Pull Requests by base branch name. + +* `head_ref` - (Optional) If set, filters Pull Requests by head user or head organization and branch name in the format of "user:ref-name" or "organization:ref-name". For example: "github:new-script-format" or "octocat:test-branch". + +* `sort_by` - (Optional) If set, indicates what to sort results by. Can be either "created", "updated", "popularity" (comment count) or "long-running" (age, filtering by pulls updated in the last month). Default: "created". + +* `sort_direction` - (Optional) If set, controls the direction of the sort. Can be either "asc" or "desc". Default: "asc". + +* `state` - (Optional) If set, filters Pull Requests by state. Can be "open", "closed", or "all". Default: "open". + +## Attributes Reference + +* `results` - Collection of Pull Requests matching the filters. Each of the results conforms to the following scheme: + + * `base_ref` - Name of the ref (branch) of the Pull Request base. + + * `base_sha` - Head commit SHA of the Pull Request base. + + * `body` - Body of the Pull Request. + + * `draft` - Indicates Whether this Pull Request is a draft. + + * `head_owner` - Owner of the Pull Request head repository. + + * `head_ref` - Value of the Pull Request `HEAD` reference. + + * `head_repository` - Name of the Pull Request head repository. + + * `head_sha` - Head commit SHA of the Pull Request head. + + * `labels` - List of label names set on the Pull Request. + + * `maintainer_can_modify` - Indicates whether the base repository maintainers can modify the Pull Request. + + * `number` - The number of the Pull Request within the repository. + + * `opened_at` - Unix timestamp indicating the Pull Request creation time. + + * `opened_by` - GitHub login of the user who opened the Pull Request. + + * `state` - the current Pull Request state - can be "open", "closed" or "merged". + + * `title` - The title of the Pull Request. + + * `updated_at` - The timestamp of the last Pull Request update. diff --git a/templates/data-sources/repository_teams.md.tmpl b/templates/data-sources/repository_teams.md.tmpl new file mode 100644 index 0000000000..1d98a0b1a0 --- /dev/null +++ b/templates/data-sources/repository_teams.md.tmpl @@ -0,0 +1,29 @@ +--- +page_title: "GitHub: github_repository_teams" +description: |- + Get teams which have permission on the given repo. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_repository\_teams + +Use this data source to retrieve the list of teams which have access to a GitHub repository. + +## Example Usage + +{{tffile "examples/data-sources/repository_teams/example_1.tf"}} + +## Argument Reference + +* `name` - (Optional) The name of the repository. +* `full_name` - (Optional) Full name of the repository (in `org/name` format). + +## Attributes Reference + +* `teams` - List of teams which have access to the repository + * `name` - Team name + * `slug` - Team slug + * `permission` - Team permission diff --git a/templates/data-sources/repository_webhooks.md.tmpl b/templates/data-sources/repository_webhooks.md.tmpl new file mode 100644 index 0000000000..d61e4dd00f --- /dev/null +++ b/templates/data-sources/repository_webhooks.md.tmpl @@ -0,0 +1,33 @@ +--- +page_title: "GitHub: github_repository_webhooks" +description: |- + Get information on all GitHub webhooks of the organization. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_repository\_webhooks + +Use this data source to retrieve webhooks for a given repository. + +## Example Usage + +To retrieve webhooks of a repository: + +{{tffile "examples/data-sources/repository_webhooks/example_1.tf"}} + +## Attributes Reference + +* `webhooks` - An Array of GitHub Webhooks. Each `webhook` block consists of the fields documented below. + +--- + +The `webhook` block consists of: + +* `id` - the ID of the webhook. +* `type` - the type of the webhook. +* `name` - the name of the webhook. +* `url` - the url of the webhook. +* `active` - `true` if the webhook is active. diff --git a/templates/data-sources/rest_api.md.tmpl b/templates/data-sources/rest_api.md.tmpl new file mode 100644 index 0000000000..f3a4c43617 --- /dev/null +++ b/templates/data-sources/rest_api.md.tmpl @@ -0,0 +1,29 @@ +--- +page_title: "GitHub: github_rest_api" +description: |- + Get information on a GitHub resource with a custom GET request to GitHub REST API. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_rest_api + +Use this data source to retrieve information about a GitHub resource through REST API. + +## Example Usage + +{{tffile "examples/data-sources/rest_api/example_1.tf"}} + +## Argument Reference + +* `endpoint` - (Required) REST API endpoint to send the GET request to. + +## Attributes Reference + +* `id` - The GitHub API Request ID +* `code` - A response status code. +* `status` - A response status string. +* `headers` - A JSON string containing response headers. +* `body` - A JSON string containing response body. diff --git a/templates/data-sources/ssh_keys.md.tmpl b/templates/data-sources/ssh_keys.md.tmpl new file mode 100644 index 0000000000..9c06d03964 --- /dev/null +++ b/templates/data-sources/ssh_keys.md.tmpl @@ -0,0 +1,21 @@ +--- +page_title: "GitHub: github_ssh_keys" +description: |- + Get information on GitHub's SSH keys. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_ssh_keys + +Use this data source to retrieve information about GitHub's SSH keys. + +## Example Usage + +{{tffile "examples/data-sources/ssh_keys/example_1.tf"}} + +## Attributes Reference + +* `keys` - An array of GitHub's SSH public keys. diff --git a/templates/data-sources/team.md.tmpl b/templates/data-sources/team.md.tmpl new file mode 100644 index 0000000000..e56246949f --- /dev/null +++ b/templates/data-sources/team.md.tmpl @@ -0,0 +1,37 @@ +--- +page_title: "GitHub: github_team" +description: |- + Get information on a GitHub team. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_team + +Use this data source to retrieve information about a GitHub team. + +## Example Usage + +{{tffile "examples/data-sources/team/example_1.tf"}} + +## Argument Reference + +* `slug` - (Required) The team slug. +* `membership_type` - (Optional) Type of membership to be requested to fill the list of members. Can be either `all` *(default)* or `immediate`. +* `summary_only` - (Optional) Exclude the members and repositories of the team from the returned result. Defaults to `false`. +* `results_per_page` - (**DEPRECATED**) (Optional) Set the number of results per REST API query. Accepts a value between 0 - 100 *(defaults to `100`)*. + +## Attributes Reference + +* `id` - ID of the team. +* `node_id` - Node ID of the team. +* `name` - Team's full name. +* `description` - Team's description. +* `privacy` - Team's privacy type. Can either be `closed` or `secret`. +* `notification_setting` - Teams's notification setting. Can be either `notifications_enabled` or `notifications_disabled`. +* `permission` - (**DEPRECATED**) The permission that new repositories will be added to the team with when none is specified. +* `members` - List of team members (list of GitHub usernames). Not returned if `summary_only = true`. +* `repositories` - (**DEPRECATED**) List of team repositories (list of repo names). Not returned if `summary_only = true`. +* `repositories_detailed` - List of team repositories (each item comprises of `repo_id`, `repo_name` & [`role_name`](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team_repository#permission)). Not returned if `summary_only = true`. diff --git a/templates/data-sources/tree.md.tmpl b/templates/data-sources/tree.md.tmpl new file mode 100644 index 0000000000..29f76efaa0 --- /dev/null +++ b/templates/data-sources/tree.md.tmpl @@ -0,0 +1,27 @@ +--- +page_title: "GitHub: github_tree" +description: |- + Returns a single tree using the SHA1 value for that tree. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_tree + +Use this data source to retrieve information about a single tree. + +## Example Usage + +{{tffile "examples/data-sources/tree/example_1.tf"}} + +## Argument Reference + +- `recursive` - (Optional) Setting this parameter to `true` returns the objects or subtrees referenced by the tree specified in `tree_sha`. +- `repository` - (Required) The name of the repository. +- `tree_sha` - (Required) The SHA1 value for the tree. + +## Attributes Reference + +- `entries` - Objects (of `path`, `mode`, `type`, `size`, and `sha`) specifying a tree structure. diff --git a/templates/data-sources/user.md.tmpl b/templates/data-sources/user.md.tmpl new file mode 100644 index 0000000000..cdfd255643 --- /dev/null +++ b/templates/data-sources/user.md.tmpl @@ -0,0 +1,45 @@ +--- +page_title: "GitHub: github_user" +description: |- + Get information on a GitHub user. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_user + +Use this data source to retrieve information about a GitHub user. + +## Example Usage + +{{tffile "examples/data-sources/user/example_1.tf"}} + +## Argument Reference + +* `username` - (Required) The username. Use an empty string `""` to retrieve information about the currently authenticated user. + +## Attributes Reference + +* `id` - the ID of the user. +* `node_id` - the Node ID of the user. +* `login` - the user's login. +* `avatar_url` - the user's avatar URL. +* `gravatar_id` - the user's gravatar ID. +* `site_admin` - whether the user is a GitHub admin. +* `name` - the user's full name. +* `company` - the user's company name. +* `blog` - the user's blog location. +* `location` - the user's location. +* `email` - the user's email. +* `gpg_keys` - list of user's GPG keys. +* `ssh_keys` - list of user's SSH keys. +* `bio` - the user's bio. +* `public_repos` - the number of public repositories. +* `public_gists` - the number of public gists. +* `followers` - the number of followers. +* `following` - the number of following users. +* `created_at` - the creation date. +* `updated_at` - the update date. +* `suspended_at` - the suspended date if the user is suspended. diff --git a/templates/data-sources/user_external_identity.md.tmpl b/templates/data-sources/user_external_identity.md.tmpl new file mode 100644 index 0000000000..1f8af21173 --- /dev/null +++ b/templates/data-sources/user_external_identity.md.tmpl @@ -0,0 +1,46 @@ +--- +page_title: "GitHub: github_user_external_identity" +description: |- + Get a specific organization member's SAML/SCIM linked external identity +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_user_external_identity + +Use this data source to retrieve a specific organization member's SAML or SCIM user attributes. + +## Example Usage + +{{tffile "examples/data-sources/user_external_identity/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +- `username` - (Required) The username of the member to fetch external identity for. + +## Attributes Reference + +- `login` - The username of the GitHub user +- `saml_identity` - An Object containing the user's SAML data. This object will be empty if the user is not managed by SAML. +- `scim_identity` - An Object contining the user's SCIM data. This object will be empty if the user is not managed by SCIM. + +--- + +If a user is managed by SAML, the `saml_identity` object will contain: + +- `name_id` - The member's SAML NameID +- `username` - The member's SAML Username +- `family_name` - The member's SAML Family Name +- `given_name` - The member's SAML Given Name + +--- + +If a user is managed by SCIM, the `scim_identity` object will contain: + +- `scim_username` - The member's SCIM Username. (will be empty string if user is not managed by SCIM) +- `scim_family_name` - The member's SCIM Family Name +- `scim_given_name` - The member's SCIM Given Name diff --git a/templates/data-sources/users.md.tmpl b/templates/data-sources/users.md.tmpl new file mode 100644 index 0000000000..a62d6f0ac1 --- /dev/null +++ b/templates/data-sources/users.md.tmpl @@ -0,0 +1,28 @@ +--- +page_title: "GitHub: github_users" +description: |- + Get information about multiple GitHub users. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_users + +Use this data source to retrieve information about multiple GitHub users at once. + +## Example Usage + +{{tffile "examples/data-sources/users/example_1.tf"}} + +## Argument Reference + +* `usernames` - (Required) List of usernames. + +## Attributes Reference + +* `node_ids` - list of Node IDs of users that could be found. +* `logins` - list of logins of users that could be found. +* `emails` - list of the user's publicly visible profile email (will be empty string in case if user decided not to show it). +* `unknown_logins` - list of logins without matching user. diff --git a/templates/index.md.tmpl b/templates/index.md.tmpl new file mode 100644 index 0000000000..56525e1674 --- /dev/null +++ b/templates/index.md.tmpl @@ -0,0 +1,95 @@ +--- +page_title: "Provider: GitHub" +description: |- + The GitHub provider is used to interact with GitHub resources. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# GitHub Provider + +The GitHub provider is used to interact with GitHub resources. + +The provider allows you to manage your GitHub organization's members and teams easily. It needs to be configured with the proper credentials before it can be used. + +Use the navigation to the left to read about the available resources. + +## Example Usage + +Terraform 0.13 and later: + +{{tffile "examples/example_1.tf"}} + +- You **must** add a `required_providers` block to every module that will create resources with this provider. If you do not explicitly require `integrations/github` in a submodule, your terraform run may [break in hard-to-troubleshoot ways](https://github.com/integrations/terraform-provider-github/issues/876#issuecomment-1303790559). + +Terraform 0.12 and earlier: + +{{tffile "examples/example_2.tf"}} + +~> **Note:** When upgrading from `hashicorp/github` to `integrations/github`, use `terraform state replace-provider`. Otherwise, Terraform will still require the old provider to interact with the state file. + +## Authentication + +The GitHub provider offers multiple ways to authenticate with GitHub API. + +### GitHub CLI + +The GitHub provider taps into [GitHub CLI](https://cli.github.com/) authentication, where it picks up the token issued by [`gh auth login`](https://cli.github.com/manual/gh_auth_login) command. It is possible to specify the path to the `gh` executable in the `GH_PATH` environment variable, which is useful for when the GitHub Terraform provider can not properly determine its the path to GitHub CLI such as in the cygwin terminal. + +### OAuth / Personal Access Token + +To authenticate using OAuth tokens, ensure that the `token` argument or the `GITHUB_TOKEN` environment variable is set. + +{{tffile "examples/example_3.tf"}} + +### GitHub App Installation + +To authenticate using a GitHub App installation, ensure that arguments in the `app_auth` block or the `GITHUB_APP_XXX` environment variables are set. The `owner` parameter required in this situation. Leaving out will throw a `403 "Resource not accessible by integration"` error. + +Some API operations may not be available when using a GitHub App installation configuration. For more information, refer to the list of [supported endpoints](https://docs.github.com/en/rest/overview/endpoints-available-for-github-apps). + +{{tffile "examples/example_4.tf"}} + +~> **Note:** When using environment variables, an empty `app_auth` block is required to allow provider configurations from environment variables to be specified. See: https://github.com/hashicorp/terraform-plugin-sdk/issues/142 + +{{tffile "examples/example_5.tf"}} + +## Argument Reference + +The following arguments are supported in the `provider` block: + +* `token` - (Optional) A GitHub OAuth / Personal Access Token. When not provided or made available via the `GITHUB_TOKEN` environment variable, the provider can only access resources available anonymously. + +* `base_url` - (Optional) This is the target GitHub base API endpoint. Providing a value is a requirement when working with GitHub Enterprise. It is optional to provide this value and it can also be sourced from the `GITHUB_BASE_URL` environment variable. The value must end with a slash, for example: `https://terraformtesting-ghe.westus.cloudapp.azure.com/` + +* `owner` - (Optional) This is the target GitHub organization or individual user account to manage. For example, `torvalds` and `github` are valid owners. It is optional to provide this value and it can also be sourced from the `GITHUB_OWNER` environment variable. When not provided and a `token` is available, the individual user account owning the `token` will be used. When not provided and no `token` is available, the provider may not function correctly. It is required in case of GitHub App Installation. + +* `organization` - (Deprecated) This behaves the same as `owner`, which should be used instead. This value can also be sourced from the `GITHUB_ORGANIZATION` environment variable. + +* `app_auth` - (Optional) Configuration block to use GitHub App installation token. When not provided, the provider can only access resources available anonymously. + * `id` - (Required) This is the ID of the GitHub App. It can sourced from the `GITHUB_APP_ID` environment variable. + * `installation_id` - (Required) This is the ID of the GitHub App installation. It can sourced from the `GITHUB_APP_INSTALLATION_ID` environment variable. + * `pem_file` - (Required) This is the contents of the GitHub App private key PEM file. It can also be sourced from the `GITHUB_APP_PEM_FILE` environment variable and may use `\n` instead of actual new lines. + +* `write_delay_ms` - (Optional) The number of milliseconds to sleep in between write operations in order to satisfy the GitHub API rate limits. Note that requests to the GraphQL API are implemented as `POST` requests under the hood, so this setting affects those calls as well. Defaults to 1000ms or 1 second if not provided. + +* `retry_delay_ms` - (Optional) Amount of time in milliseconds to sleep in between requests to GitHub API after an error response. Defaults to 1000ms or 1 second if not provided, the max_retries must be set to greater than zero. + +* `read_delay_ms` - (Optional) The number of milliseconds to sleep in between non-write operations in order to satisfy the GitHub API rate limits. Defaults to 0ms. + +* `retryable_errors` - (Optional) "Allow the provider to retry after receiving an error status code, the max_retries should be set for this to work. Defaults to [500, 502, 503, 504] + +* `max_retries` - (Optional) Number of times to retry a request after receiving an error status code. Defaults to 3 + +Note: If you have a PEM file on disk, you can pass it in via `pem_file = file("path/to/file.pem")`. + +For backwards compatibility, if more than one of `owner`, `organization`, `GITHUB_OWNER` and `GITHUB_ORGANIZATION` are set, the first in this list takes priority. + +1. Setting `organization` in the GitHub provider configuration. +2. Setting the `GITHUB_ORGANIZATION` environment variable. +3. Setting the `GITHUB_OWNER` environment variable. +4. Setting `owner` in the GitHub provider configuration. + +~> It is a bug that `GITHUB_OWNER` takes precedence over `owner`, which may be fixed in a future major release. For compatibility with future releases, please set only one of `GITHUB_OWNER` and `owner`. diff --git a/templates/resources/actions_environment_secret.md.tmpl b/templates/resources/actions_environment_secret.md.tmpl new file mode 100644 index 0000000000..f3b903560b --- /dev/null +++ b/templates/resources/actions_environment_secret.md.tmpl @@ -0,0 +1,69 @@ +--- +page_title: "GitHub: github_actions_environment_secret" +description: |- + Creates and manages an Action Secret within a GitHub repository environment +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_environment_secret + +This resource allows you to create and manage GitHub Actions secrets within your GitHub repository environments. You must have write access to a repository to use this resource. + +Secret values are encrypted using the [Go '/crypto/box' module](https://godoc.org/golang.org/x/crypto/nacl/box) which is interoperable with [libsodium](https://libsodium.gitbook.io/doc/). Libsodium is used by GitHub to decrypt secret values. + +For the purposes of security, the contents of the `plaintext_value` field have been marked as `sensitive` to Terraform, but it is important to note that **this does not hide it from state files**. You should treat state as sensitive always. It is also advised that you do not store plaintext values in your code but rather populate the `encrypted_value` using fields from a resource, data source or variable as, while encrypted in state, these will be easily accessible in your code. See below for an example of this abstraction. + +## Example Usage + +{{tffile "examples/resources/actions_environment_secret/example_1.tf"}} + +{{tffile "examples/resources/actions_environment_secret/example_2.tf"}} + +## Example Lifecycle Ignore Changes + +This resource supports using the `lifecycle` `ignore_changes` block on `remote_updated_at` to support use cases where a secret value is created using a placeholder value and then modified after creation outside the scope of Terraform. This approach ensures only the initial placeholder value is referenced in your code and in the resulting state file. + +{{tffile "examples/resources/actions_environment_secret/example_3.tf"}} + +## Argument Reference + +The following arguments are supported: + +- `repository` - (Required) Name of the repository. +- `environment` - (Required) Name of the environment. +- `secret_name` - (Required) Name of the secret. +- `key_id` - (Optional) ID of the public key used to encrypt the secret. This should be provided when setting `encrypted_value`; if it isn't then the current public key will be looked up, which could cause a missmatch. This conflicts with `plaintext_value`. +- `encrypted_value` - (Optional) Encrypted value of the secret using the GitHub public key in Base64 format. +- `plaintext_value` - (Optional) Plaintext value of the secret to be encrypted. + +~> **Note**: One of either `encrypted_value` or `plaintext_value` must be specified. + +## Attributes Reference + +- `repository_id` - ID of the repository. +- `created_at` - Date the secret was created. +- `updated_at` - Date the secret was last updated by the provider. +- `remote_updated_at` - Date the secret was last updated in GitHub. + +## Import + +This resource can be imported using an ID made of the repository name, environment name (URL escaped), and secret name all separated by a `:`. + +~> **Note**: When importing secrets, the `plaintext_value` or `encrypted_value` fields will not be populated in the state. You may need to ignore changes for these as a workaround if you're not planning on updating the secret through Terraform. + +### Import Block + +The following import imports a GitHub actions environment secret named `mysecret` for the repo `myrepo` and environment `myenv` to a `github_actions_environment_secret` resource named `example`. + +{{tffile "examples/resources/actions_environment_secret/example_4.tf"}} + +### Import Command + +The following command imports a GitHub actions environment secret named `mysecret` for the repo `myrepo` and environment `myenv` to a `github_actions_environment_secret` resource named `example`. + +```shell +terraform import github_actions_environment_secret.example myrepo:myenv:mysecret +``` diff --git a/templates/resources/actions_environment_variable.md.tmpl b/templates/resources/actions_environment_variable.md.tmpl new file mode 100644 index 0000000000..06d43e31bb --- /dev/null +++ b/templates/resources/actions_environment_variable.md.tmpl @@ -0,0 +1,52 @@ +--- +page_title: "GitHub: github_actions_environment_variable" +description: |- + Creates and manages an Action variable within a GitHub repository environment +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_environment_variable + +This resource allows you to create and manage GitHub Actions variables within your GitHub repository environments. You must have write access to a repository to use this resource. + +## Example Usage + +{{tffile "examples/resources/actions_environment_variable/example_1.tf"}} + +{{tffile "examples/resources/actions_environment_variable/example_2.tf"}} + +## Argument Reference + +The following arguments are supported: + +- `repository` - (Required) Name of the repository. +- `environment` - (Required) Name of the environment. +- `variable_name` - (Required) Name of the variable. +- `value` - (Required) Value of the variable. + +## Attributes Reference + +- `repository_id` - ID of the repository. +- `created_at` - Date the variable was created. +- `updated_at` - Date the variable was last updated. + +## Import + +This resource can be imported using an ID made of the repository name, environment name (any `:` in the environment name need to be escaped as `??`), and variable name all separated by a `:`. + +### Import Block + +The following import imports a GitHub actions environment variable named `myvariable` for the repo `myrepo` and environment `myenv` to a `github_actions_environment_variable` resource named `example`. + +{{tffile "examples/resources/actions_environment_variable/example_3.tf"}} + +### Import Command + +The following command imports a GitHub actions environment variable named `myvariable` for the repo `myrepo` and environment `myenv` to a `github_actions_environment_variable` resource named `example`. + +```shell +terraform import github_actions_environment_variable.example myrepo:myenv:myvariable +``` diff --git a/templates/resources/actions_hosted_runner.md.tmpl b/templates/resources/actions_hosted_runner.md.tmpl new file mode 100644 index 0000000000..f5f241012f --- /dev/null +++ b/templates/resources/actions_hosted_runner.md.tmpl @@ -0,0 +1,105 @@ +--- +page_title: "GitHub: github_actions_hosted_runner" +description: |- + Creates and manages GitHub-hosted runners within a GitHub organization +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_hosted_runner + +This resource allows you to create and manage GitHub-hosted runners within your GitHub organization. You must have admin access to an organization to use this resource. + +GitHub-hosted runners are fully managed virtual machines that run your GitHub Actions workflows. Unlike self-hosted runners, GitHub handles the infrastructure, maintenance, and scaling. + +## Example Usage + +### Basic Usage + +{{tffile "examples/resources/actions_hosted_runner/example_1.tf"}} + +### Advanced Usage with Optional Parameters + +{{tffile "examples/resources/actions_hosted_runner/example_2.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) Name of the hosted runner. Must be between 1 and 64 characters and may only contain alphanumeric characters, '.', '-', and '_'. +* `image` - (Required) Image configuration for the hosted runner. Cannot be changed after creation. Block supports: + * `id` - (Required) The image ID. For GitHub-owned images, use numeric IDs like "2306" for Ubuntu Latest 24.04. To get available images, use the GitHub API: `GET /orgs/{org}/actions/hosted-runners/images/github-owned`. + * `source` - (Optional) The image source. Valid values are "github", "partner", or "custom". Defaults to "github". +* `size` - (Required) Machine size for the hosted runner (e.g., "4-core", "8-core"). Can be updated to scale the runner. To list available sizes, use the GitHub API: `GET /orgs/{org}/actions/hosted-runners/machine-sizes`. +* `runner_group_id` - (Required) The ID of the runner group to assign this runner to. +* `maximum_runners` - (Optional) Maximum number of runners to scale up to. Runners will not auto-scale above this number. Use this setting to limit costs. +* `public_ip_enabled` - (Optional) Whether to enable static public IP for the runner. Note there are account limits. To list limits, use the GitHub API: `GET /orgs/{org}/actions/hosted-runners/limits`. Defaults to false. +* `image_version` - (Optional) The version of the runner image to deploy. This is only relevant for runners using custom images. + +## Timeouts + +The `timeouts` block allows you to specify timeouts for certain actions: + +* `delete` - (Defaults to 10 minutes) Used for waiting for the hosted runner deletion to complete. + +Example: + +{{tffile "examples/resources/actions_hosted_runner/example_3.tf"}} + +## Attributes Reference + +In addition to the arguments above, the following attributes are exported: + +* `id` - The ID of the hosted runner. +* `status` - Current status of the runner (e.g., "Ready", "Provisioning"). +* `platform` - Platform of the runner (e.g., "linux-x64", "win-x64"). +* `image` - In addition to the arguments above, the image block exports: + * `size_gb` - The size of the image in gigabytes. +* `machine_size_details` - Detailed specifications of the machine size: + * `id` - Machine size identifier. + * `cpu_cores` - Number of CPU cores. + * `memory_gb` - Amount of memory in gigabytes. + * `storage_gb` - Amount of storage in gigabytes. +* `public_ips` - List of public IP ranges assigned to this runner (only if `public_ip_enabled` is true): + * `enabled` - Whether this IP range is enabled. + * `prefix` - IP address prefix. + * `length` - Subnet length. +* `last_active_on` - Timestamp (RFC3339) when the runner was last active. + +## Import + +Hosted runners can be imported using the runner ID: + +``` +$ terraform import github_actions_hosted_runner.example 123456 +``` + +## Notes + +* This resource is **organization-only** and cannot be used with individual accounts. +* The `image` field cannot be changed after the runner is created. Changing it will force recreation of the runner. +* The `size` field can be updated to scale the runner up or down as needed. +* Image IDs for GitHub-owned images are numeric strings (e.g., "2306" for Ubuntu Latest 24.04), not names like "ubuntu-latest". +* Deletion of hosted runners is asynchronous. The provider will poll for up to 10 minutes (configurable via timeouts) to confirm deletion. +* Runner creation and updates may take several minutes as GitHub provisions the infrastructure. +* Static public IPs are subject to account limits. Check your organization's limits before enabling. + +## Getting Available Images and Sizes + +To get a list of available images: + +```bash +curl -H "Authorization: Bearer YOUR_TOKEN" \ + -H "Accept: application/vnd.github+json" \ + https://api.github.com/orgs/YOUR_ORG/actions/hosted-runners/images/github-owned +``` + +To get available machine sizes: + +```bash +curl -H "Authorization: Bearer YOUR_TOKEN" \ + -H "Accept: application/vnd.github+json" \ + https://api.github.com/orgs/YOUR_ORG/actions/hosted-runners/machine-sizes +``` diff --git a/templates/resources/actions_organization_oidc_subject_claim_customization_template.md.tmpl b/templates/resources/actions_organization_oidc_subject_claim_customization_template.md.tmpl new file mode 100644 index 0000000000..b25bfc2736 --- /dev/null +++ b/templates/resources/actions_organization_oidc_subject_claim_customization_template.md.tmpl @@ -0,0 +1,33 @@ +--- +page_title: "GitHub: github_actions_organization_oidc_subject_claim_customization_template" +description: |- + Creates and manages an OpenID Connect subject claim customization template for an organization +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_organization_oidc_subject_claim_customization_template + +This resource allows you to create and manage an OpenID Connect subject claim customization template within a GitHub organization. + +More information on integrating GitHub with cloud providers using OpenID Connect and a list of available claims is available in the [Actions documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect). + +## Example Usage + +{{tffile "examples/resources/actions_organization_oidc_subject_claim_customization_template/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `include_claim_keys` - (Required) A list of OpenID Connect claims. + +## Import + +This resource can be imported using the organization's name. + +``` +$ terraform import github_actions_organization_oidc_subject_claim_customization_template.test example_organization +``` diff --git a/templates/resources/actions_organization_permissions.md.tmpl b/templates/resources/actions_organization_permissions.md.tmpl new file mode 100644 index 0000000000..475bbce61b --- /dev/null +++ b/templates/resources/actions_organization_permissions.md.tmpl @@ -0,0 +1,49 @@ +--- +page_title: "GitHub: github_actions_organization_permissions" +description: |- + Creates and manages Actions permissions within a GitHub organization +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_organization_permissions + +This resource allows you to create and manage GitHub Actions permissions within your GitHub enterprise organizations. You must have admin access to an organization to use this resource. + +## Example Usage + +{{tffile "examples/resources/actions_organization_permissions/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `allowed_actions` - (Optional) The permissions policy that controls the actions that are allowed to run. Can be one of: `all`, `local_only`, or `selected`. +* `enabled_repositories` - (Required) The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. +* `allowed_actions_config` - (Optional) Sets the actions that are allowed in an organization. Only available when `allowed_actions` = `selected`. See [Allowed Actions Config](#allowed-actions-config) below for details. +* `enabled_repositories_config` - (Optional) Sets the list of selected repositories that are enabled for GitHub Actions in an organization. Only available when `enabled_repositories` = `selected`. See [Enabled Repositories Config](#enabled-repositories-config) below for details. +* `sha_pinning_required` - (Optional) Whether pinning to a specific SHA is required for all actions and reusable workflows in the organization. + +### Allowed Actions Config + +The `allowed_actions_config` block supports the following: + +* `github_owned_allowed` - (Required) Whether GitHub-owned actions are allowed in the organization. +* `patterns_allowed` - (Optional) Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, monalisa/octocat@*, monalisa/octocat@v2, monalisa/*." +* `verified_allowed` - (Optional) Whether actions in GitHub Marketplace from verified creators are allowed. Set to true to allow all GitHub Marketplace actions by verified creators. + +### Enabled Repositories Config + +The `enabled_repositories_config` block supports the following: + +* `repository_ids` - (Required) List of repository IDs to enable for GitHub Actions. + +## Import + +This resource can be imported using the name of the GitHub organization: + +``` +$ terraform import github_actions_organization_permissions.test github_organization_name +``` diff --git a/templates/resources/actions_organization_secret.md.tmpl b/templates/resources/actions_organization_secret.md.tmpl new file mode 100644 index 0000000000..ba8067d9e4 --- /dev/null +++ b/templates/resources/actions_organization_secret.md.tmpl @@ -0,0 +1,69 @@ +--- +page_title: "GitHub: github_actions_organization_secret" +description: |- + Creates and manages an Action Secret within a GitHub organization +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_organization_secret + +This resource allows you to create and manage GitHub Actions secrets within your GitHub organization. You must have write access to a repository to use this resource. + +Secret values are encrypted using the [Go '/crypto/box' module](https://godoc.org/golang.org/x/crypto/nacl/box) which is interoperable with [libsodium](https://libsodium.gitbook.io/doc/). Libsodium is used by GitHub to decrypt secret values. + +For the purposes of security, the contents of the `plaintext_value` field have been marked as `sensitive` to Terraform, but it is important to note that **this does not hide it from state files**. You should treat state as sensitive always. It is also advised that you do not store plaintext values in your code but rather populate the `encrypted_value` using fields from a resource, data source or variable as, while encrypted in state, these will be easily accessible in your code. See below for an example of this abstraction. + +## Example Usage + +{{tffile "examples/resources/actions_organization_secret/example_1.tf"}} + +{{tffile "examples/resources/actions_organization_secret/example_2.tf"}} + +## Example Lifecycle Ignore Changes + +This resource supports using the `lifecycle` `ignore_changes` block on `remote_updated_at` to support use cases where a secret value is created using a placeholder value and then modified after creation outside the scope of Terraform. This approach ensures only the initial placeholder value is referenced in your code and in the resulting state file. + +{{tffile "examples/resources/actions_organization_secret/example_3.tf"}} + +## Argument Reference + +The following arguments are supported: + +- `secret_name` - (Required) Name of the secret. +- `key_id` - (Optional) ID of the public key used to encrypt the secret. This should be provided when setting `encrypted_value`; if it isn't then the current public key will be looked up, which could cause a missmatch. This conflicts with `plaintext_value`. +- `encrypted_value` - (Optional) Encrypted value of the secret using the GitHub public key in Base64 format. +- `plaintext_value` - (Optional) Plaintext value of the secret to be encrypted. +- `visibility` - (Required) Configures the access that repositories have to the organization secret; must be one of `all`, `private`, or `selected`. +- `selected_repository_ids` - (Optional) An array of repository IDs that can access the organization variable; this requires `visibility` to be set to `selected`. +- `destroy_on_drift` - (**DEPRECATED**) (Optional) This is ignored as drift detection is built into the resource. + +~> **Note**: One of either `encrypted_value` or `plaintext_value` must be specified. + +## Attributes Reference + +- `created_at` - Date the secret was created. +- `updated_at` - Date the secret was last updated by the provider. +- `remote_updated_at` - Date the secret was last updated in GitHub. + +## Import + +This resource can be imported using the secret name as the ID. + +~> **Note**: When importing secrets, the `plaintext_value` or `encrypted_value` fields will not be populated in the state. You may need to ignore changes for these as a workaround if you're not planning on updating the secret through Terraform. + +### Import Block + +The following import imports a GitHub actions organization secret named `mysecret` to a `github_actions_organization_secret` resource named `example`. + +{{tffile "examples/resources/actions_organization_secret/example_4.tf"}} + +### Import Command + +The following command imports a GitHub actions organization secret named `mysecret` to a `github_actions_organization_secret` resource named `example`. + +```shell +terraform import github_actions_organization_secret.example mysecret +``` diff --git a/templates/resources/actions_organization_secret_repositories.md.tmpl b/templates/resources/actions_organization_secret_repositories.md.tmpl new file mode 100644 index 0000000000..6a5c031619 --- /dev/null +++ b/templates/resources/actions_organization_secret_repositories.md.tmpl @@ -0,0 +1,44 @@ +--- +page_title: "GitHub: github_actions_organization_secret_repositories" +description: |- + Manages repository allow list for an Actions Secret within a GitHub organization. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_organization_secret_repositories + +This resource allows you to manage the repositories allowed to access an actions secret within your GitHub organization. You must have write access to an organization secret to use this resource. + +This resource is only applicable when `visibility` of the existing organization secret has been set to `selected`. + +## Example Usage + +{{tffile "examples/resources/actions_organization_secret_repositories/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +- `secret_name` - (Required) Name of the actions organization secret. +- `selected_repository_ids` - (Required) List of IDs for the repositories that should be able to access the secret. + +## Import + +This resource can be imported using the secret name as the ID. + +### Import Block + +The following import block imports the repositories able to access the actions organization secret named `mysecret` to a `github_actions_organization_secret_repositories` resource named `example`. + +{{tffile "examples/resources/actions_organization_secret_repositories/example_2.tf"}} + +### Import Command + +The following command imports the repositories able to access the actions organization secret named `mysecret` to a `github_actions_organization_secret_repositories` resource named `example`. + +```shell +terraform import github_actions_organization_secret_repositories.example mysecret +``` diff --git a/templates/resources/actions_organization_secret_repository.md.tmpl b/templates/resources/actions_organization_secret_repository.md.tmpl new file mode 100644 index 0000000000..1127dea1a8 --- /dev/null +++ b/templates/resources/actions_organization_secret_repository.md.tmpl @@ -0,0 +1,44 @@ +--- +page_title: "GitHub: github_actions_organization_secret_repository" +description: |- + Add access for a repository to an Actions Secret within a GitHub organization. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_organization_secret_repository + +This resource adds permission for a repository to use an actions secret within your GitHub organization. You must have write access to an organization secret to use this resource. + +This resource is only applicable when `visibility` of the existing organization secret has been set to `selected`. + +## Example Usage + +{{tffile "examples/resources/actions_organization_secret_repository/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +- `secret_name` - (Required) Name of the actions organization secret. +- `repository_id` - (Required) ID of the repository that should be able to access the secret. + +## Import + +This resource can be imported using an ID made of the secret name and repository name separated by a `:`. + +### Import Block + +The following import block imports the access of repository ID `123456` for the actions organization secret named `mysecret` to a `github_actions_organization_secret_repository` resource named `example`. + +{{tffile "examples/resources/actions_organization_secret_repository/example_2.tf"}} + +### Import Command + +The following command imports the access of repository ID `123456` for the actions organization secret named `mysecret` to a `github_actions_organization_secret_repository` resource named `example`. + +```shell +terraform import github_actions_organization_secret_repository.example mysecret:123456 +``` diff --git a/templates/resources/actions_organization_variable.md.tmpl b/templates/resources/actions_organization_variable.md.tmpl new file mode 100644 index 0000000000..c921b42f30 --- /dev/null +++ b/templates/resources/actions_organization_variable.md.tmpl @@ -0,0 +1,51 @@ +--- +page_title: "GitHub: github_actions_organization_variable" +description: |- + Creates and manages an Action variable within a GitHub organization +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_organization_variable + +This resource allows you to create and manage GitHub Actions variables within your GitHub organization. You must have write access to a repository to use this resource. + +## Example Usage + +{{tffile "examples/resources/actions_organization_variable/example_1.tf"}} + +{{tffile "examples/resources/actions_organization_variable/example_2.tf"}} + +## Argument Reference + +The following arguments are supported: + +- `variable_name` - (Required) Name of the variable. +- `value` - (Required) Value of the variable. +- `visibility` - (Required) Configures the access that repositories have to the organization variable; must be one of `all`, `private`, or `selected`. +- `selected_repository_ids` - (Optional) An array of repository IDs that can access the organization variable; this requires `visibility` to be set to `selected`. + +## Attributes Reference + +- `created_at` - Date the variable was created. +- `updated_at` - Date the variable was last updated. + +## Import + +This resource can be imported using the variable name as the ID. + +### Import Block + +The following import imports a GitHub actions organization variable named `myvariable`to a `github_actions_organization_variable` resource named `example`. + +{{tffile "examples/resources/actions_organization_variable/example_3.tf"}} + +### Import Command + +The following command imports a GitHub actions organization variable named `myvariable` to a `github_actions_organization_variable` resource named `example`. + +```shell +terraform import github_actions_organization_variable.example myvariable +``` diff --git a/templates/resources/actions_organization_variable_repositories.md.tmpl b/templates/resources/actions_organization_variable_repositories.md.tmpl new file mode 100644 index 0000000000..7e7bd309c4 --- /dev/null +++ b/templates/resources/actions_organization_variable_repositories.md.tmpl @@ -0,0 +1,44 @@ +--- +page_title: "GitHub: github_actions_organization_variable_repositories" +description: |- + Manages repository allow list for an Actions Variable within a GitHub organization. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_organization_variable_repositories + +This resource allows you to manage the repositories allowed to access an actions variable within your GitHub organization. You must have write access to an organization variable to use this resource. + +This resource is only applicable when `visibility` of the existing organization variable has been set to `selected`. + +## Example Usage + +{{tffile "examples/resources/actions_organization_variable_repositories/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +- `variable_name` - (Required) Name of the actions organization variable. +- `selected_repository_ids` - (Required) List of IDs for the repositories that should be able to access the variable. + +## Import + +This resource can be imported using the variable name as the ID. + +### Import Block + +The following import block imports the repositories able to access the actions organization variable named `myvariable` to a `github_actions_organization_variable_repositories` resource named `example`. + +{{tffile "examples/resources/actions_organization_variable_repositories/example_2.tf"}} + +### Import Command + +The following command imports the repositories able to access the actions organization variable named `myvariable` to a `github_actions_organization_variable_repositories` resource named `example`. + +```shell +terraform import github_actions_organization_variable_repositories.example myvariable +``` diff --git a/templates/resources/actions_organization_variable_repository.md.tmpl b/templates/resources/actions_organization_variable_repository.md.tmpl new file mode 100644 index 0000000000..fe22991177 --- /dev/null +++ b/templates/resources/actions_organization_variable_repository.md.tmpl @@ -0,0 +1,44 @@ +--- +page_title: "GitHub: github_actions_organization_variable_repository" +description: |- + Add access for a repository to an Actions Variable within a GitHub organization. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_organization_variable_repository + +This resource adds permission for a repository to use an actions variables within your GitHub organization. You must have write access to an organization variable to use this resource. + +This resource is only applicable when `visibility` of the existing organization variable has been set to `selected`. + +## Example Usage + +{{tffile "examples/resources/actions_organization_variable_repository/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +- `variable_name` - (Required) Name of the actions organization variable. +- `repository_id` - (Required) ID of the repository that should be able to access the variable. + +## Import + +This resource can be imported using an ID made of the variable name and repository name separated by a `:`. + +### Import Block + +The following import block imports the access of repository ID `123456` for the actions organization variable named `myvariable` to a `github_actions_organization_variable_repository` resource named `example`. + +{{tffile "examples/resources/actions_organization_variable_repository/example_2.tf"}} + +### Import Command + +The following command imports the access of repository ID `123456` for the actions organization variable named `myvariable` to a `github_actions_organization_variable_repository` resource named `example`. + +```shell +terraform import github_actions_organization_variable_repository.example myvariable:123456 +``` diff --git a/templates/resources/actions_organization_workflow_permissions.md.tmpl b/templates/resources/actions_organization_workflow_permissions.md.tmpl new file mode 100644 index 0000000000..7f2a3a0162 --- /dev/null +++ b/templates/resources/actions_organization_workflow_permissions.md.tmpl @@ -0,0 +1,52 @@ +--- +page_title: "GitHub: github_actions_organization_workflow_permissions" +description: |- + Manages GitHub Actions workflow permissions for a GitHub Organization. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_organization_workflow_permissions + +This resource allows you to manage GitHub Actions workflow permissions for a GitHub Organization account. This controls the default permissions granted to the GITHUB_TOKEN when running workflows and whether GitHub Actions can approve pull request reviews. + +You must have organization admin access to use this resource. + +## Example Usage + +{{tffile "examples/resources/actions_organization_workflow_permissions/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `organization_slug` - (Required) The slug of the organization. + +* `default_workflow_permissions` - (Optional) The default workflow permissions granted to the GITHUB_TOKEN when running workflows. Can be `read` or `write`. Defaults to `read`. + +* `can_approve_pull_request_reviews` - (Optional) Whether GitHub Actions can approve pull request reviews. Defaults to `false`. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - The organization slug. + +## Import + +Organization Actions workflow permissions can be imported using the organization slug: + +```sh +terraform import github_actions_organization_workflow_permissions.example my-organization +``` + +## Notes + +~> **Note:** This resource requires a GitHub Organization account and organization admin permissions. + +When this resource is destroyed, the workflow permissions will be reset to safe defaults: + +* `default_workflow_permissions` = `read` +* `can_approve_pull_request_reviews` = `false` diff --git a/templates/resources/actions_repository_access_level.md.tmpl b/templates/resources/actions_repository_access_level.md.tmpl new file mode 100644 index 0000000000..d3139fd9f0 --- /dev/null +++ b/templates/resources/actions_repository_access_level.md.tmpl @@ -0,0 +1,32 @@ +--- +page_title: "GitHub: github_actions_repository_access_level" +description: |- + Manages Actions and Reusable Workflow access for a GitHub repository +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_repository_access_level + +This resource allows you to set the access level of a non-public repositories actions and reusable workflows for use in other repositories. You must have admin access to a repository to use this resource. + +## Example Usage + +{{tffile "examples/resources/actions_repository_access_level/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `repository` - (Required) The GitHub repository +* `access_level` - (Required) Where the actions or reusable workflows of the repository may be used. Possible values are `none`, `user`, `organization`, or `enterprise`. + +## Import + +This resource can be imported using the name of the GitHub repository: + +``` +$ terraform import github_actions_repository_access_level.test my-repository +``` diff --git a/templates/resources/actions_repository_oidc_subject_claim_customization_template.md.tmpl b/templates/resources/actions_repository_oidc_subject_claim_customization_template.md.tmpl new file mode 100644 index 0000000000..a5d83929d5 --- /dev/null +++ b/templates/resources/actions_repository_oidc_subject_claim_customization_template.md.tmpl @@ -0,0 +1,42 @@ +--- +page_title: "GitHub: github_actions_repository_oidc_subject_claim_customization_template" +description: |- + Creates and manages an OpenID Connect subject claim customization template for a repository +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_repository_oidc_subject_claim_customization_template + +This resource allows you to create and manage an OpenID Connect subject claim customization template for a GitHub repository. + +More information on integrating GitHub with cloud providers using OpenID Connect and a list of available claims is available in the [Actions documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect). + +The following table lists the behaviour of `use_default`: + +| `use_default` | `include_claim_keys` | Template used | +|---------------|----------------------|-----------------------------------------------------------| +| `true` | Unset | GitHub's default | +| `false` | Set | `include_claim_keys` | +| `false` | Unset | Organization's default if set, otherwise GitHub's default | + +## Example Usage + +{{tffile "examples/resources/actions_repository_oidc_subject_claim_customization_template/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `use_default` - (Required) Whether to use the default template or not. If `true`, `include_claim_keys` must not be set. +* `include_claim_keys` - (Optional) A list of OpenID Connect claims. + +## Import + +This resource can be imported using the repository's name. + +``` +$ terraform import github_actions_repository_oidc_subject_claim_customization_template.test example_repository +``` diff --git a/templates/resources/actions_repository_permissions.md.tmpl b/templates/resources/actions_repository_permissions.md.tmpl new file mode 100644 index 0000000000..bae6493058 --- /dev/null +++ b/templates/resources/actions_repository_permissions.md.tmpl @@ -0,0 +1,43 @@ +--- +page_title: "GitHub: github_actions_repository_permissions" +description: |- + Enables and manages Actions permissions for a GitHub repository +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_repository_permissions + +This resource allows you to enable and manage GitHub Actions permissions for a given repository. You must have admin access to an repository to use this resource. + +## Example Usage + +{{tffile "examples/resources/actions_repository_permissions/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `repository` - (Required) The GitHub repository +* `allowed_actions` - (Optional) The permissions policy that controls the actions that are allowed to run. Can be one of: `all`, `local_only`, or `selected`. +* `enabled` - (Optional) Should GitHub actions be enabled on this repository? +* `allowed_actions_config` - (Optional) Sets the actions that are allowed in an repository. Only available when `allowed_actions` = `selected`. See [Allowed Actions Config](#allowed-actions-config) below for details. +* `sha_pinning_required` - (Optional) Whether pinning to a specific SHA is required for all actions and reusable workflows in the repository. + +### Allowed Actions Config + +The `allowed_actions_config` block supports the following: + +* `github_owned_allowed` - (Required) Whether GitHub-owned actions are allowed in the repository. +* `patterns_allowed` - (Optional) Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, monalisa/octocat@*, monalisa/octocat@v2, monalisa/*." +* `verified_allowed` - (Optional) Whether actions in GitHub Marketplace from verified creators are allowed. Set to true to allow all GitHub Marketplace actions by verified creators. + +## Import + +This resource can be imported using the name of the GitHub repository: + +``` +$ terraform import github_actions_repository_permissions.test my-repository +``` diff --git a/templates/resources/actions_runner_group.md.tmpl b/templates/resources/actions_runner_group.md.tmpl new file mode 100644 index 0000000000..8dfedce4ba --- /dev/null +++ b/templates/resources/actions_runner_group.md.tmpl @@ -0,0 +1,49 @@ +--- +page_title: "GitHub: github_actions_runner_group" +description: |- + Creates and manages an Actions Runner Group within a GitHub organization +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_runner_group + +This resource allows you to create and manage GitHub Actions runner groups within your GitHub enterprise organizations. You must have admin access to an organization to use this resource. + +## Example Usage + +{{tffile "examples/resources/actions_runner_group/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) Name of the runner group +* `restricted_to_workflows` - (Optional) If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false. +* `selected_repository_ids` - (Optional) IDs of the repositories which should be added to the runner group +* `selected_workflows` - (Optional) List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true. +* `visibility` - (Optional) Visibility of a runner group. Whether the runner group can include `all`, `selected`, or `private` repositories. A value of `private` is not currently supported due to limitations in the GitHub API. +* `allows_public_repositories` - (Optional) Whether public repositories can be added to the runner group. Defaults to false. + +## Attributes Reference + +* `allows_public_repositories` - Whether public repositories can be added to the runner group +* `default` - Whether this is the default runner group +* `etag` - An etag representing the runner group object +* `inherited` - Whether the runner group is inherited from the enterprise level +* `runners_url` - The GitHub API URL for the runner group's runners +* `selected_repository_ids` - List of repository IDs that can access the runner group +* `selected_repositories_url` - GitHub API URL for the runner group's repositories +* `visibility` - The visibility of the runner group +* `restricted_to_workflows` - If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false. +* `selected_workflows` - List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true. + +## Import + +This resource can be imported using the ID of the runner group: + +``` +$ terraform import github_actions_runner_group.test 7 +``` diff --git a/templates/resources/actions_secret.md.tmpl b/templates/resources/actions_secret.md.tmpl new file mode 100644 index 0000000000..89df875955 --- /dev/null +++ b/templates/resources/actions_secret.md.tmpl @@ -0,0 +1,67 @@ +--- +page_title: "GitHub: github_actions_secret" +description: |- + Creates and manages an Action Secret within a GitHub repository +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_secret + +This resource allows you to create and manage GitHub Actions secrets within your GitHub repositories. You must have write access to a repository to use this resource. + +Secret values are encrypted using the [Go '/crypto/box' module](https://godoc.org/golang.org/x/crypto/nacl/box) which is interoperable with [libsodium](https://libsodium.gitbook.io/doc/). Libsodium is used by GitHub to decrypt secret values. + +For the purposes of security, the contents of the `plaintext_value` field have been marked as `sensitive` to Terraform, but it is important to note that **this does not hide it from state files**. You should treat state as sensitive always. It is also advised that you do not store plaintext values in your code but rather populate the `encrypted_value` using fields from a resource, data source or variable as, while encrypted in state, these will be easily accessible in your code. See below for an example of this abstraction. + +## Example Usage + +{{tffile "examples/resources/actions_secret/example_1.tf"}} + +## Example Lifecycle Ignore Changes + +This resource supports using the `lifecycle` `ignore_changes` block on `remote_updated_at` to support use cases where a secret value is created using a placeholder value and then modified after creation outside the scope of Terraform. This approach ensures only the initial placeholder value is referenced in your code and in the resulting state file. + +{{tffile "examples/resources/actions_secret/example_2.tf"}} + +## Argument Reference + +The following arguments are supported: + +- `repository` - (Required) Name of the repository. +- `secret_name` - (Required) Name of the secret. +- `key_id` - (Optional) ID of the public key used to encrypt the secret. This should be provided when setting `encrypted_value`; if it isn't then the current public key will be looked up, which could cause a missmatch. This conflicts with `plaintext_value`. +- `encrypted_value` - (Optional) Encrypted value of the secret using the GitHub public key in Base64 format. +- `plaintext_value` - (Optional) Plaintext value of the secret to be encrypted. +- `destroy_on_drift` - (**DEPRECATED**) (Optional) This is ignored as drift detection is built into the resource. + +~> **Note**: One of either `encrypted_value` or `plaintext_value` must be specified. + +## Attributes Reference + +- `repository_id` - ID of the repository. +- `created_at` - Date the secret was created. +- `updated_at` - Date the secret was last updated by the provider. +- `remote_updated_at` - Date the secret was last updated in GitHub. + +## Import + +This resource can be imported using an ID made of the repository name, and secret name separated by a `:`. + +~> **Note**: When importing secrets, the `plaintext_value` or `encrypted_value` fields will not be populated in the state. You may need to ignore changes for these as a workaround if you're not planning on updating the secret through Terraform. + +### Import Block + +The following import imports a GitHub actions secret named `mysecret` for the repo `myrepo` to a `github_actions_secret` resource named `example`. + +{{tffile "examples/resources/actions_secret/example_3.tf"}} + +### Import Command + +The following command imports a GitHub actions secret named `mysecret` for the repo `myrepo` to a `github_actions_secret` resource named `example`. + +```shell +terraform import github_actions_secret.example myrepo:mysecret +``` diff --git a/templates/resources/actions_variable.md.tmpl b/templates/resources/actions_variable.md.tmpl new file mode 100644 index 0000000000..e12ae49d87 --- /dev/null +++ b/templates/resources/actions_variable.md.tmpl @@ -0,0 +1,49 @@ +--- +page_title: "GitHub: github_actions_variable" +description: |- + Creates and manages an Action variable within a GitHub repository +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_actions_variable + +This resource allows you to create and manage GitHub Actions variables within your GitHub repositories. You must have write access to a repository to use this resource. + +## Example Usage + +{{tffile "examples/resources/actions_variable/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +- `repository` - (Required) Name of the repository. +- `variable_name` - (Required) Name of the variable. +- `value` - (Required) Value of the variable. + +## Attributes Reference + +- `repository_id` - ID of the repository. +- `created_at` - Date the variable was created. +- `updated_at` - Date the variable was last updated. + +## Import + +This resource can be imported using an ID made of the repository name, and variable name separated by a `:`. + +### Import Block + +The following import imports a GitHub actions variable named `myvariable` for the repo `myrepo` to a `github_actions_variable` resource named `example`. + +{{tffile "examples/resources/actions_variable/example_2.tf"}} + +### Import Command + +The following command imports a GitHub actions variable named `myvariable` for the repo `myrepo` to a `github_actions_variable` resource named `example`. + +```shell +terraform import github_actions_variable.example myrepo:myvariable +``` diff --git a/templates/resources/app_installation_repositories.md.tmpl b/templates/resources/app_installation_repositories.md.tmpl new file mode 100644 index 0000000000..fd70df1b82 --- /dev/null +++ b/templates/resources/app_installation_repositories.md.tmpl @@ -0,0 +1,40 @@ +--- +page_title: "GitHub: github_app_installation_repositories" +description: |- + Manages the associations between app installations and repositories. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_app_installation_repositories + +~> **Note**: This resource is not compatible with the GitHub App Installation authentication method. + +This resource manages relationships between app installations and repositories in your GitHub organization or your user account. + +Creating this resource installs a particular app on multiple repositories. + +The app installation and the repositories must all belong to the same organization or user account on GitHub. Note: you can review your organization's installations by the following the instructions at this [link](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/reviewing-your-organizations-installed-integrations) or for your user account at this [link](https://docs.github.com/en/apps/using-github-apps/reviewing-and-modifying-installed-github-apps). + +## Example Usage + +{{tffile "examples/resources/app_installation_repositories/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `installation_id` - (Required) The GitHub app installation id. +* `selected_repositories` - (Required) A list of repository names to install the app on. + +~> **Note**: Due to how GitHub implements app installations, apps cannot be installed with no repositories selected. Therefore deleting this resource will leave one repository with the app installed. Manually uninstall the app or set the installation to all repositories via the GUI as after deleting this resource. + +## Import + +GitHub App Installation Repositories can be imported using an ID made up of `installation_id`, e.g. + +``` +$ terraform import github_app_installation_repositories.some_app_repos 1234567 +``` diff --git a/templates/resources/app_installation_repository.md.tmpl b/templates/resources/app_installation_repository.md.tmpl new file mode 100644 index 0000000000..172c0c2d6e --- /dev/null +++ b/templates/resources/app_installation_repository.md.tmpl @@ -0,0 +1,38 @@ +--- +page_title: "GitHub: github_app_installation_repository" +description: |- + Manages the associations between app installations and repositories. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_app_installation_repository + +~> **Note**: This resource is not compatible with the GitHub App Installation authentication method. + +This resource manages relationships between app installations and repositories in your GitHub organization or your user account. + +Creating this resource installs a particular app on a particular repository. + +The app installation and the repository must both belong to the same organization or user account on GitHub. Note: you can review your organization's installations by the following the instructions at this [link](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/reviewing-your-organizations-installed-integrations) or for your user account at this [link](https://docs.github.com/en/apps/using-github-apps/reviewing-and-modifying-installed-github-apps). + +## Example Usage + +{{tffile "examples/resources/app_installation_repository/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `installation_id` - (Required) The GitHub app installation id. +* `repository` - (Required) The repository to install the app on. + +## Import + +GitHub App Installation Repository can be imported using an ID made up of `installation_id:repository`, e.g. + +``` +$ terraform import github_app_installation_repository.terraform_repo 1234567:terraform +``` diff --git a/templates/resources/branch.md.tmpl b/templates/resources/branch.md.tmpl new file mode 100644 index 0000000000..777a4aac77 --- /dev/null +++ b/templates/resources/branch.md.tmpl @@ -0,0 +1,63 @@ +--- +page_title: "GitHub: github_branch" +description: |- + Creates and manages branches within GitHub repositories. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_branch + +This resource allows you to create and manage branches within your repository. + +Additional constraints can be applied to ensure your branch is created from another branch or commit. + +## Example Usage + +{{tffile "examples/resources/branch/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `repository` - (Required) The GitHub repository name. + +* `branch` - (Required) The repository branch to create. + +* `source_branch` - (Optional) The branch name to start from. Defaults to `main`. + +* `source_sha` - (Optional) The commit hash to start from. Defaults to the tip of `source_branch`. If provided, `source_branch` is ignored. + +## Attribute Reference + +The following additional attributes are exported: + +* `source_sha` - A string storing the commit this branch was started from. Not populated when imported. + +* `etag` - An etag representing the Branch object. + +* `ref` - A string representing a branch reference, in the form of `refs/heads/`. + +* `sha` - A string storing the reference's `HEAD` commit's SHA1. + +## Import + +GitHub Branch can be imported using an ID made up of `repository:branch`, e.g. + +``` +$ terraform import github_branch.terraform terraform:main +``` + +Importing github branch into an instance object (when using a for each block to manage multiple branches) + +``` +$ terraform import github_branch.terraform["terraform"] terraform:main +``` + +Optionally, a source branch may be specified using an ID of `repository:branch:source_branch`. This is useful for importing branches that do not branch directly off main. + +``` +$ terraform import github_branch.terraform terraform:feature-branch:dev +``` diff --git a/templates/resources/branch_default.md.tmpl b/templates/resources/branch_default.md.tmpl new file mode 100644 index 0000000000..641e1547b9 --- /dev/null +++ b/templates/resources/branch_default.md.tmpl @@ -0,0 +1,43 @@ +--- +page_title: "GitHub: github_branch_default" +description: |- + Provides a GitHub branch default for a given repository. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_branch_default + +Provides a GitHub branch default resource. + +This resource allows you to set the default branch for a given repository. + +Note that use of this resource is incompatible with the `default_branch` option of the `github_repository` resource. Using both will result in plans always showing a diff. + +## Example Usage + +Basic usage: + +{{tffile "examples/resources/branch_default/example_1.tf"}} + +Renaming to a branch that doesn't exist: + +{{tffile "examples/resources/branch_default/example_2.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `repository` - (Required) The GitHub repository +* `branch` - (Required) The branch (e.g. `main`) +* `rename` - (Optional) Indicate if it should rename the branch rather than use an existing branch. Defaults to `false`. + +## Import + +GitHub Branch Defaults can be imported using an ID made up of `repository`, e.g. + +``` +$ terraform import github_branch_default.branch_default my-repo +``` diff --git a/templates/resources/branch_protection.md.tmpl b/templates/resources/branch_protection.md.tmpl new file mode 100644 index 0000000000..e879ea68f2 --- /dev/null +++ b/templates/resources/branch_protection.md.tmpl @@ -0,0 +1,75 @@ +--- +page_title: "GitHub: github_branch_protection" +description: |- + Protects a GitHub branch. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_branch\_protection + +Protects a GitHub branch. + +This resource allows you to configure branch protection for repositories in your organization. When applied, the branch will be protected from forced pushes and deletion. Additional constraints, such as required status checks or restrictions on users, teams, and apps, can also be configured. + +Note: for the `push_allowances` a given user or team must have specific write access to the repository. If specific write access not provided, github will reject the given actor, which will be the cause of terraform drift. + +## Example Usage + +{{tffile "examples/resources/branch_protection/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `repository_id` - (Required) The name or node ID of the repository associated with this branch protection rule. +* `pattern` - (Required) Identifies the protection rule pattern. +* `enforce_admins` - (Optional) Boolean, setting this to `true` enforces status checks for repository administrators. +* `require_signed_commits` - (Optional) Boolean, setting this to `true` requires all commits to be signed with GPG. +* `required_linear_history` - (Optional) Boolean, setting this to `true` enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch +* `require_conversation_resolution` - (Optional) Boolean, setting this to `true` requires all conversations on code must be resolved before a pull request can be merged. +* `required_status_checks` - (Optional) Enforce restrictions for required status checks. See [Required Status Checks](#required-status-checks) below for details. +* `required_pull_request_reviews` - (Optional) Enforce restrictions for pull request reviews. See [Required Pull Request Reviews](#required-pull-request-reviews) below for details. +* `restrict_pushes` - (Optional) Restrict pushes to matching branches. See [Restrict Pushes](#restrict-pushes) below for details. +* `force_push_bypassers` - (Optional) The list of actor Names/IDs that are allowed to bypass force push restrictions. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams. If the list is not empty, `allows_force_pushes` should be set to `false`. +* `allows_deletions` - (Optional) Boolean, setting this to `true` to allow the branch to be deleted. +* `allows_force_pushes` - (Optional) Boolean, setting this to `true` to allow force pushes on the branch to everyone. Set it to `false` if you specify `force_push_bypassers`. +* `lock_branch` - (Optional) Boolean, Setting this to `true` will make the branch read-only and preventing any pushes to it. Defaults to `false` + +### Required Status Checks + +`required_status_checks` supports the following arguments: + +* `strict`: (Optional) Require branches to be up to date before merging. Defaults to `false`. +* `contexts`: (Optional) The list of status checks to require in order to merge into this branch. No status checks are required by default. + +~> Note: This attribute can contain multiple string patterns. If specified, usual value is the [job name](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idname). Otherwise, the [job id](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idname) is defaulted to. For workflows that use matrixes, append the matrix name to the value using the following pattern `([, ])`. Matrixes should be specified based on the order of matrix properties in the workflow file. See [GitHub Documentation]("https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#using-a-matrix-strategy") for more information. For workflows that use reusable workflows, the pattern is ` / `. This can extend multiple levels. + +### Required Pull Request Reviews + +`required_pull_request_reviews` supports the following arguments: + +* `dismiss_stale_reviews`: (Optional) Dismiss approved reviews automatically when a new commit is pushed. Defaults to `false`. +* `restrict_dismissals`: (Optional) Restrict pull request review dismissals. +* `dismissal_restrictions`: (Optional) The list of actor Names/IDs with dismissal access. If not empty, `restrict_dismissals` is ignored. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams. +* `pull_request_bypassers`: (Optional) The list of actor Names/IDs that are allowed to bypass pull request requirements. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams. +* `require_code_owner_reviews`: (Optional) Require an approved review in pull requests including files with a designated code owner. Defaults to `false`. +* `required_approving_review_count`: (Optional) Require x number of approvals to satisfy branch protection requirements. If this is specified it must be a number between 0-6. This requirement matches GitHub's API, see the upstream [documentation](https://developer.github.com/v3/repos/branches/#parameters-1) for more information. (https://developer.github.com/v3/repos/branches/#parameters-1) for more information. +* `require_last_push_approval`: (Optional) Require that The most recent push must be approved by someone other than the last pusher. Defaults to `false` + +### Restrict Pushes + +`restrict_pushes` supports the following arguments: + +* `blocks_creations` - (Optional) Boolean, setting this to `false` allows people, teams, or apps to create new branches matching this rule. Defaults to `true`. +* `push_allowances` - (Optional) A list of actor Names/IDs that may push to the branch. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams. Organization administrators, repository administrators, and users with the Maintain role on the repository can always push when all other requirements have passed. + +## Import + +GitHub Branch Protection can be imported using an ID made up of `repository:pattern`, e.g. + +``` +$ terraform import github_branch_protection.terraform terraform:main +``` diff --git a/templates/resources/branch_protection_v3.md.tmpl b/templates/resources/branch_protection_v3.md.tmpl new file mode 100644 index 0000000000..fb8a5c3959 --- /dev/null +++ b/templates/resources/branch_protection_v3.md.tmpl @@ -0,0 +1,86 @@ +--- +page_title: "GitHub: github_branch_protection_v3" +description: |- + Protects a GitHub branch using the v3 / REST implementation. The `github_branch_protection` resource has moved to the GraphQL API, while this resource will continue to leverage the REST API +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_branch_protection_v3 + +Protects a GitHub branch. + +The `github_branch_protection` resource has moved to the GraphQL API, while this resource will continue to leverage the REST API. + +This resource allows you to configure branch protection for repositories in your organization. When applied, the branch will be protected from forced pushes and deletion. Additional constraints, such as required status checks or restrictions on users, teams, and apps, can also be configured. + +## Example Usage + +{{tffile "examples/resources/branch_protection_v3/example_1.tf"}} + +{{tffile "examples/resources/branch_protection_v3/example_2.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `repository` - (Required) The GitHub repository name. +* `branch` - (Required) The Git branch to protect. +* `enforce_admins` - (Optional) Boolean, setting this to `true` enforces status checks for repository administrators. +* `require_signed_commits` - (Optional) Boolean, setting this to `true` requires all commits to be signed with GPG. +* `require_conversation_resolution` - (Optional) Boolean, setting this to `true` requires all conversations on code must be resolved before a pull request can be merged. +* `required_status_checks` - (Optional) Enforce restrictions for required status checks. See [Required Status Checks](#required-status-checks) below for details. +* `required_pull_request_reviews` - (Optional) Enforce restrictions for pull request reviews. See [Required Pull Request Reviews](#required-pull-request-reviews) below for details. +* `restrictions` - (Optional) Enforce restrictions for the users and teams that may push to the branch. See [Restrictions](#restrictions) below for details. + +### Required Status Checks + +`required_status_checks` supports the following arguments: + +* `strict`: (Optional) Require branches to be up to date before merging. Defaults to `false`. +* `contexts`: [**DEPRECATED**] (Optional) The list of status checks to require in order to merge into this branch. No status checks are required by default. + +~> Note: This attribute can contain multiple string patterns. If specified, usual value is the [job name](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idname). Otherwise, the [job id](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idname) is defaulted to. For workflows that use matrixes, append the matrix name to the value using the following pattern `([, ])`. Matrixes should be specified based on the order of matrix properties in the workflow file. See [GitHub Documentation]("https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#using-a-matrix-strategy") for more information. For workflows that use reusable workflows, the pattern is ` / `. This can extend multiple levels. + +* `checks`: (Optional) The list of status checks to require in order to merge into this branch. No status checks are required by default. Checks should be strings containing the context and app_id like so "context:app_id". + +### Required Pull Request Reviews + +`required_pull_request_reviews` supports the following arguments: + +* `dismiss_stale_reviews`: (Optional) Dismiss approved reviews automatically when a new commit is pushed. Defaults to `false`. +* `dismissal_users`: (Optional) The list of user logins with dismissal access +* `dismissal_teams`: (Optional) The list of team slugs with dismissal access. Always use `slug` of the team, **not** its name. Each team already **has** to have access to the repository. +* `dismissal_apps`: (Optional) The list of app slugs with dismissal access. +* `require_code_owner_reviews`: (Optional) Require an approved review in pull requests including files with a designated code owner. Defaults to `false`. +* `required_approving_review_count`: (Optional) Require x number of approvals to satisfy branch protection requirements. If this is specified it must be a number between 0-6. This requirement matches GitHub's API, see the upstream [documentation](https://developer.github.com/v3/repos/branches/#parameters-1) for more information. +* `bypass_pull_request_allowances`: (Optional) Allow specific users, teams, or apps to bypass pull request requirements. See [Bypass Pull Request Allowances](#bypass-pull-request-allowances) below for details. +* `require_last_push_approval`: (Optional) Require that the most recent push must be approved by someone other than the last pusher. Defaults to `false` + +### Restrictions + +`restrictions` supports the following arguments: + +* `users`: (Optional) The list of user logins with push access. +* `teams`: (Optional) The list of team slugs with push access. Always use `slug` of the team, **not** its name. Each team already **has** to have access to the repository. +* `apps`: (Optional) The list of app slugs with push access. + +`restrictions` is only available for organization-owned repositories. + +### Bypass Pull Request Allowances + +`bypass_pull_request_allowances` supports the following arguments: + +- `users`: (Optional) The list of user logins allowed to bypass pull request requirements. +- `teams`: (Optional) The list of team slugs allowed to bypass pull request requirements. +- `apps`: (Optional) The list of app slugs allowed to bypass pull request requirements. + +## Import + +GitHub Branch Protection can be imported using an ID made up of `repository:branch`, e.g. + +``` +$ terraform import github_branch_protection_v3.terraform terraform:main +``` diff --git a/templates/resources/codespaces_organization_secret.md.tmpl b/templates/resources/codespaces_organization_secret.md.tmpl new file mode 100644 index 0000000000..70b63b94cd --- /dev/null +++ b/templates/resources/codespaces_organization_secret.md.tmpl @@ -0,0 +1,48 @@ +--- +page_title: "GitHub: github_codespaces_organization_secret" +description: |- + Creates and manages an Codespaces Secret within a GitHub organization +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_codespaces_organization_secret + +This resource allows you to create and manage GitHub Codespaces secrets within your GitHub organization. You must have write access to a repository to use this resource. + +Secret values are encrypted using the [Go '/crypto/box' module](https://godoc.org/golang.org/x/crypto/nacl/box) which is interoperable with [libsodium](https://libsodium.gitbook.io/doc/). Libsodium is used by GitHub to decrypt secret values. + +For the purposes of security, the contents of the `plaintext_value` field have been marked as `sensitive` to Terraform, but it is important to note that **this does not hide it from state files**. You should treat state as sensitive always. It is also advised that you do not store plaintext values in your code but rather populate the `encrypted_value` using fields from a resource, data source or variable as, while encrypted in state, these will be easily accessible in your code. See below for an example of this abstraction. + +## Example Usage + +{{tffile "examples/resources/codespaces_organization_secret/example_1.tf"}} + +{{tffile "examples/resources/codespaces_organization_secret/example_2.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `secret_name` - (Required) Name of the secret +* `encrypted_value` - (Optional) Encrypted value of the secret using the GitHub public key in Base64 format. +* `plaintext_value` - (Optional) Plaintext value of the secret to be encrypted +* `visibility` - (Required) Configures the access that repositories have to the organization secret. Must be one of `all`, `private`, `selected`. `selected_repository_ids` is required if set to `selected`. +* `selected_repository_ids` - (Optional) An array of repository ids that can access the organization secret. + +## Attributes Reference + +* `created_at` - Date of codespaces_secret creation. +* `updated_at` - Date of codespaces_secret update. + +## Import + +This resource can be imported using an ID made up of the secret name: + +``` +terraform import github_codespaces_organization_secret.test_secret test_secret_name +``` + +NOTE: the implementation is limited in that it won't fetch the value of the `plaintext_value` or `encrypted_value` fields when importing. You may need to ignore changes for these as a workaround. diff --git a/templates/resources/codespaces_organization_secret_repositories.md.tmpl b/templates/resources/codespaces_organization_secret_repositories.md.tmpl new file mode 100644 index 0000000000..43b543a182 --- /dev/null +++ b/templates/resources/codespaces_organization_secret_repositories.md.tmpl @@ -0,0 +1,36 @@ +--- +page_title: "GitHub: github_codespaces_organization_secret_repositories" +description: |- + Manages repository allow list for a Codespaces Secret within a GitHub organization +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_codespaces_organization_secret_repositories + +This resource allows you to manage repository allow list for existing GitHub Codespaces secrets within your GitHub organization. + +You must have write access to an organization secret to use this resource. + +This resource is only applicable when `visibility` of the existing organization secret has been set to `selected`. + +## Example Usage + +{{tffile "examples/resources/codespaces_organization_secret_repositories/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `secret_name` - (Required) Name of the existing secret +* `selected_repository_ids` - (Required) An array of repository ids that can access the organization secret. + +## Import + +This resource can be imported using an ID made up of the secret name: + +``` +$ terraform import github_codespaces_organization_secret_repositories.org_secret_repos existing_secret_name +``` diff --git a/templates/resources/codespaces_secret.md.tmpl b/templates/resources/codespaces_secret.md.tmpl new file mode 100644 index 0000000000..a0ac6449e2 --- /dev/null +++ b/templates/resources/codespaces_secret.md.tmpl @@ -0,0 +1,45 @@ +--- +page_title: "GitHub: github_codespaces_secret" +description: |- + Creates and manages an Codespaces Secret within a GitHub repository +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_codespaces_secret + +This resource allows you to create and manage GitHub Codespaces secrets within your GitHub repositories. You must have write access to a repository to use this resource. + +Secret values are encrypted using the [Go '/crypto/box' module](https://godoc.org/golang.org/x/crypto/nacl/box) which is interoperable with [libsodium](https://libsodium.gitbook.io/doc/). Libsodium is used by GitHub to decrypt secret values. + +For the purposes of security, the contents of the `plaintext_value` field have been marked as `sensitive` to Terraform, but it is important to note that **this does not hide it from state files**. You should treat state as sensitive always. It is also advised that you do not store plaintext values in your code but rather populate the `encrypted_value` using fields from a resource, data source or variable as, while encrypted in state, these will be easily accessible in your code. See below for an example of this abstraction. + +## Example Usage + +{{tffile "examples/resources/codespaces_secret/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `repository` - (Required) Name of the repository +* `secret_name` - (Required) Name of the secret +* `encrypted_value` - (Optional) Encrypted value of the secret using the GitHub public key in Base64 format. +* `plaintext_value` - (Optional) Plaintext value of the secret to be encrypted + +## Attributes Reference + +* `created_at` - Date of codespaces_secret creation. +* `updated_at` - Date of codespaces_secret update. + +## Import + +This resource can be imported using an ID made up of the `repository` and `secret_name`: + +``` +$ terraform import github_codespaces_secret.example_secret example_repository/example_secret_name +``` + +NOTE: the implementation is limited in that it won't fetch the value of the `plaintext_value` or `encrypted_value` fields when importing. You may need to ignore changes for these as a workaround. diff --git a/templates/resources/codespaces_user_secret.md.tmpl b/templates/resources/codespaces_user_secret.md.tmpl new file mode 100644 index 0000000000..81c7be73d0 --- /dev/null +++ b/templates/resources/codespaces_user_secret.md.tmpl @@ -0,0 +1,45 @@ +--- +page_title: "GitHub: github_codespaces_user_secret" +description: |- + Creates and manages an Codespaces Secret within a GitHub user +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_codespaces_user_secret + +This resource allows you to create and manage GitHub Codespaces secrets within your GitHub user. You must have write access to a repository to use this resource. + +Secret values are encrypted using the [Go '/crypto/box' module](https://godoc.org/golang.org/x/crypto/nacl/box) which is interoperable with [libsodium](https://libsodium.gitbook.io/doc/). Libsodium is used by GitHub to decrypt secret values. + +For the purposes of security, the contents of the `plaintext_value` field have been marked as `sensitive` to Terraform, but it is important to note that **this does not hide it from state files**. You should treat state as sensitive always. It is also advised that you do not store plaintext values in your code but rather populate the `encrypted_value` using fields from a resource, data source or variable as, while encrypted in state, these will be easily accessible in your code. See below for an example of this abstraction. + +## Example Usage + +{{tffile "examples/resources/codespaces_user_secret/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `secret_name` - (Required) Name of the secret +* `encrypted_value` - (Optional) Encrypted value of the secret using the GitHub public key in Base64 format. +* `plaintext_value` - (Optional) Plaintext value of the secret to be encrypted +* `selected_repository_ids` - (Optional) An array of repository ids that can access the user secret. + +## Attributes Reference + +* `created_at` - Date of codespaces_secret creation. +* `updated_at` - Date of codespaces_secret update. + +## Import + +This resource can be imported using an ID made up of the secret name: + +``` +terraform import github_codespaces_user_secret.test_secret test_secret_name +``` + +NOTE: the implementation is limited in that it won't fetch the value of the `plaintext_value` or `encrypted_value` fields when importing. You may need to ignore changes for these as a workaround. diff --git a/templates/resources/dependabot_organization_secret.md.tmpl b/templates/resources/dependabot_organization_secret.md.tmpl new file mode 100644 index 0000000000..c8bb6f318e --- /dev/null +++ b/templates/resources/dependabot_organization_secret.md.tmpl @@ -0,0 +1,66 @@ +--- +page_title: "GitHub: github_dependabot_organization_secret" +description: |- + Creates and manages an Dependabot Secret within a GitHub organization +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_dependabot_organization_secret + +This resource allows you to create and manage GitHub Dependabot secrets within your GitHub organization. You must have write access to a repository to use this resource. + +Secret values are encrypted using the [Go '/crypto/box' module](https://godoc.org/golang.org/x/crypto/nacl/box) which is interoperable with [libsodium](https://libsodium.gitbook.io/doc/). Libsodium is used by GitHub to decrypt secret values. + +For the purposes of security, the contents of the `plaintext_value` field have been marked as `sensitive` to Terraform, but it is important to note that **this does not hide it from state files**. You should treat state as sensitive always. It is also advised that you do not store plaintext values in your code but rather populate the `encrypted_value` using fields from a resource, data source or variable as, while encrypted in state, these will be easily accessible in your code. See below for an example of this abstraction. + +## Example Usage + +{{tffile "examples/resources/dependabot_organization_secret/example_1.tf"}} + +{{tffile "examples/resources/dependabot_organization_secret/example_2.tf"}} + +## Example Lifecycle Ignore Changes + +This resource supports using the `lifecycle` `ignore_changes` block on `remote_updated_at` to support use cases where a secret value is created using a placeholder value and then modified after creation outside the scope of Terraform. This approach ensures only the initial placeholder value is referenced in your code and in the resulting state file. + +{{tffile "examples/resources/dependabot_organization_secret/example_3.tf"}} + +## Argument Reference + +The following arguments are supported: + +- `secret_name` - (Required) Name of the secret. +- `key_id` - (Optional) ID of the public key used to encrypt the secret. This should be provided when setting `encrypted_value`; if it isn't then the current public key will be looked up, which could cause a missmatch. This conflicts with `plaintext_value`. +- `encrypted_value` - (Optional) Encrypted value of the secret using the GitHub public key in Base64 format. +- `plaintext_value` - (Optional) Plaintext value of the secret to be encrypted. +- `visibility` - (Required) Configures the access that repositories have to the organization secret; must be one of `all`, `private`, or `selected`. +- `selected_repository_ids` - (Optional) An array of repository IDs that can access the organization variable; this requires `visibility` to be set to `selected`. + +## Attributes Reference + +- `created_at` - Date the secret was created. +- `updated_at` - Date the secret was last updated by the provider. +- `remote_updated_at` - Date the secret was last updated in GitHub. + +## Import + +This resource can be imported using the secret name as the ID. + +~> **Note**: When importing secrets, the `plaintext_value` or `encrypted_value` fields will not be populated in the state. You may need to ignore changes for these as a workaround if you're not planning on updating the secret through Terraform. + +### Import Block + +The following import imports a GitHub Dependabot organization secret named `mysecret` to a `github_dependabot_organization_secret` resource named `example`. + +{{tffile "examples/resources/dependabot_organization_secret/example_4.tf"}} + +### Import Command + +The following command imports a GitHub Dependabot organization secret named `mysecret` to a `github_dependabot_organization_secret` resource named `example`. + +```shell +terraform import github_dependabot_organization_secret.example mysecret +``` diff --git a/templates/resources/dependabot_organization_secret_repositories.md.tmpl b/templates/resources/dependabot_organization_secret_repositories.md.tmpl new file mode 100644 index 0000000000..bcea91a6f0 --- /dev/null +++ b/templates/resources/dependabot_organization_secret_repositories.md.tmpl @@ -0,0 +1,44 @@ +--- +page_title: "GitHub: github_dependabot_organization_secret_repositories" +description: |- + Manages repository allow list for an Dependabot Secret within a GitHub organization. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_dependabot_organization_secret_repositories + +This resource allows you to manage the repositories allowed to access a Dependabot secret within your GitHub organization. You must have write access to an organization secret to use this resource. + +This resource is only applicable when `visibility` of the existing organization secret has been set to `selected`. + +## Example Usage + +{{tffile "examples/resources/dependabot_organization_secret_repositories/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +- `secret_name` - (Required) Name of the Dependabot organization secret. +- `selected_repository_ids` - (Required) List of IDs for the repositories that should be able to access the secret. + +## Import + +This resource can be imported using the secret name as the ID. + +### Import Block + +The following import block imports the repositories able to access the Dependabot organization secret named `mysecret` to a `github_dependabot_organization_secret_repositories` resource named `example`. + +{{tffile "examples/resources/dependabot_organization_secret_repositories/example_2.tf"}} + +### Import Command + +The following command imports the repositories able to access the Dependabot organization secret named `mysecret` to a `github_dependabot_organization_secret_repositories` resource named `example`. + +```shell +terraform import github_dependabot_organization_secret_repositories.example mysecret +``` diff --git a/templates/resources/dependabot_organization_secret_repository.md.tmpl b/templates/resources/dependabot_organization_secret_repository.md.tmpl new file mode 100644 index 0000000000..dc19f0def2 --- /dev/null +++ b/templates/resources/dependabot_organization_secret_repository.md.tmpl @@ -0,0 +1,44 @@ +--- +page_title: "GitHub: github_dependabot_organization_secret_repository" +description: |- + Add access for a repository to a Dependabot Secret within a GitHub organization. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_dependabot_organization_secret_repository + +This resource adds permission for a repository to use a Dependabot secret within your GitHub organization. You must have write access to an organization secret to use this resource. + +This resource is only applicable when `visibility` of the existing organization secret has been set to `selected`. + +## Example Usage + +{{tffile "examples/resources/dependabot_organization_secret_repository/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +- `secret_name` - (Required) Name of the Dependabot organization secret. +- `repository_id` - (Required) ID of the repository that should be able to access the secret. + +## Import + +This resource can be imported using an ID made of the secret name and repository name separated by a `:`. + +### Import Block + +The following import block imports the access of repository ID `123456` for the Dependabot organization secret named `mysecret` to a `github_dependabot_organization_secret_repository` resource named `example`. + +{{tffile "examples/resources/dependabot_organization_secret_repository/example_2.tf"}} + +### Import Command + +The following command imports the access of repository ID `123456` for the Dependabot organization secret named `mysecret` to a `v` resource named `example`. + +```shell +terraform import github_dependabot_organization_secret_repository.example mysecret:123456 +``` diff --git a/templates/resources/dependabot_secret.md.tmpl b/templates/resources/dependabot_secret.md.tmpl new file mode 100644 index 0000000000..1a01a8adb7 --- /dev/null +++ b/templates/resources/dependabot_secret.md.tmpl @@ -0,0 +1,66 @@ +--- +page_title: "GitHub: github_dependabot_secret" +description: |- + Creates and manages an Dependabot Secret within a GitHub repository +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_dependabot_secret + +This resource allows you to create and manage GitHub Dependabot secrets within your GitHub repositories. You must have write access to a repository to use this resource. + +Secret values are encrypted using the [Go '/crypto/box' module](https://godoc.org/golang.org/x/crypto/nacl/box) which is interoperable with [libsodium](https://libsodium.gitbook.io/doc/). Libsodium is used by GitHub to decrypt secret values. + +For the purposes of security, the contents of the `plaintext_value` field have been marked as `sensitive` to Terraform, but it is important to note that **this does not hide it from state files**. You should treat state as sensitive always. It is also advised that you do not store plaintext values in your code but rather populate the `encrypted_value` using fields from a resource, data source or variable as, while encrypted in state, these will be easily accessible in your code. See below for an example of this abstraction. + +## Example Usage + +{{tffile "examples/resources/dependabot_secret/example_1.tf"}} + +## Example Lifecycle Ignore Changes + +This resource supports using the `lifecycle` `ignore_changes` block on `remote_updated_at` to support use cases where a secret value is created using a placeholder value and then modified after creation outside the scope of Terraform. This approach ensures only the initial placeholder value is referenced in your code and in the resulting state file. + +{{tffile "examples/resources/dependabot_secret/example_2.tf"}} + +## Argument Reference + +The following arguments are supported: + +- `repository` - (Required) Name of the repository. +- `secret_name` - (Required) Name of the secret. +- `key_id` - (Optional) ID of the public key used to encrypt the secret. This should be provided when setting `encrypted_value`; if it isn't then the current public key will be looked up, which could cause a missmatch. This conflicts with `plaintext_value`. +- `encrypted_value` - (Optional) Encrypted value of the secret using the GitHub public key in Base64 format. +- `plaintext_value` - (Optional) Plaintext value of the secret to be encrypted. + +~> **Note**: One of either `encrypted_value` or `plaintext_value` must be specified. + +## Attributes Reference + +- `repository_id` - ID of the repository. +- `created_at` - Date the secret was created. +- `updated_at` - Date the secret was last updated by the provider. +- `remote_updated_at` - Date the secret was last updated in GitHub. + +## Import + +This resource can be imported using an ID made of the repository name, and secret name separated by a `:`. + +~> **Note**: When importing secrets, the `plaintext_value` or `encrypted_value` fields will not be populated in the state. You may need to ignore changes for these as a workaround if you're not planning on updating the secret through Terraform. + +### Import Block + +The following import imports a GitHub Dependabot secret named `mysecret` for the repo `myrepo` to a `github_dependabot_secret` resource named `example`. + +{{tffile "examples/resources/dependabot_secret/example_3.tf"}} + +### Import Command + +The following command imports a GitHub Dependabot secret named `mysecret` for the repo `myrepo` to a `github_dependabot_secret` resource named `example`. + +```shell +terraform import github_dependabot_secret.example myrepo:mysecret +``` diff --git a/templates/resources/emu_group_mapping.md.tmpl b/templates/resources/emu_group_mapping.md.tmpl new file mode 100644 index 0000000000..b5e37dd4f4 --- /dev/null +++ b/templates/resources/emu_group_mapping.md.tmpl @@ -0,0 +1,32 @@ +--- +page_title: "GitHub: github_emu_group_mapping" +description: |- + Manages mappings between external groups for enterprise managed users. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_emu_group_mapping + +This resource manages mappings between external groups for enterprise managed users and GitHub teams. It wraps the [Teams#ExternalGroups API](https://docs.github.com/en/rest/reference/teams#external-groups). Note that this is a distinct resource from `github_team_sync_group_mapping`. `github_emu_group_mapping` is special to the Enterprise Managed User (EMU) external group feature, whereas `github_team_sync_group_mapping` is specific to Identity Provider Groups. + +## Example Usage + +{{tffile "examples/resources/emu_group_mapping/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +- `team_slug` - (Required) Slug of the GitHub team +- `group_id` - (Required) Integer corresponding to the external group ID to be linked + +## Import + +GitHub EMU External Group Mappings can be imported using the external `group_id` and `team_slug` separated by a colon, e.g. + +```sh +$ terraform import github_emu_group_mapping.example_emu_group_mapping 28836:emu-test-team +``` diff --git a/templates/resources/enterprise_actions_permissions.md.tmpl b/templates/resources/enterprise_actions_permissions.md.tmpl new file mode 100644 index 0000000000..cefeafa546 --- /dev/null +++ b/templates/resources/enterprise_actions_permissions.md.tmpl @@ -0,0 +1,48 @@ +--- +page_title: "GitHub: github_enterprise_actions_permissions" +description: |- + Creates and manages Actions permissions within a GitHub enterprise +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_enterprise_actions_permissions + +This resource allows you to create and manage GitHub Actions permissions within your GitHub enterprise. You must have admin access to an enterprise to use this resource. + +## Example Usage + +{{tffile "examples/resources/enterprise_actions_permissions/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: +* `"my-enterprise"` - (Required) The slug of the enterprise. +* `allowed_actions` - (Optional) The permissions policy that controls the actions that are allowed to run. Can be one of: `all`, `local_only`, or `selected`. +* `enabled_organizations` - (Required) The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. +* `allowed_actions_config` - (Optional) Sets the actions that are allowed in an enterprise. Only available when `allowed_actions` = `selected`. See [Allowed Actions Config](#allowed-actions-config) below for details. +* `enabled_organizations_config` - (Optional) Sets the list of selected organizations that are enabled for GitHub Actions in an enterprise. Only available when `enabled_organizations` = `selected`. See [Enabled Organizations Config](#enabled-organizations-config) below for details. + +### Allowed Actions Config + +The `allowed_actions_config` block supports the following: + +* `github_owned_allowed` - (Required) Whether GitHub-owned actions are allowed in the organization. +* `patterns_allowed` - (Optional) Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, monalisa/octocat@*, monalisa/octocat@v2, monalisa/*." +* `verified_allowed` - (Optional) Whether actions in GitHub Marketplace from verified creators are allowed. Set to true to allow all GitHub Marketplace actions by verified creators. + +### Enabled Organizations Config + +The `enabled_organizations_config` block supports the following: + +* `organization_ids` - (Required) List of organization IDs to enable for GitHub Actions. + +## Import + +This resource can be imported using the name of the GitHub enterprise: + +``` +$ terraform import github_enterprise_actions_permissions.test github_enterprise_name +``` diff --git a/templates/resources/enterprise_actions_runner_group.md.tmpl b/templates/resources/enterprise_actions_runner_group.md.tmpl new file mode 100644 index 0000000000..6f91ee9f41 --- /dev/null +++ b/templates/resources/enterprise_actions_runner_group.md.tmpl @@ -0,0 +1,46 @@ +--- +page_title: "GitHub: github_enterprise_actions_runner_group" +description: |- + Creates and manages an Actions Runner Group within a GitHub enterprise. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_enterprise_actions_runner_group + +This resource allows you to create and manage GitHub Actions runner groups within your GitHub enterprise. You must have admin access to an enterprise to use this resource. + +## Example Usage + +{{tffile "examples/resources/enterprise_actions_runner_group/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: +* `enterprise_slug` - (Required) The slug of the enterprise. +* `name` - (Required) Name of the runner group +* `visibility` - (Required) Visibility of a runner group to enterprise organizations. Whether the runner group can include `all` or `selected` +* `selected_organization_ids` - (Optional) IDs of the organizations which should be added to the runner group +* `allows_public_repositories` - (Optional) Whether public repositories can be added to the runner group. Defaults to false. +* `restricted_to_workflows` - (Optional) If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false. +* `selected_workflows` - (Optional) List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true. + +## Attributes Reference + +The following additional attributes are exported: + +* `id` - The ID of the runner group +* `default` - Whether this is the default runner group +* `etag` - An etag representing the runner group object +* `runners_url` - The GitHub API URL for the runner group's runners +* `selected_organizations_url` - The GitHub API URL for the runner group's selected organizations + +## Import + +This resource can be imported using the enterprise slug and the ID of the runner group: + +``` +$ terraform import github_enterprise_actions_runner_group.test enterprise-slug/42 +``` diff --git a/templates/resources/enterprise_actions_workflow_permissions.md.tmpl b/templates/resources/enterprise_actions_workflow_permissions.md.tmpl new file mode 100644 index 0000000000..00a2a40aa9 --- /dev/null +++ b/templates/resources/enterprise_actions_workflow_permissions.md.tmpl @@ -0,0 +1,51 @@ +--- +page_title: "GitHub: github_enterprise_actions_workflow_permissions" +description: |- + Manages GitHub Actions workflow permissions for a GitHub Enterprise. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_enterprise_actions_workflow_permissions + +This resource allows you to manage GitHub Actions workflow permissions for a GitHub Enterprise account. This controls the default permissions granted to the GITHUB_TOKEN when running workflows and whether GitHub Actions can approve pull request reviews. + +You must have enterprise admin access to use this resource. + +## Example Usage + +{{tffile "examples/resources/enterprise_actions_workflow_permissions/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `enterprise_slug` - (Required) The slug of the enterprise. + +* `default_workflow_permissions` - (Optional) The default workflow permissions granted to the GITHUB_TOKEN when running workflows. Can be `read` or `write`. Defaults to `read`. + +* `can_approve_pull_request_reviews` - (Optional) Whether GitHub Actions can approve pull request reviews. Defaults to `false`. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - The enterprise slug. + +## Import + +Enterprise Actions workflow permissions can be imported using the enterprise slug: + +``` +terraform import github_enterprise_actions_workflow_permissions.example my-enterprise +``` + +## Notes + +~> **Note:** This resource requires a GitHub Enterprise account and enterprise admin permissions. + +When this resource is destroyed, the workflow permissions will be reset to safe defaults: +- `default_workflow_permissions` = `read` +- `can_approve_pull_request_reviews` = `false` diff --git a/templates/resources/enterprise_organization.md.tmpl b/templates/resources/enterprise_organization.md.tmpl new file mode 100644 index 0000000000..dc179d4086 --- /dev/null +++ b/templates/resources/enterprise_organization.md.tmpl @@ -0,0 +1,52 @@ +--- +page_title: "Github: github_enterprise_organization" +description: |- + Create and manages a GitHub enterprise organization. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_enterprise_organization + +This resource allows you to create and manage a GitHub enterprise organization. + +## Example Usage + +``` +resource "github_enterprise_organization" "org" { + enterprise_id = data.github_enterprise.enterprise.id + name = "some-awesome-org" + display_name = "Some Awesome Org" + description = "Organization created with terraform" + billing_email = "jon@winteriscoming.com" + admin_logins = [ + "jon-snow" + ] +} +``` + +## Argument Reference + +* `enterprise_id` - (Required) The ID of the enterprise. +* `name` - (Required) The name of the organization. +* `description` - (Optional) The description of the organization. +* `display_name` - (Optional) The display name of the organization. +* `billing_email` - (Required) The billing email address. +* `admin_logins` - (Required) List of organization owner usernames. + +## Attributes Reference + +The following additional attributes are exported: + +* `id` - The node ID of the organization for use with the v4 API. +* `database_id` - The ID of the organization. + +## Import + +GitHub Enterprise Organization can be imported using the `slug` of the enterprise, combined with the `orgname` of the organization, separated by a `/` character. + +``` +$ terraform import github_enterprise_organization.org enterp/some-awesome-org +``` diff --git a/templates/resources/enterprise_security_analysis_settings.md.tmpl b/templates/resources/enterprise_security_analysis_settings.md.tmpl new file mode 100644 index 0000000000..e820819fcb --- /dev/null +++ b/templates/resources/enterprise_security_analysis_settings.md.tmpl @@ -0,0 +1,68 @@ +--- +page_title: "GitHub: github_enterprise_security_analysis_settings" +description: |- + Manages GitHub Enterprise security analysis settings. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_enterprise_security_analysis_settings + +This resource allows you to manage code security and analysis settings for a GitHub Enterprise account. This controls Advanced Security, Secret Scanning, and related security features that are automatically enabled for new repositories in the enterprise. + +You must have enterprise admin access to use this resource. + +## Example Usage + +{{tffile "examples/resources/enterprise_security_analysis_settings/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `enterprise_slug` - (Required) The slug of the enterprise. + +* `advanced_security_enabled_for_new_repositories` - (Optional) Whether GitHub Advanced Security is automatically enabled for new repositories. Defaults to `false`. Requires Advanced Security license. + +* `secret_scanning_enabled_for_new_repositories` - (Optional) Whether secret scanning is automatically enabled for new repositories. Defaults to `false`. + +* `secret_scanning_push_protection_enabled_for_new_repositories` - (Optional) Whether secret scanning push protection is automatically enabled for new repositories. Defaults to `false`. + +* `secret_scanning_push_protection_custom_link` - (Optional) Custom URL for secret scanning push protection bypass instructions. + +* `secret_scanning_validity_checks_enabled` - (Optional) Whether secret scanning validity checks are enabled. Defaults to `false`. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - The enterprise slug. + +## Import + +Enterprise security analysis settings can be imported using the enterprise slug: + +``` +terraform import github_enterprise_security_analysis_settings.example my-enterprise +``` + +## Notes + +~> **Note:** This resource requires a GitHub Enterprise account and enterprise admin permissions. + +~> **Note:** Advanced Security features require a GitHub Advanced Security license. + +When this resource is destroyed, all security analysis settings will be reset to disabled defaults for security reasons. + +## Dependencies + +This resource manages the following security features: + +- **Advanced Security**: Code scanning, secret scanning, and dependency review +- **Secret Scanning**: Automatic detection of secrets in code +- **Push Protection**: Prevents secrets from being committed to repositories +- **Validity Checks**: Verifies that detected secrets are actually valid + +These settings only apply to **new repositories** created after the settings are enabled. Existing repositories are not affected and must be configured individually. diff --git a/templates/resources/issue.md.tmpl b/templates/resources/issue.md.tmpl new file mode 100644 index 0000000000..9124aa8315 --- /dev/null +++ b/templates/resources/issue.md.tmpl @@ -0,0 +1,53 @@ +--- +page_title: "GitHub: github_issue" +description: |- + Provides a GitHub issue resource. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_issue + +Provides a GitHub issue resource. + +This resource allows you to create and manage issue within your GitHub repository. + +## Example Usage + +{{tffile "examples/resources/issue/example_1.tf"}} + +## Example Usage with milestone and project assignment + +{{tffile "examples/resources/issue/example_2.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `repository` - (Required) The GitHub repository name + +* `title` - (Required) Title of the issue + +* `body` - (Optional) Body of the issue + +* `labels` - (Optional) List of labels to attach to the issue + +* `assignees` - (Optional) List of Logins to assign the to the issue + +* `milestone_number` - (Optional) Milestone number to assign to the issue + +## Attributes Reference + +* `number` - (Computed) - The issue number + +* `issue_id` - (Computed) - The issue id + +## Import + +GitHub Issues can be imported using an ID made up of `repository:number`, e.g. + +``` +$ terraform import github_issue.issue_15 myrepo:15 +``` diff --git a/templates/resources/issue_label.md.tmpl b/templates/resources/issue_label.md.tmpl new file mode 100644 index 0000000000..65bd3b2c30 --- /dev/null +++ b/templates/resources/issue_label.md.tmpl @@ -0,0 +1,47 @@ +--- +page_title: "GitHub: github_issue_label" +description: |- + Provides a GitHub issue label resource. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_issue_label + +Provides a GitHub issue label resource. + +This resource allows you to create and manage issue labels within your GitHub organization. + +Issue labels are keyed off of their "name", so pre-existing issue labels result in a 422 HTTP error if they exist outside of Terraform. Normally this would not be an issue, except new repositories are created with a "default" set of labels, and those labels easily conflict with custom ones. + +This resource will first check if the label exists, and then issue an update, otherwise it will create. + +~> **Note:** When a repository is archived, Terraform will skip deletion of issue labels to avoid API errors, as archived repositories are read-only. The labels will be removed from Terraform state without attempting to delete them from GitHub. + +## Example Usage + +{{tffile "examples/resources/issue_label/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `repository` - (Required) The GitHub repository + +* `name` - (Required) The name of the label. + +* `color` - (Required) A 6 character hex code, **without the leading #**, identifying the color of the label. + +* `description` - (Optional) A short description of the label. + +* `url` - (Computed) The URL to the issue label + +## Import + +GitHub Issue Labels can be imported using an ID made up of `repository:name`, e.g. + +``` +$ terraform import github_issue_label.panic_label terraform:panic +``` diff --git a/templates/resources/issue_labels.md.tmpl b/templates/resources/issue_labels.md.tmpl new file mode 100644 index 0000000000..e0c353ca18 --- /dev/null +++ b/templates/resources/issue_labels.md.tmpl @@ -0,0 +1,49 @@ +--- +page_title: "GitHub: github_issue_labels" +description: |- + Provides GitHub issue labels resource. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_issue_labels + +Provides GitHub issue labels resource. + +This resource allows you to create and manage issue labels within your GitHub organization. + +~> Note: github_issue_labels cannot be used in conjunction with github_issue_label or they will fight over what your policy should be. + +This resource is authoritative. For adding a label to a repo in a non-authoritative manner, use github_issue_label instead. + +If you change the case of a label's name, its' color, or description, this resource will edit the existing label to match the new values. However, if you change the name of a label, this resource will create a new label with the new name and delete the old label. Beware that this will remove the label from any issues it was previously attached to. + +~> **Note:** When a repository is archived, Terraform will skip deletion of issue labels to avoid API errors, as archived repositories are read-only. The labels will be removed from Terraform state without attempting to delete them from GitHub. + +## Example Usage + +{{tffile "examples/resources/issue_labels/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `repository` - (Required) The GitHub repository + +* `name` - (Required) The name of the label. + +* `color` - (Required) A 6 character hex code, **without the leading #**, identifying the color of the label. + +* `description` - (Optional) A short description of the label. + +* `url` - (Computed) The URL to the issue label + +## Import + +GitHub Issue Labels can be imported using the repository `name`, e.g. + +``` +$ terraform import github_issue_labels.test_repo test_repo +``` diff --git a/templates/resources/membership.md.tmpl b/templates/resources/membership.md.tmpl new file mode 100644 index 0000000000..b02119c025 --- /dev/null +++ b/templates/resources/membership.md.tmpl @@ -0,0 +1,35 @@ +--- +page_title: "GitHub: github_membership" +description: |- + Provides a GitHub membership resource. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_membership + +Provides a GitHub membership resource. + +This resource allows you to add/remove users from your organization. When applied, an invitation will be sent to the user to become part of the organization. When destroyed, either the invitation will be cancelled or the user will be removed. + +## Example Usage + +{{tffile "examples/resources/membership/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `username` - (Required) The user to add to the organization. +* `role` - (Optional) The role of the user within the organization. Must be one of `member` or `admin`. Defaults to `member`. `admin` role represents the `owner` role available via GitHub UI. +* `downgrade_on_destroy` - (Optional) Defaults to `false`. If set to true, when this resource is destroyed, the member will not be removed from the organization. Instead, the member's role will be downgraded to 'member'. + +## Import + +GitHub Membership can be imported using an ID made up of `organization:username`, e.g. + +``` +$ terraform import github_membership.member hashicorp:someuser +``` diff --git a/templates/resources/organization_block.md.tmpl b/templates/resources/organization_block.md.tmpl new file mode 100644 index 0000000000..e063382726 --- /dev/null +++ b/templates/resources/organization_block.md.tmpl @@ -0,0 +1,31 @@ +--- +page_title: "GitHub: github_organization_block" +description: |- + Creates and manages blocks for GitHub organizations +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization_block + +This resource allows you to create and manage blocks for GitHub organizations. + +## Example Usage + +{{tffile "examples/resources/organization_block/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `username` - (Required) The name of the user to block. + +## Import + +GitHub organization block can be imported using a username, e.g. + +``` +$ terraform import github_github_organization_block.example someuser +``` diff --git a/templates/resources/organization_custom_properties.md.tmpl b/templates/resources/organization_custom_properties.md.tmpl new file mode 100644 index 0000000000..14bba2acad --- /dev/null +++ b/templates/resources/organization_custom_properties.md.tmpl @@ -0,0 +1,65 @@ +--- +page_title: "GitHub: github_organization_custom_properties" +description: |- + Creates and manages custom properties for a GitHub organization +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization_custom_properties + +This resource allows you to create and manage custom properties for a GitHub organization. + +Custom properties enable you to add metadata to repositories within your organization. You can use custom properties to add context about repositories, such as who owns them, when they expire, or compliance requirements. + +## Example Usage + +{{tffile "examples/resources/organization_custom_properties/example_1.tf"}} + +## Example Usage - Allow Repository Actors to Edit + +This example shows how to allow repository administrators to edit the property values: + +{{tffile "examples/resources/organization_custom_properties/example_2.tf"}} + +## Example Usage - Text Property + +{{tffile "examples/resources/organization_custom_properties/example_3.tf"}} + +## Example Usage - Boolean Property + +{{tffile "examples/resources/organization_custom_properties/example_4.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `property_name` - (Required) The name of the custom property. + +* `value_type` - (Optional) The type of the custom property. Can be one of `string`, `single_select`, `multi_select`, or `true_false`. Defaults to `string`. + +* `required` - (Optional) Whether the custom property is required. Defaults to `false`. + +* `description` - (Optional) The description of the custom property. + +* `default_value` - (Optional) The default value of the custom property. + +* `allowed_values` - (Optional) List of allowed values for the custom property. Only applicable when `value_type` is `single_select` or `multi_select`. + +* `values_editable_by` - (Optional) Who can edit the values of the custom property. Can be one of `org_actors` or `org_and_repo_actors`. When set to `org_actors` (the default), only organization owners can edit the property values on repositories. When set to `org_and_repo_actors`, both organization owners and repository administrators with the custom properties permission can edit the values. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `property_name` - The name of the custom property. + +## Import + +Organization custom properties can be imported using the property name: + +``` +terraform import github_organization_custom_properties.environment environment +``` diff --git a/templates/resources/organization_custom_role.md.tmpl b/templates/resources/organization_custom_role.md.tmpl new file mode 100644 index 0000000000..bc2a8657ec --- /dev/null +++ b/templates/resources/organization_custom_role.md.tmpl @@ -0,0 +1,44 @@ +--- +page_title: "GitHub: github_organization_custom_role" +description: |- + Creates and manages a custom role in a GitHub Organization for use in repositories. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github\_organization\_custom\_role + +~> **Note:** This resource is deprecated, please use the `github_organization_repository_role` resource instead. + +This resource allows you to create and manage custom roles in a GitHub Organization for use in repositories. + +~> Note: Custom roles are currently only available in GitHub Enterprise Cloud. + +## Example Usage + +{{tffile "examples/resources/organization_custom_role/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name of the custom role. +* `description` - (Optional) The description for the custom role. +* `base_role` - (Required) The system role from which the role inherits permissions. Can be one of: `read`, `triage`, `write`, or `maintain`. +* `permissions` - (Required) A list of additional permissions included in this role. Must have a minimum of 1 additional permission. The list of available permissions can be found using the [list repository fine-grained permissions for an organization](https://docs.github.com/en/enterprise-cloud@latest/rest/orgs/custom-roles?apiVersion=2022-11-28#list-repository-fine-grained-permissions-for-an-organization) API. + +## Attributes Reference + +The following additional attributes are exported: + +* `id` - The ID of the custom role. + +## Import + +Custom roles can be imported using the `id` of the role. The `id` of the custom role can be found using the [list custom roles in an organization](https://docs.github.com/en/enterprise-cloud@latest/rest/orgs/custom-roles#list-custom-repository-roles-in-an-organization) API. + +``` +$ terraform import github_organization_custom_role.example 1234 +``` diff --git a/templates/resources/organization_project.md.tmpl b/templates/resources/organization_project.md.tmpl new file mode 100644 index 0000000000..a9af4042e4 --- /dev/null +++ b/templates/resources/organization_project.md.tmpl @@ -0,0 +1,33 @@ +--- +page_title: "GitHub: github_organization_project" +description: |- + Creates and manages projects for GitHub organizations +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization_project + +!> **Warning:** This resource no longer works as the [Projects (classic) REST API](https://docs.github.com/en/rest/projects/projects?apiVersion=2022-11-28) has been [removed](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) and as such has been deprecated. It will be removed in a future release. + +This resource allows you to create and manage projects for GitHub organization. + +## Example Usage + +{{tffile "examples/resources/organization_project/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name of the project. + +* `body` - (Optional) The body of the project. + +## Attributes Reference + +The following additional attributes are exported: + +* `url` - URL of the project diff --git a/templates/resources/organization_repository_role.md.tmpl b/templates/resources/organization_repository_role.md.tmpl new file mode 100644 index 0000000000..ae453a64f1 --- /dev/null +++ b/templates/resources/organization_repository_role.md.tmpl @@ -0,0 +1,43 @@ +--- +page_title: "GitHub: github_organization_repository_role" +description: |- + Manage a custom organization repository role. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization_repository_role + +Manage a custom organization repository role. + +~> **Note**: Custom organization repository roles are currently only available in GitHub Enterprise Cloud. + +## Example Usage + +{{tffile "examples/resources/organization_repository_role/example_1.tf"}} + +## Schema + +### Required + +- `name` (String) The name of the organization repository role. +- `base_role` (String) The system role from which this role inherits permissions. +- `permissions` (Set of String, Min: 1) The permissions included in this role. + +### Optional + +- `description` (String) The description of the organization repository role. + +### Read-Only + +- `role_id` (Number) The ID of the organization repository role. + +## Import + +A custom organization repository role can be imported using its ID. + +```shell +terraform import github_organization_repository_role.example 1234 +``` diff --git a/templates/resources/organization_role.md.tmpl b/templates/resources/organization_role.md.tmpl new file mode 100644 index 0000000000..1864f2afd0 --- /dev/null +++ b/templates/resources/organization_role.md.tmpl @@ -0,0 +1,43 @@ +--- +page_title: "GitHub: github_organization_role" +description: |- + Manage a custom organization role. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization_role + +Manage a custom organization role. + +~> **Note**: Custom organization roles are currently only available in GitHub Enterprise Cloud. + +## Example Usage + +{{tffile "examples/resources/organization_role/example_1.tf"}} + +## Schema + +### Required + +- `name` (String) The name of the organization role. +- `permissions` (Set of String) The permissions included in this role. Only organization permissions can be set if the `base_role` isn't set or is set to `none`. + +### Optional + +- `description` (String) The description of the organization role. +- `base_role` (String) The system role from which this role inherits permissions; one of `none`, `read`, `triage`, `write`, `maintain`, or `admin`. Defaults to `none`. + +### Read-Only + +- `role_id` (Number) The ID of the organization role. + +## Import + +A custom organization role can be imported using its ID. + +```shell +terraform import github_organization_role.example 1234 +``` diff --git a/templates/resources/organization_role_team.md.tmpl b/templates/resources/organization_role_team.md.tmpl new file mode 100644 index 0000000000..26eb092bf5 --- /dev/null +++ b/templates/resources/organization_role_team.md.tmpl @@ -0,0 +1,36 @@ +--- +page_title: "GitHub: github_organization_role_team" +description: |- + Manage an association between an organization role and a team. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization_role_team + +Manage an association between an organization role and a team. + +## Example Usage + +{{tffile "examples/resources/organization_role_team/example_1.tf"}} + +## Example Usage Security Manager Role + +{{tffile "examples/resources/organization_role_team/example_2.tf"}} + +## Schema + +### Required + +- `role_id` (Number) The ID of the organization role. +- `team_slug` (String) The slug of the team name. + +## Import + +An organization role team association can be imported using the role ID and the team slug separated by a `:`. + +```shell +terraform import github_organization_role_team.example "1234:example-team" +``` diff --git a/templates/resources/organization_role_team_assignment.md.tmpl b/templates/resources/organization_role_team_assignment.md.tmpl new file mode 100644 index 0000000000..333c81b3dd --- /dev/null +++ b/templates/resources/organization_role_team_assignment.md.tmpl @@ -0,0 +1,38 @@ +--- +page_title: "GitHub: github_organization_role_team_assignment" +description: |- + Manages the associations between teams and organization roles. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization_role_team_assignment + +~> **Note:** This resource is deprecated, please use the `github_organization_role_team` resource instead. + +This resource manages relationships between teams and organization roles in your GitHub organization. This works on predefined roles, and custom roles, where the latter is an Enterprise feature. + +Creating this resource assigns the role to a team. + +The organization role and team must both belong to the same organization on GitHub. + +## Example Usage + +{{tffile "examples/resources/organization_role_team_assignment/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `team_slug` - (Required) The GitHub team slug +* `role_id` - (Required) The GitHub organization role id + +## Import + +GitHub Team Organization Role Assignment can be imported using an ID made up of `team_slug:role_id` + +```text +$ terraform import github_organization_role_team_assignment.role_assignment test-team:8132 +``` diff --git a/templates/resources/organization_role_user.md.tmpl b/templates/resources/organization_role_user.md.tmpl new file mode 100644 index 0000000000..770b0671f8 --- /dev/null +++ b/templates/resources/organization_role_user.md.tmpl @@ -0,0 +1,32 @@ +--- +page_title: "GitHub: github_organization_role_user" +description: |- + Manage an association between an organization role and a user. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization_role_user + +Manage an association between an organization role and a user. + +## Example Usage + +{{tffile "examples/resources/organization_role_user/example_1.tf"}} + +## Schema + +### Required + +- `role_id` (Number) The ID of the organization role. +- `login` (String) The login for the GitHub user account. + +## Import + +An organization role user association can be imported using the role ID and the user login separated by a `:`. + +```shell +terraform import github_organization_role_team.example "1234:example-user" +``` diff --git a/templates/resources/organization_ruleset.md.tmpl b/templates/resources/organization_ruleset.md.tmpl new file mode 100644 index 0000000000..4414a3aa6e --- /dev/null +++ b/templates/resources/organization_ruleset.md.tmpl @@ -0,0 +1,278 @@ +--- +page_title: "github_organization_ruleset Resource - terraform-provider-github" +description: |- + Creates a GitHub organization ruleset. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization_ruleset + +Creates a GitHub organization ruleset. + +This resource allows you to create and manage rulesets on the organization level. When applied, a new ruleset will be created. When destroyed, that ruleset will be removed. + +## Example Usage + +{{tffile "examples/resources/organization_ruleset/example_1.tf"}} + +## Argument Reference + +- `enforcement` - (Required) (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + +- `name` - (Required) (String) The name of the ruleset. + +- `rules` - (Required) (Block List, Min: 1, Max: 1) Rules within the ruleset. (see [below for nested schema](#rules)) + +- `target` - (Required) (String) Possible values are `branch`, `tag` and `push`. + +- `bypass_actors` - (Optional) (Block List) The actors that can bypass the rules in this ruleset. (see [below for nested schema](#bypass_actors)) + +- `conditions` - (Optional) (Block List, Max: 1) Parameters for an organization ruleset condition. For `branch` and `tag` targets, `ref_name` is required alongside one of `repository_name` or `repository_id`. For `push` targets, `ref_name` must NOT be set - only `repository_name` or `repository_id` should be used. (see [below for nested schema](#conditions)) + +#### Rules + +The `rules` block supports the following: + +~> **Note:** Rules are target-specific. `branch` and `tag` targets support rules like `creation`, `deletion`, `pull_request`, `required_status_checks`, etc. `push` targets only support `file_path_restriction`, `max_file_size`, `max_file_path_length`, and `file_extension_restriction`. Using the wrong rules for a target will result in a validation error. + +- `branch_name_pattern` - (Optional) (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applies to rulesets with target `branch`. (see [below for nested schema](#rulesbranch_name_pattern)) + +- `commit_author_email_pattern` - (Optional) (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see [below for nested schema](#rulescommit_author_email_pattern)) + +- `commit_message_pattern` - (Optional) (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see [below for nested schema](#rulescommit_message_pattern)) + +- `committer_email_pattern` - (Optional) (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see [below for nested schema](#rulescommitter_email_pattern)) + +- `creation` - (Optional) (Boolean) Only allow users with bypass permission to create matching refs. + +- `deletion` - (Optional) (Boolean) Only allow users with bypass permissions to delete matching refs. + +- `non_fast_forward` - (Optional) (Boolean) Prevent users with push access from force pushing to branches. + +- `pull_request` - (Optional) (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see [below for nested schema](#rulespull_request)) + +- `copilot_code_review` - (Optional) (Block List, Max: 1) Automatically request Copilot code review for new pull requests if the author has access to Copilot code review and their premium requests quota has not reached the limit. (see [below for nested schema](#rulescopilot_code_review)) + +- `required_linear_history` - (Optional) (Boolean) Prevent merge commits from being pushed to matching branches. + +- `required_signatures` - (Optional) (Boolean) Commits pushed to matching branches must have verified signatures. + +- `required_status_checks` - (Optional) (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see [below for nested schema](#rulesrequired_status_checks)) + +- `required_workflows` - (Optional) (Block List, Max: 1) Define which Actions workflows must pass before changes can be merged into a branch matching the rule. Multiple workflows can be specified. (see [below for nested schema](#rulesrequired_workflows)) + +- `required_code_scanning` - (Optional) (Block List, Max: 1) Define which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated. Multiple code scanning tools can be specified. (see [below for nested schema](#rulesrequired_code_scanning)) + +- `tag_name_pattern` - (Optional) (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applies to rulesets with target `tag`. (see [below for nested schema](#rulestag_name_pattern)) + +- `file_path_restriction` - (Optional) (Block List, Max: 1) Prevent commits that include changes to specified file paths from being pushed to the commit graph. This rule only applies to rulesets with target `push`. (see [below for nested schema](#rulesfile_path_restriction)) + +- `max_file_size` - (Optional) (Block List, Max: 1) Prevent commits that include files with a specified file size from being pushed to the commit graph. This rule only applies to rulesets with target `push`. (see [below for nested schema](#rulesmax_file_size)) + +- `max_file_path_length` - (Optional) (Block List, Max: 1) Prevent commits that include file paths that exceed a specified character limit from being pushed to the commit graph. This rule only applies to rulesets with target `push`. (see [below for nested schema](#rulesmax_file_path_length)) + +- `file_extension_restriction` - (Optional) (Block List, Max: 1) Prevent commits that include files with specified file extensions from being pushed to the commit graph. This rule only applies to rulesets with target `push`. (see [below for nested schema](#rulesfile_extension_restriction)) + +- `update` - (Optional) (Boolean) Only allow users with bypass permission to update matching refs. + +#### rules.branch_name_pattern + +- `operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + +- `pattern` - (Required) (String) The pattern to match with. + +- `name` - (Optional) (String) How this rule will appear to users. + +- `negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches. + +#### rules.commit_author_email_pattern + +- `operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + +- `pattern` - (Required) (String) The pattern to match with. + +- `name` - (Optional) (String) How this rule will appear to users. + +- `negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches. + +#### rules.commit_message_pattern + +- `operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + +- `pattern` - (Required) (String) The pattern to match with. + +- `name` - (Optional) (String) How this rule will appear to users. + +- `negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches. + +#### rules.committer_email_pattern + +- `operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + +- `pattern` - (Required) (String) The pattern to match with. + +- `name` - (Optional) (String) How this rule will appear to users. + +- `negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches. + +#### rules.pull_request + +- `allowed_merge_methods` - (Optional) (List of String, Min: 1) Array of merge methods to be allowed. Allowed values include `merge`, `squash`, and `rebase`. At least one must be enabled. +- `dismiss_stale_reviews_on_push` - (Optional) (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. + +- `require_code_owner_review` - (Optional) (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. + +- `require_last_push_approval` - (Optional) (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. + +- `required_approving_review_count` - (Optional) (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. + +- `required_review_thread_resolution` - (Optional) (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + +#### rules.copilot_code_review + +- `review_on_push` - (Optional) (Boolean) Copilot automatically reviews each new push to the pull request. Defaults to `false`. + +- `review_draft_pull_requests` - (Optional) (Boolean) Copilot automatically reviews draft pull requests before they are marked as ready for review. Defaults to `false`. + +- `allowed_merge_methods` - (Required) (List of String, Min: 1) Array of merge methods to be allowed. Allowed values include `merge`, `squash`, and `rebase`. At least one must be enabled. + +- `required_reviewers` - (Optional) (Block List) Require specific reviewers to approve pull requests. Note: This feature is in beta. (see [below for nested schema](#rulespull_requestrequired_reviewers)) + +#### rules.pull_request.required_reviewers + +- `reviewer` - (Required) (Block List, Max: 1) The reviewer that must review matching files. (see [below for nested schema](#rulespull_requestrequired_reviewersreviewer)) + +- `file_patterns` - (Required) (List of String) File patterns (fnmatch syntax) that this reviewer must approve. + +- `minimum_approvals` - (Required) (Number) Minimum number of approvals required from this reviewer. Set to 0 to make approval optional. + +#### rules.pull_request.required_reviewers.reviewer + +- `id` - (Required) (Number) The ID of the reviewer (Team ID). + +- `type` - (Required) (String) The type of reviewer. Currently only `Team` is supported. + +#### rules.required_status_checks + +- `required_check` - (Required) (Block Set, Min: 1) Status checks that are required. Several can be defined. (see [below for nested schema](#rulesrequired_status_checksrequired_check)) + +- `strict_required_status_checks_policy` - (Optional) (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + +- `do_not_enforce_on_create` - (Optional) (Boolean) Allow repositories and branches to be created if a check would otherwise prohibit it. Defaults to `false`. + +#### required_status_checks.required_check + +- `context` - (Required) (String) The status check context name that must be present on the commit. + +- `integration_id` - (Optional) (Number) The optional integration ID that this status check must originate from. + +- `do_not_enforce_on_create` - (Optional) (Boolean) Allow repositories and branches to be created if a check would otherwise prohibit it. Defaults to `false`. + +#### rules.required_workflows + +- `do_not_enforce_on_create` - (Optional) (Boolean) Allow repositories and branches to be created if a check would otherwise prohibit it. Defaults to `false`. + +- `required_workflow` - (Required) (Block Set, Min: 1) Actions workflows that are required. Multiple can be defined. (see [below for nested schema](#rulesrequired_workflowsrequired_workflow)) + +#### rules.required_workflows.required_workflow + +- `repository_id` - (Required) (Number) The ID of the repository. Names, full names and repository URLs are not supported. + +- `path` - (Required) (String) The path to the YAML definition file of the workflow. + +- `ref` - (Optional) (String) The optional ref from which to fetch the workflow. Defaults to `master`. + +#### rules.required_code_scanning + +- `required_code_scanning_tool` - (Required) (Block Set, Min: 1) Actions code scanning tools that are required. Multiple can be defined. (see [below for nested schema](#rulesrequired_code_scanningrequired_code_scanning_tool)) + +#### rules.required_code_scanning.required_code_scanning_tool + +- `alerts_threshold` - (Required) (String) The severity level at which code scanning results that raise alerts block a reference update. Can be one of: `none`, `errors`, `errors_and_warnings`, `all`. + +- `security_alerts_threshold` - (Required) (String) The severity level at which code scanning results that raise security alerts block a reference update. Can be one of: `none`, `critical`, `high_or_higher`, `medium_or_higher`, `all`. + +- `tool` - (Required) (String) The name of a code scanning tool. + +#### rules.tag_name_pattern + +- `operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + +- `pattern` - (Required) (String) The pattern to match with. + +- `name` - (Optional) (String) How this rule will appear to users. + +- `negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches. + +#### rules.file_path_restriction + +- `restricted_file_paths` - (Required) (Block Set, Min: 1) The file paths that are restricted from being pushed to the commit graph. + +#### rules.max_file_size + +- `max_file_size` - (Required) (Integer) The maximum allowed size, in megabytes (MB), of a file. Valid range is 1-100 MB. + +#### rules.max_file_path_length + +- `max_file_path_length` - (Required) (Integer) The maximum number of characters allowed in file paths. + +#### rules.file_extension_restriction + +- `restricted_file_extensions` - (Required) (Block Set, Min: 1) The file extensions that are restricted from being pushed to the commit graph. + +#### bypass_actors + +- `actor_id` - (Optional) (Number) The ID of the actor that can bypass a ruleset. Some actor types such as `DeployKey` do not have an ID. + +- `actor_type` (String) The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`. + +- `bypass_mode` - (Optional) (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`, `exempt`. + +~>Note: at the time of writing this, the following actor types correspond to the following actor IDs: + +- `OrganizationAdmin` -> `1` +- `RepositoryRole` (This is the actor type, the following are the base repository roles and their associated IDs.) + - `maintain` -> `2` + - `write` -> `4` + - `admin` -> `5` + +#### conditions + +- `ref_name` - (Optional) (Block List, Max: 1) Required for `branch` and `tag` targets. Must NOT be set for `push` targets. (see [below for nested schema](#conditionsref_name)) +- `repository_id` (Optional) (List of Number) The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. Conflicts with `repository_name`. +- `repository_name` (Optional) (Block List, Max: 1) Conflicts with `repository_id`. (see [below for nested schema](#conditionsrepository_name)) + +One of `repository_id` and `repository_name` must be set for the rule to target any repositories. + +~> **Note:** For `push` targets, do not include `ref_name` in conditions. Push rulesets operate on file content, not on refs. + +#### conditions.ref_name + +- `exclude` - (Required) (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + +- `include` - (Required) (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + +#### conditions.repository_name + +- `exclude` - (Required) (List of String) Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match. +- `include` - (Required) (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. +- `protected` - (Optional) (Boolean) Whether renaming of target repositories is prevented. Defaults to `false`. + +## Attributes Reference + +The following additional attributes are exported: + +- `etag` (String) + +- `node_id` (String) GraphQL global node id for use with v4 API. + +- `ruleset_id` (Number) GitHub ID for the ruleset. + +## Import + +GitHub Organization Rulesets can be imported using the GitHub ruleset ID e.g. + +`$ terraform import github_organization_ruleset.example 12345` diff --git a/templates/resources/organization_security_manager.md.tmpl b/templates/resources/organization_security_manager.md.tmpl new file mode 100644 index 0000000000..dbd4862f96 --- /dev/null +++ b/templates/resources/organization_security_manager.md.tmpl @@ -0,0 +1,31 @@ +--- +page_title: "GitHub: github_organization_security_manager" +description: |- + Manages the Security manager teams for a GitHub Organization. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization_security_manager + +~> **Note:** This resource is deprecated, please use the `github_organization_role_team` resource instead. + +## Example Usage + +{{tffile "examples/resources/organization_security_manager/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `team_slug` - (Required) The slug of the team to manage. + +## Import + +GitHub Security Manager Teams can be imported using the GitHub team ID e.g. + +```text +$ terraform import github_organization_security_manager.core 1234567 +``` diff --git a/templates/resources/organization_settings.md.tmpl b/templates/resources/organization_settings.md.tmpl new file mode 100644 index 0000000000..489951fa37 --- /dev/null +++ b/templates/resources/organization_settings.md.tmpl @@ -0,0 +1,62 @@ +--- +page_title: "GitHub: github_organization_settings" +description: |- + Creates and manages settings for a GitHub Organization. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization_settings + +This resource allows you to create and manage settings for a GitHub Organization. + +## Example Usage + +{{tffile "examples/resources/organization_settings/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `billing_email` - (Required) The billing email address for the organization. +* `company` - (Optional) The company name for the organization. +* `blog` - (Optional) The blog URL for the organization. +* `email` - (Optional) The email address for the organization. +* `twitter_username` - (Optional) The Twitter username for the organization. +* `location` - (Optional) The location for the organization. +* `name` - (Optional) The name for the organization. +* `description` - (Optional) The description for the organization. +* `has_organization_projects` - (Optional) Whether or not organization projects are enabled for the organization. +* `has_repository_projects` - (Optional) Whether or not repository projects are enabled for the organization. +* `default_repository_permission` - (Optional) The default permission for organization members to create new repositories. Can be one of `read`, `write`, `admin`, or `none`. Defaults to `read`. +* `members_can_create_repositories` - (Optional) Whether or not organization members can create new repositories. Defaults to `true`. +* `members_can_create_public_repositories` - (Optional) Whether or not organization members can create new public repositories. Defaults to `true`. +* `members_can_create_private_repositories` - (Optional) Whether or not organization members can create new private repositories. Defaults to `true`. +* `members_can_create_internal_repositories` - (Optional) Whether or not organization members can create new internal repositories. For Enterprise Organizations only. +* `members_can_create_pages` - (Optional) Whether or not organization members can create new pages. Defaults to `true`. +* `members_can_create_public_pages` - (Optional) Whether or not organization members can create new public pages. Defaults to `true`. +* `members_can_create_private_pages` - (Optional) Whether or not organization members can create new private pages. Defaults to `true`. +* `members_can_fork_private_repositories` - (Optional) Whether or not organization members can fork private repositories. Defaults to `false`. +* `web_commit_signoff_required` - (Optional) Whether or not commit signatures are required for commits to the organization. Defaults to `false`. +* `advanced_security_enabled_for_new_repositories` - (Optional) Whether or not advanced security is enabled for new repositories. Defaults to `false`. +* `dependabot_alerts_enabled_for_new_repositories` - (Optional) Whether or not dependabot alerts are enabled for new repositories. Defaults to `false`. +* `dependabot_security_updates_enabled_for_new_repositories` - (Optional) Whether or not dependabot security updates are enabled for new repositories. Defaults to `false`. +* `dependency_graph_enabled_for_new_repositories` - (Optional) Whether or not dependency graph is enabled for new repositories. Defaults to `false`. +* `secret_scanning_enabled_for_new_repositories` - (Optional) Whether or not secret scanning is enabled for new repositories. Defaults to `false`. +* `secret_scanning_push_protection_enabled_for_new_repositories` - (Optional) Whether or not secret scanning push protection is enabled for new repositories. Defaults to `false`. + +## Attributes Reference + +The following additional attributes are exported: + +* `id` - The ID of the organization settings. + +## Import + +Organization settings can be imported using the `id` of the organization. The `id` of the organization can be found using the [get an organization](https://docs.github.com/en/rest/orgs/orgs#get-an-organization) API. + +``` +$ terraform import github_organization_settings.test 123456789 +``` diff --git a/templates/resources/organization_webhook.md.tmpl b/templates/resources/organization_webhook.md.tmpl new file mode 100644 index 0000000000..de2b5b05de --- /dev/null +++ b/templates/resources/organization_webhook.md.tmpl @@ -0,0 +1,45 @@ +--- +page_title: "GitHub: github_organization_webhook" +description: |- + Creates and manages webhooks for GitHub organizations +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_organization_webhook + +This resource allows you to create and manage webhooks for GitHub organization. + +## Example Usage + +{{tffile "examples/resources/organization_webhook/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `events` - (Required) A list of events which should trigger the webhook. See a list of [available events](https://developer.github.com/v3/activity/events/types/) + +* `configuration` - (Required) key/value pair of configuration for this webhook. Available keys are `url`, `content_type`, `secret` and `insecure_ssl`. + +* `active` - (Optional) Indicate of the webhook should receive events. Defaults to `true`. + +* `name` - (Optional) The type of the webhook. `web` is the default and the only option. + +## Attributes Reference + +The following additional attributes are exported: + +* `url` - URL of the webhook + +## Import + +Organization webhooks can be imported using the `id` of the webhook. The `id` of the webhook can be found in the URL of the webhook. For example, `"https://github.com/organizations/foo-org/settings/hooks/123456789"`. + +``` +$ terraform import github_organization_webhook.terraform 123456789 +``` + +If secret is populated in the webhook's configuration, the value will be imported as "********". diff --git a/templates/resources/project_card.md.tmpl b/templates/resources/project_card.md.tmpl new file mode 100644 index 0000000000..5baa986a80 --- /dev/null +++ b/templates/resources/project_card.md.tmpl @@ -0,0 +1,45 @@ +--- +page_title: "GitHub: github_project_card" +description: |- + Creates and manages project cards for GitHub projects +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_project_card + +!> **Warning:** This resource no longer works as the [Projects (classic) REST API](https://docs.github.com/en/rest/projects/projects?apiVersion=2022-11-28) has been [removed](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) and as such has been deprecated. It will be removed in a future release. + +This resource allows you to create and manage cards for GitHub projects. + +## Example Usage + +{{tffile "examples/resources/project_card/example_1.tf"}} + +## Example Usage adding an Issue to a Project + +{{tffile "examples/resources/project_card/example_2.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `column_id` - (Required) The ID of the card. + +* `note` - (Optional) The note contents of the card. Markdown supported. + +* `content_id` - (Optional) [`github_issue.issue_id`](issue.html#argument-reference). + +* `content_type` - (Optional) Must be either `Issue` or `PullRequest` + +**Remarks:** You must either set the `note` attribute or both `content_id` and `content_type`. See [note example](#example-usage) or [issue example](#example-usage-adding-an-issue-to-a-project) for more information. + +## Import + +A GitHub Project Card can be imported using its [Card ID](https://developer.github.com/v3/projects/cards/#get-a-project-card): + +``` +$ terraform import github_project_card.card 01234567 +``` diff --git a/templates/resources/project_column.md.tmpl b/templates/resources/project_column.md.tmpl new file mode 100644 index 0000000000..0c03a37b68 --- /dev/null +++ b/templates/resources/project_column.md.tmpl @@ -0,0 +1,27 @@ +--- +page_title: "GitHub: github_project_column" +description: |- + Creates and manages project columns for GitHub projects +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_project_column + +!> **Warning:** This resource no longer works as the [Projects (classic) REST API](https://docs.github.com/en/rest/projects/projects?apiVersion=2022-11-28) has been [removed](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) and as such has been deprecated. It will be removed in a future release. + +This resource allows you to create and manage columns for GitHub projects. + +## Example Usage + +{{tffile "examples/resources/project_column/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `project_id` - (Required) The ID of an existing project that the column will be created in. + +* `name` - (Required) The name of the column. diff --git a/templates/resources/release.md.tmpl b/templates/resources/release.md.tmpl new file mode 100644 index 0000000000..189de525d4 --- /dev/null +++ b/templates/resources/release.md.tmpl @@ -0,0 +1,75 @@ +--- +page_title: "GitHub: github_release" +description: |- + Creates and manages releases within a single GitHub repository +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_release + +This resource allows you to create and manage a release in a specific GitHub repository. + +## Example Usage + +{{tffile "examples/resources/release/example_1.tf"}} + +## Example Usage on Non-Default Branch + +{{tffile "examples/resources/release/example_2.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `repository` - (Required) The name of the repository. + +* `tag_name` - (Required) The name of the tag. + +* `target_commitish` - (Optional) The branch name or commit SHA the tag is created from. Defaults to the default branch of the repository. + +* `name` - (Optional) The name of the release. + +* `body` - (Optional) Text describing the contents of the tag. + +* `draft` - (Optional) Set to `false` to create a published release. + +* `prerelease` - (Optional) Set to `false` to identify the release as a full release. + +* `generate_release_notes` - (Optional) Set to `true` to automatically generate the name and body for this release. If `name` is specified, the specified `name` will be used; otherwise, a name will be automatically generated. If `body` is specified, the `body` will be pre-pended to the automatically generated notes. + +* `discussion_category_name` - (Optional) If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see [Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository). + +## Attributes Reference + +The following additional attributes are exported: + +* `release_id` - The ID of the release. + +* `created_at` - This is the date of the commit used for the release, and not the date when the release was drafted or published. + +* `published_at` - This is the date when the release was published. This will be empty if the release is a draft. + +* `html_url` - URL of the release in GitHub. + +* `url` - URL that can be provided to API calls that reference this release. + +* `assets_url` - URL that can be provided to API calls displaying the attached assets to this release. + +* `upload_url` - URL that can be provided to API calls to upload assets. + +* `zipball_url` - URL that can be provided to API calls to fetch the release ZIP archive. + +* `tarball_url` - URL that can be provided to API calls to fetch the release TAR archive. + +* `node_id` - GraphQL global node id for use with v4 API + +## Import + +This resource can be imported using the `name` of the repository, combined with the `id` of the release, and a `:` character for separating components, e.g. + +```sh +$ terraform import github_release.example repo:12345678 +``` diff --git a/templates/resources/repository.md.tmpl b/templates/resources/repository.md.tmpl new file mode 100644 index 0000000000..062f8ab7ab --- /dev/null +++ b/templates/resources/repository.md.tmpl @@ -0,0 +1,214 @@ +--- +page_title: "GitHub: github_repository" +description: |- + Creates and manages repositories within GitHub organizations or personal accounts +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository + +This resource allows you to create and manage repositories within your GitHub organization or personal account. + +~> **Note** When used with GitHub App authentication, even GET requests must have the `contents:write` permission. Without it, the following arguments will be ignored, leading to unexpected behavior and confusing diffs: `allow_merge_commit`, `allow_squash_merge`, `allow_rebase_merge`, `merge_commit_title`, `merge_commit_message`, `squash_merge_commit_title` and `squash_merge_commit_message`. + +## Example Usage + +{{tffile "examples/resources/repository/example_1.tf"}} + +## Example Usage with GitHub Pages Enabled + +{{tffile "examples/resources/repository/example_2.tf"}} + +## Example Usage with Repository Forking + +{{tffile "examples/resources/repository/example_3.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name of the repository. + +* `description` - (Optional) A description of the repository. + +* `homepage_url` - (Optional) URL of a page describing the project. + +* `fork` - (Optional) Set to `true` to create a fork of an existing repository. When set to `true`, both `source_owner` and `source_repo` must also be specified. + +* `source_owner` - (Optional) The GitHub username or organization that owns the repository being forked. Required when `fork` is `true`. + +* `source_repo` - (Optional) The name of the repository to fork. Required when `fork` is `true`. + +* `private` - (Optional) Set to `true` to create a private repository. Repositories are created as public (e.g. open source) by default. + +* `visibility` - (Optional) Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be `internal`. The `visibility` parameter overrides the `private` parameter. + +* `has_issues` - (Optional) Set to `true` to enable the GitHub Issues features on the repository. + +* `has_discussions` - (Optional) Set to `true` to enable GitHub Discussions on the repository. Defaults to `false`. + +* `has_projects` - (Optional) Set to `true` to enable the GitHub Projects features on the repository. Per the GitHub [documentation](https://developer.github.com/v3/repos/#create) when in an organization that has disabled repository projects it will default to `false` and will otherwise default to `true`. If you specify `true` when it has been disabled it will return an error. + +* `has_wiki` - (Optional) Set to `true` to enable the GitHub Wiki features on the repository. + +* `is_template` - (Optional) Set to `true` to tell GitHub that this is a template repository. + +* `allow_merge_commit` - (Optional) Set to `false` to disable merge commits on the repository. + +* `allow_squash_merge` - (Optional) Set to `false` to disable squash merges on the repository. + +* `allow_rebase_merge` - (Optional) Set to `false` to disable rebase merges on the repository. + +* `allow_auto_merge` - (Optional) Set to `true` to allow auto-merging pull requests on the repository. + +* `allow_forking` - (Optional) Configure private forking for organization owned private and internal repositories; set to `true` to enable, `false` to disable, and leave unset for the default behaviour. Configuring this requires that private forking is not being explicitly configured at the organization level. + +* `squash_merge_commit_title` - (Optional) Can be `PR_TITLE` or `COMMIT_OR_PR_TITLE` for a default squash merge commit title. Applicable only if `allow_squash_merge` is `true`. + +* `squash_merge_commit_message` - (Optional) Can be `PR_BODY`, `COMMIT_MESSAGES`, or `BLANK` for a default squash merge commit message. Applicable only if `allow_squash_merge` is `true`. + +* `merge_commit_title` - Can be `PR_TITLE` or `MERGE_MESSAGE` for a default merge commit title. Applicable only if `allow_merge_commit` is `true`. + +* `merge_commit_message` - Can be `PR_BODY`, `PR_TITLE`, or `BLANK` for a default merge commit message. Applicable only if `allow_merge_commit` is `true`. + +* `delete_branch_on_merge` - (Optional) Automatically delete head branch after a pull request is merged. Defaults to `false`. + +* `web_commit_signoff_required` - (Optional) Require contributors to sign off on web-based commits. See more [here](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-the-commit-signoff-policy-for-your-repository). + +* `has_downloads` - (**DEPRECATED**) (Optional) Set to `true` to enable the (deprecated) downloads features on the repository. This attribute is no longer in use, but it hasn't been removed yet. It will be removed in a future version. See [this discussion](https://github.com/orgs/community/discussions/102145#discussioncomment-8351756). + +* `auto_init` - (Optional) Set to `true` to produce an initial commit in the repository. + +* `gitignore_template` - (Optional) Use the [name of the template](https://github.com/github/gitignore) without the extension. For example, "Haskell". + +* `license_template` - (Optional) Use the [name of the template](https://github.com/github/choosealicense.com/tree/gh-pages/_licenses) without the extension. For example, "mit" or "mpl-2.0". + +* `default_branch` - (Optional) (Deprecated: Use `github_branch_default` resource instead) The name of the default branch of the repository. **NOTE:** This can only be set after a repository has already been created, and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the initial repository creation and create the target branch inside of the repository prior to setting this attribute. + +* `archived` - (Optional) Specifies if the repository should be archived. Defaults to `false`. **NOTE** Currently, the API does not support unarchiving. + +* `archive_on_destroy` - (Optional) Set to `true` to archive the repository instead of deleting on destroy. + +* `pages` - (Optional) The repository's GitHub Pages configuration. See [GitHub Pages Configuration](#github-pages-configuration) below for details. + +* `security_and_analysis` - (Optional) The repository's [security and analysis](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository) configuration. See [Security and Analysis Configuration](#security-and-analysis-configuration) below for details. + +* `topics` - (Optional) The list of topics of the repository. + +~> Note: This attribute is not compatible with the `github_repository_topics` resource. Use one of them. `github_repository_topics` is only meant to be used if the repository itself is not handled via terraform, for example if it's only read as a datasource (see [issue #1845](https://github.com/integrations/terraform-provider-github/issues/1845)). + +* `template` - (Optional) Use a template repository to create this resource. See [Template Repositories](#template-repositories) below for details. + +* `vulnerability_alerts` - (Optional) Configure [Dependabot security alerts](https://help.github.com/en/github/managing-security-vulnerabilities/about-security-alerts-for-vulnerable-dependencies) for vulnerable dependencies; set to `true` to enable, set to `false` to disable, and leave unset for the default behavior. Configuring this requires that alerts are not being explicitly configured at the organization level. + +* `ignore_vulnerability_alerts_during_read` (**DEPRECATED**) (Optional) - This is ignored as the provider now handles lack of permissions automatically. + +* `allow_update_branch` (Optional) - Set to `true` to always suggest updating pull request branches. + +### GitHub Pages Configuration + +The `pages` block supports the following: + +* `source` - (Optional) The source branch and directory for the rendered Pages site. See [GitHub Pages Source](#github-pages-source) below for details. + +* `build_type` - (Optional) The type of GitHub Pages site to build. Can be `legacy` or `workflow`. If you use `legacy` as build type you need to set the option `source`. + +* `cname` - (Optional) The custom domain for the repository. This can only be set after the repository has been created. + +#### GitHub Pages Source + +The `source` block supports the following: + +* `branch` - (Required) The repository branch used to publish the site's source files. (i.e. `main` or `gh-pages`. + +* `path` - (Optional) The repository directory from which the site publishes (Default: `/`). + +### Security and Analysis Configuration + +The `security_and_analysis` block supports the following: + +* `advanced_security` - (Optional) The advanced security configuration for the repository. See [Advanced Security Configuration](#advanced-security-configuration) below for details. If a repository's visibility is `public`, advanced security is always enabled and cannot be changed, so this setting cannot be supplied. + +* `code_security` - (Optional) The code security configuration for the repository. See [Code Security](#code-security-configuration) below for details. + +* `secret_scanning` - (Optional) The secret scanning configuration for the repository. See [Secret Scanning Configuration](#secret-scanning-configuration) below for details. + +* `secret_scanning_push_protection` - (Optional) The secret scanning push protection configuration for the repository. See [Secret Scanning Push Protection Configuration](#secret-scanning-push-protection-configuration) below for details. + +* `secret_scanning_ai_detection` - (Optional) The secret scanning ai detection configuration for the repository. See [Secret Scanning AI Detection Configuration](#secret-scanning-ai-detection-configuration) below for details. + +* `secret_scanning_non_provider_patterns` - (Optional) The secret scanning non-provider patterns configuration for this repository. See [Secret Scanning Non-Provider Patterns Configuration](#secret-scanning-non-provider-patterns-configuration) below for more details. + +#### Advanced Security Configuration + +The `advanced_security` block supports the following: + +* `status` - (Required) Set to `enabled` to enable advanced security features on the repository. Can be `enabled` or `disabled`. + +#### Code Security Configuration + +* `status` - (Required) Set to `enabled` to enable GitHub Code Security on the repository. Can be `enabled` or `disabled`. If set to `enabled`, the repository's visibility must be `public`, `security_and_analysis[0].advanced_security[0].status` must also be set to `enabled`, or your Organization must have split licensing for Advanced security. + +#### Secret Scanning Configuration + +* `status` - (Required) Set to `enabled` to enable secret scanning on the repository. Can be `enabled` or `disabled`. If set to `enabled`, the repository's visibility must be `public`, `security_and_analysis[0].advanced_security[0].status` must also be set to `enabled`, or your Organization must have split licensing for Advanced security. + +#### Secret Scanning Push Protection Configuration + +* `status` - (Required) Set to `enabled` to enable secret scanning push protection on the repository. Can be `enabled` or `disabled`. If set to `enabled`, the repository's visibility must be `public`, `security_and_analysis[0].advanced_security[0].status` must also be set to `enabled`, or your Organization must have split licensing for Advanced security. + +#### Secret Scanning AI Detection + +* `status` - (Required) Set to `enabled` to enable secret scanning AI detection on the repository. Can be `enabled` or `disabled`. If set to `enabled`, the repository's visibility must be `public`, `security_and_analysis[0].advanced_security[0].status` must also be set to `enabled`, or your Organization must have split licensing for Advanced security. + +#### Secret Scanning Non-Provider Patterns + +* `status` - (Required) Set to `enabled` to enable secret scanning non-provider patterns on the repository. Can be `enabled` or `disabled`. If set to `enabled`, the repository's visibility must be `public`, `security_and_analysis[0].advanced_security[0].status` must also be set to `enabled`, or your Organization must have split licensing for Advanced security. + +### Template Repositories + +`template` supports the following arguments: + +* `owner`: The GitHub organization or user the template repository is owned by. +* `repository`: The name of the template repository. +* `include_all_branches`: Whether the new repository should include all the branches from the template repository (defaults to false, which includes only the default branch from the template). + +~> **Note on `internal` visibility with templates**: When creating a repository from a template with `visibility = "internal"`, the provider uses a two-step process due to GitHub API limitations. The template creation API only supports a `private` boolean parameter. Therefore, repositories with `visibility = "internal"` are initially created as private and then immediately updated to internal visibility. This ensures internal repositories are never exposed publicly during creation. + +## Attributes Reference + +The following additional attributes are exported: + +* `full_name` - A string of the form "orgname/reponame". + +* `html_url` - URL to the repository on the web. + +* `ssh_clone_url` - URL that can be provided to `git clone` to clone the repository via SSH. + +* `http_clone_url` - URL that can be provided to `git clone` to clone the repository via HTTPS. + +* `git_clone_url` - URL that can be provided to `git clone` to clone the repository anonymously via the git protocol. + +* `svn_url` - URL that can be provided to `svn checkout` to check out the repository via GitHub's Subversion protocol emulation. + +* `node_id` - GraphQL global node id for use with v4 API + +* `repo_id` - GitHub ID for the repository + +* `primary_language` - The primary language used in the repository. + +* `pages` - The block consisting of the repository's GitHub Pages configuration with the following additional attributes: +* `custom_404` - Whether the rendered GitHub Pages site has a custom 404 page. +* `html_url` - The absolute URL (including scheme) of the rendered GitHub Pages site e.g. `https://username.github.io`. +* `status` - The GitHub Pages site's build status e.g. `building` or `built`. + +## Import + +Repositories can be imported using the `name`, e.g. + +```shell +terraform import github_repository.terraform myrepo +``` diff --git a/templates/resources/repository_autolink_reference.md.tmpl b/templates/resources/repository_autolink_reference.md.tmpl new file mode 100644 index 0000000000..1da2884033 --- /dev/null +++ b/templates/resources/repository_autolink_reference.md.tmpl @@ -0,0 +1,53 @@ +--- +page_title: "GitHub: github_repository_autolink_reference" +description: |- + Creates and manages autolink references for a single repository +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_autolink_reference + +This resource allows you to create and manage an autolink reference for a single repository. + +## Example Usage + +{{tffile "examples/resources/repository_autolink_reference/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `repository` - (Required) The repository of the autolink reference. + +* `key_prefix` - (Required) This prefix appended by a number will generate a link any time it is found in an issue, pull request, or commit. + +* `target_url_template` - (Required) The template of the target URL used for the links; must be a valid URL and contain `` for the reference number + +* `is_alphanumeric` - (Optional) Whether this autolink reference matches alphanumeric characters. If false, this autolink reference only matches numeric characters. Default is true. + +## Attributes Reference + +The following additional attributes are exported: + +* `etag` - An etag representing the autolink reference object. + +## Import + +Autolink references can be imported using the `name` of the repository, combined with the `id` or `key prefix` of the autolink reference and a `/` character for separating components, e.g. + +### Import by ID + +```sh +terraform import github_repository_autolink_reference.auto my-repo/123 +``` + +See the GitHub documentation for how to [list all autolinks of a repository](https://docs.github.com/en/rest/repos/autolinks#list-all-autolinks-of-a-repository) to learn the autolink ids to use with the import command. + +### Import by key prefix + +```sh +terraform import github_repository_autolink_reference.auto oof/OOF- +``` diff --git a/templates/resources/repository_collaborator.md.tmpl b/templates/resources/repository_collaborator.md.tmpl new file mode 100644 index 0000000000..a8e65549bf --- /dev/null +++ b/templates/resources/repository_collaborator.md.tmpl @@ -0,0 +1,59 @@ +--- +page_title: "GitHub: github_repository_collaborator" +description: |- + Provides a GitHub repository collaborator resource. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_collaborator + +Provides a GitHub repository collaborator resource. + +~> Note: github_repository_collaborator cannot be used in conjunction with github_repository_collaborators or they will fight over what your policy should be. + +This resource allows you to add/remove collaborators from repositories in your organization or personal account. For organization repositories, collaborators can have explicit (and differing levels of) read, write, or administrator access to specific repositories, without giving the user full organization membership. For personal repositories, collaborators can only be granted write (implicitly includes read) permission. + +When applied, an invitation will be sent to the user to become a collaborator on a repository. When destroyed, either the invitation will be cancelled or the collaborator will be removed from the repository. + +~> **Note on Archived Repositories**: When a repository is archived, GitHub makes it read-only, preventing collaborator modifications. If you attempt to destroy resources associated with archived repositories, the provider will gracefully handle the operation by logging an informational message and removing the resource from Terraform state without attempting to modify the archived repository. + +This resource is non-authoritative, for managing ALL collaborators of a repo, use github_repository_collaborators instead. + +Further documentation on GitHub collaborators: + +- [Adding outside collaborators to your personal repositories](https://help.github.com/en/github/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories) +- [Adding outside collaborators to repositories in your organization](https://help.github.com/articles/adding-outside-collaborators-to-repositories-in-your-organization/) +- [Converting an organization member to an outside collaborator](https://help.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/) + +## Example Usage + +{{tffile "examples/resources/repository_collaborator/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `repository` - (Required) The GitHub repository + +~> Note: The owner of the repository can be passed as part of the repository name e.g. `owner-org-name/repo-name`. If owner is not supplied as part of the repository name, it may also be supplied by setting the environment variable `GITHUB_OWNER`. + +* `username` - (Required) The user to add to the repository as a collaborator. +* `permission` - (Optional) The permission of the outside collaborator for the repository. Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories. Must be `push` for personal repositories. Defaults to `push`. +* `permission_diff_suppression` - (Optional) Suppress plan diffs for `triage` and `maintain`. Defaults to `false`. + +## Attribute Reference + +In addition to the above arguments, the following attributes are exported: + +* `invitation_id` - ID of the invitation to be used in [`github_user_invitation_accepter`](./user_invitation_accepter.html) + +## Import + +GitHub Repository Collaborators can be imported using an ID made up of `repository:username`, e.g. + +``` +$ terraform import github_repository_collaborator.collaborator terraform:someuser +``` diff --git a/templates/resources/repository_collaborators.md.tmpl b/templates/resources/repository_collaborators.md.tmpl new file mode 100644 index 0000000000..16dfa77306 --- /dev/null +++ b/templates/resources/repository_collaborators.md.tmpl @@ -0,0 +1,70 @@ +--- +page_title: "GitHub: github_repository_collaborators" +description: |- + Provides a GitHub repository collaborators resource. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_collaborators + +Provides a GitHub repository collaborators resource. + +~> Note: github_repository_collaborators cannot be used in conjunction with github_repository_collaborator and github_team_repository or they will fight over what your policy should be. + +This resource allows you to manage all collaborators for repositories in your organization or personal account. For organization repositories, collaborators can have explicit (and differing levels of) read, write, or administrator access to specific repositories, without giving the user full organization membership. For personal repositories, collaborators can only be granted write (implicitly includes read) permission. + +When applied, an invitation will be sent to the user to become a collaborators on a repository. When destroyed, either the invitation will be cancelled or the collaborators will be removed from the repository. + +~> **Note on Archived Repositories**: When a repository is archived, GitHub makes it read-only, preventing collaborator modifications. If you attempt to destroy resources associated with archived repositories, the provider will gracefully handle the operation by logging an informational message and removing the resource from Terraform state without attempting to modify the archived repository. + +This resource is authoritative. For adding a collaborator to a repo in a non-authoritative manner, use github_repository_collaborator instead. + +Further documentation on GitHub collaborators: + +- [Adding outside collaborators to your personal repositories](https://help.github.com/en/github/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories) +- [Adding outside collaborators to repositories in your organization](https://help.github.com/articles/adding-outside-collaborators-to-repositories-in-your-organization/) +- [Converting an organization member to an outside collaborators](https://help.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/) + +## Example Usage + +{{tffile "examples/resources/repository_collaborators/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `repository` - (Required) The GitHub repository. +* `user` - (Optional) List of users to grant access to the repository. +* `team` - (Optional) List of teams to grant access to the repository. +* `ignore_team` - (Optional) List of teams to ignore when checking for repository access. This supports ignoring teams granted access at an organizational level. + +The `user` block supports: + +* `username` - (Required) The user to add to the repository as a collaborator. +* `permission` - (Optional) The permission of the outside collaborators for the repository. Must be one of `pull`, `push`, `maintain`, `triage` or `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organization for organization-owned repositories. Must be `push` for personal repositories. Defaults to `push`. + +The `team` block supports: + +* `team_id` - (Required) The GitHub team id or the GitHub team slug. +* `permission` - (Optional) The permission of the outside collaborators for the repository. Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. Must be `push` for personal repositories. Defaults to `push`. + +The `ignore_team` block supports: + +* `team_id` - (Required) The GitHub team id or the GitHub team slug. + +## Attribute Reference + +In addition to the above arguments, the following attributes are exported: + +* `invitation_ids` - Map of usernames to invitation ID for any users added as part of creation of this resource to be used in [`github_user_invitation_accepter`](./user_invitation_accepter.html). + +## Import + +GitHub Repository Collaborators can be imported using the name `name`, e.g. + +``` +$ terraform import github_repository_collaborators.collaborators terraform +``` diff --git a/templates/resources/repository_custom_property.md.tmpl b/templates/resources/repository_custom_property.md.tmpl new file mode 100644 index 0000000000..bec866451a --- /dev/null +++ b/templates/resources/repository_custom_property.md.tmpl @@ -0,0 +1,39 @@ +--- +page_title: "GitHub: github_repository_custom_property" +description: |- + Creates and a specific custom property for a GitHub repository +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_custom_property + +This resource allows you to create and manage a specific custom property for a GitHub repository. + +## Example Usage + +> Note that this assumes there already is a custom property defined on the org level called `my-cool-property` of type `string` + +{{tffile "examples/resources/repository_custom_property/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `repository` - (Required) The repository of the environment. + +* `property_type` - (Required) Type of the custom property. Can be one of `single_select`, `multi_select`, `string`, or `true_false` + +* `property_name` - (Required) Name of the custom property. Note that a pre-requisiste for this resource is that a custom property of this name has already been defined on the organization level + +* `property_value` - (Required) Value of the custom property in the form of an array. Properties of type `single_select`, `string`, and `true_false` are represented as a string array of length 1 + +## Import + +GitHub Repository Custom Property can be imported using an ID made up of a combination of the names of the organization, repository, custom property separated by a `:` character, e.g. + +``` +$ terraform import github_repository_custom_property.example organization-name:repo-name:custom-property-name +``` diff --git a/templates/resources/repository_dependabot_security_updates.md.tmpl b/templates/resources/repository_dependabot_security_updates.md.tmpl new file mode 100644 index 0000000000..af94f5d512 --- /dev/null +++ b/templates/resources/repository_dependabot_security_updates.md.tmpl @@ -0,0 +1,35 @@ +--- +page_title: "GitHub: github_repository_dependabot_security_updates" +description: |- + Manages automated security fixes for a single repository +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_dependabot_security_updates + +This resource allows you to manage dependabot automated security fixes for a single repository. See the [documentation](https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates) for details of usage and how this will impact your repository + +## Example Usage + +{{tffile "examples/resources/repository_dependabot_security_updates/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `repository` - (Required) The name of the GitHub repository. + +* `enabled` - (Required) The state of the automated security fixes. + +## Import + +Automated security references can be imported using the `name` of the repository + +### Import by name + +```sh +terraform import github_repository_dependabot_security_updates.example my-repo +``` diff --git a/templates/resources/repository_deploy_key.md.tmpl b/templates/resources/repository_deploy_key.md.tmpl new file mode 100644 index 0000000000..989c42e0dd --- /dev/null +++ b/templates/resources/repository_deploy_key.md.tmpl @@ -0,0 +1,45 @@ +--- +page_title: "GitHub: github_repository_deploy_key" +description: |- + Provides a GitHub repository deploy key resource. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_deploy_key + +Provides a GitHub repository deploy key resource. + +A deploy key is an SSH key that is stored on your server and grants access to a single GitHub repository. This key is attached directly to the repository instead of to a personal user account. + +This resource allows you to add/remove repository deploy keys. + +~> **Note on Archived Repositories**: When a repository is archived, GitHub makes it read-only, preventing deploy key modifications. If you attempt to destroy resources associated with archived repositories, the provider will gracefully handle the operation by logging an informational message and removing the resource from Terraform state without attempting to modify the archived repository. + +Further documentation on GitHub repository deploy keys: +- [About deploy keys](https://developer.github.com/guides/managing-deploy-keys/#deploy-keys) + +## Example Usage + +{{tffile "examples/resources/repository_deploy_key/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `key` - (Required) A SSH key. +* `read_only` - (Required) A boolean qualifying the key to be either read only or read/write. +* `repository` - (Required) Name of the GitHub repository. +* `title` - (Required) A title. + +Changing any of the fields forces re-creating the resource. + +## Import + +Repository deploy keys can be imported using a colon-separated pair of repository name and GitHub's key id. The latter can be obtained by GitHub's SDKs and API. + +``` +$ terraform import github_repository_deploy_key.foo test-repo:23824728 +``` diff --git a/templates/resources/repository_deployment_branch_policy.md.tmpl b/templates/resources/repository_deployment_branch_policy.md.tmpl new file mode 100644 index 0000000000..9062abd22c --- /dev/null +++ b/templates/resources/repository_deployment_branch_policy.md.tmpl @@ -0,0 +1,41 @@ +--- +page_title: "GitHub: github_repository_deployment_branch_policy" +description: |- + Creates and manages deployment branch policies +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_deployment_branch_policy + +~> **Note:** This resource is deprecated, please use the `github_repository_environment_deployment_policy` resource instead. + +This resource allows you to create and manage deployment branch policies. + +## Example Usage + +{{tffile "examples/resources/repository_deployment_branch_policy/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `repository` - (Required) The repository to create the policy in. + +* `environment_name` - (Required) The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. + +* `name` - (Required) The name pattern that branches must match in order to deploy to the environment. + +## Attributes Reference + +The following additional attributes are exported: + +* `id` - The ID of the deployment branch policy. + +## Import + +```text +$ terraform import github_repository_deployment_branch_policy.foo repo:env:id +``` diff --git a/templates/resources/repository_environment.md.tmpl b/templates/resources/repository_environment.md.tmpl new file mode 100644 index 0000000000..4919c2648a --- /dev/null +++ b/templates/resources/repository_environment.md.tmpl @@ -0,0 +1,69 @@ +--- +page_title: "GitHub: github_repository_environment" +description: |- + Creates and manages environments for GitHub repositories +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_environment + +This resource allows you to create and manage environments for a GitHub repository. + +## Example Usage + +{{tffile "examples/resources/repository_environment/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +- `environment` - (Required) The name of the environment. + +- `repository` - (Required) The repository of the environment. + +- `wait_timer` - (Optional) Amount of time to delay a job after the job is initially triggered. + +- `can_admins_bypass` - (Optional) Can repository admins bypass the environment protections. Defaults to `true`. + +- `prevent_self_review` - (Optional) Whether or not a user who created the job is prevented from approving their own job. Defaults to `false`. + +### Reviewers + +The `reviewers` block supports the following: + +- `teams` - (Optional) Up to 6 IDs for teams who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. + +- `users` - (Optional) Up to 6 IDs for users who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. + +#### Deployment Branch Policy + +The `deployment_branch_policy` block supports the following: + +- `protected_branches` - (Required) Whether only branches with branch protection rules can deploy to this environment. + +- `custom_branch_policies` - (Required) Whether only branches that match the specified name patterns can deploy to this environment. + +## Attributes Reference + +- `repository_id` - The ID of the repository. + +## Import + +This resource can be imported using an ID made of the repository name and environment name (any `:` in the environment name need to be escaped as `??`) separated by a `:`. + +### Import Block + +The following import block imports an environment called `myenv` for the repo `myrepo` to a `github_repository_environment` resource named `example`. + +{{tffile "examples/resources/repository_environment/example_2.tf"}} + +### Import Command + +The following command imports an environment called `myenv` for the repo `myrepo` to a `github_repository_environment` resource named `example`. + +```shell +terraform import github_repository_environment.example myrepo:myenv +``` diff --git a/templates/resources/repository_environment_deployment_policy.md.tmpl b/templates/resources/repository_environment_deployment_policy.md.tmpl new file mode 100644 index 0000000000..e2d9f04834 --- /dev/null +++ b/templates/resources/repository_environment_deployment_policy.md.tmpl @@ -0,0 +1,58 @@ +--- +page_title: "GitHub: github_repository_environment_deployment_policy" +description: |- + Creates and manages environment deployment branch policies for GitHub repositories +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_environment_deployment_policy + +This resource allows you to create and manage environment deployment branch policies for a GitHub repository. + +## Example Usage + +Create a branch-based deployment policy: + +{{tffile "examples/resources/repository_environment_deployment_policy/example_1.tf"}} + +Create a tag-based deployment policy: + +{{tffile "examples/resources/repository_environment_deployment_policy/example_2.tf"}} + +## Argument Reference + +The following arguments are supported: + +- `environment` - (Required) The name of the environment. + +- `repository` - (Required) The repository of the environment. + +- `branch_pattern` - (Optional) The name pattern that branches must match in order to deploy to the environment. If not specified, `tag_pattern` must be specified. + +- `tag_pattern` - (Optional) The name pattern that tags must match in order to deploy to the environment. If not specified, `branch_pattern` must be specified. + +## Attributes Reference + +- `repository_id` - The ID of the repository. +- `policy_id` - The ID of the deployment policy. + +## Import + +This resource can be imported using an ID made of the repository name, environment name (any `:` in the environment name need to be escaped as `??`), and deployment policy ID name all separated by a `:`. + +### Import Block + +The following import block imports a deployment policy with the ID `123456` for the repo `myrepo` and environment `myenv` to a `github_repository_environment_deployment_policy` resource named `example`. + +{{tffile "examples/resources/repository_environment_deployment_policy/example_3.tf"}} + +### Import Command + +The following command imports a deployment policy with the ID `123456` for the repo `myrepo` and environment `myenv` to a `github_repository_environment_deployment_policy` resource named `example`. + +```shell +terraform import github_repository_environment_deployment_policy.example myrepo:myenv:123456 +``` diff --git a/templates/resources/repository_file.md.tmpl b/templates/resources/repository_file.md.tmpl new file mode 100644 index 0000000000..72060b58db --- /dev/null +++ b/templates/resources/repository_file.md.tmpl @@ -0,0 +1,77 @@ +--- +page_title: "GitHub: github_repository_file" +description: |- + Creates and manages files within a GitHub repository +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_file + +This resource allows you to create and manage files within a GitHub repository. + +~> **Note:** When a repository is archived, Terraform will skip deletion of repository files to avoid API errors, as archived repositories are read-only. The files will be removed from Terraform state without attempting to delete them from GitHub. + +## Example Usage + +### Existing Branch + +{{tffile "examples/resources/repository_file/example_1.tf"}} + +### Auto Created Branch + +{{tffile "examples/resources/repository_file/example_2.tf"}} + +## Argument Reference + +The following arguments are supported: + +- `repository` - (Required) The repository to create the file in. + +- `file` - (Required) The path of the file to manage. + +- `content` - (Required) The file content. + +- `branch` - (Optional) Git branch (defaults to the repository's default branch). The branch must already exist, it will only be created automatically if 'autocreate_branch' is set true. + +- `commit_author` - (Optional) Committer author name to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This maybe useful when a branch protection rule requires signed commits. + +- `commit_email` - (Optional) Committer email address to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This may be useful when a branch protection rule requires signed commits. + +- `commit_message` - (Optional) The commit message when creating, updating or deleting the managed file. + +- `overwrite_on_create` - (Optional) Enable overwriting existing files. If set to `true` it will overwrite an existing file with the same name. If set to `false` it will fail if there is an existing file with the same name. + +- `autocreate_branch` - (Optional) **Deprecated** Automatically create the branch if it could not be found. Defaults to false. Subsequent reads if the branch is deleted will occur from 'autocreate_branch_source_branch'. Use the `github_branch` resource instead. + +- `autocreate_branch_source_branch` - (Optional) **Deprecated** The branch name to start from, if 'autocreate_branch' is set. Defaults to 'main'. Use the `github_branch` resource instead. + +- `autocreate_branch_source_sha` - (Optional) **Deprecated** The commit hash to start from, if 'autocreate_branch' is set. Defaults to the tip of 'autocreate_branch_source_branch'. If provided, 'autocreate_branch_source_branch' is ignored. Use the `github_branch` resource instead. + +## Attributes Reference + +The following additional attributes are exported: + +- `commit_sha` - The SHA of the commit that modified the file. + +- `repository_id` - The ID of the repository. + +- `sha` - The SHA blob of the file. + +- `ref` - The name of the commit/branch/tag. + +## Import + +Repository files can be imported using a combination of the `repo`, `file` and `branch` or empty branch for the default branch, e.g. + +```sh +terraform import github_repository_file.gitignore example:.gitignore:feature-branch +``` + +and using default branch: + +```sh +terraform import github_repository_file.gitignore example:.gitignore: +``` diff --git a/templates/resources/repository_milestone.md.tmpl b/templates/resources/repository_milestone.md.tmpl new file mode 100644 index 0000000000..2f4b1ff7a6 --- /dev/null +++ b/templates/resources/repository_milestone.md.tmpl @@ -0,0 +1,49 @@ +--- +page_title: "GitHub: github_repository_milestone" +description: |- + Provides a GitHub repository milestone resource. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_milestone + +Provides a GitHub repository milestone resource. + +This resource allows you to create and manage milestones for a GitHub Repository within an organization or user account. + +## Example Usage + +{{tffile "examples/resources/repository_milestone/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `owner` - (Required) The owner of the GitHub Repository. + +* `repository` - (Required) The name of the GitHub Repository. + +* `title` - (Required) The title of the milestone. + +* `description` - (Optional) A description of the milestone. + +* `due_date` - (Optional) The milestone due date. In `yyyy-mm-dd` format. + +* `state` - (Optional) The state of the milestone. Either `open` or `closed`. Default: `open` + +## Attributes Reference + +The following additional attributes are exported: + +* `number` - The number of the milestone. + +## Import + +A GitHub Repository Milestone can be imported using an ID made up of `owner/repository/number`, e.g. + +``` +$ terraform import github_repository_milestone.example example-owner/example-repository/1 +``` diff --git a/templates/resources/repository_project.md.tmpl b/templates/resources/repository_project.md.tmpl new file mode 100644 index 0000000000..73968d92b1 --- /dev/null +++ b/templates/resources/repository_project.md.tmpl @@ -0,0 +1,35 @@ +--- +page_title: "GitHub: github_repository_project" +description: |- + Creates and manages projects for GitHub repositories +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_project + +!> **Warning:** This resource no longer works as the [Projects (classic) REST API](https://docs.github.com/en/rest/projects/projects?apiVersion=2022-11-28) has been [removed](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) and as such has been deprecated. It will be removed in a future release. + +This resource allows you to create and manage projects for GitHub repository. + +## Example Usage + +{{tffile "examples/resources/repository_project/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name of the project. + +* `repository` - (Required) The repository of the project. + +* `body` - (Optional) The body of the project. + +## Attributes Reference + +The following additional attributes are exported: + +* `url` - URL of the project diff --git a/templates/resources/repository_pull_request.md.tmpl b/templates/resources/repository_pull_request.md.tmpl new file mode 100644 index 0000000000..a088bbecc3 --- /dev/null +++ b/templates/resources/repository_pull_request.md.tmpl @@ -0,0 +1,53 @@ +--- +page_title: "GitHub: github_repository_pull_request" +description: |- + Get information on a single GitHub Pull Request. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_pull_request + +This resource allows you to create and manage PullRequests for repositories within your GitHub organization or personal account. + +## Example Usage + +{{tffile "examples/resources/repository_pull_request/example_1.tf"}} + +## Argument Reference + +* `base_repository` - (Required) Name of the base repository to retrieve the Pull Requests from. + +* `base_ref` - (Required) Name of the branch serving as the base of the Pull Request. + +* `head_ref` - (Required) Name of the branch serving as the head of the Pull Request. + +* `owner` - (Optional) Owner of the repository. If not provided, the provider's default owner is used. + +* `title` - (Optional) The title of the Pull Request. + +* `body` - (Optional) Body of the Pull Request. + +* `maintainer_can_modify` - Controls whether the base repository maintainers can modify the Pull Request. Default: false. + +## Attributes Reference + +* `base_sha` - Head commit SHA of the Pull Request base. + +* `draft` - Indicates Whether this Pull Request is a draft. + +* `head_sha` - Head commit SHA of the Pull Request head. + +* `labels` - List of label names set on the Pull Request. + +* `number` - The number of the Pull Request within the repository. + +* `opened_at` - Unix timestamp indicating the Pull Request creation time. + +* `opened_by` - GitHub login of the user who opened the Pull Request. + +* `state` - the current Pull Request state - can be "open", "closed" or "merged". + +* `updated_at` - The timestamp of the last Pull Request update. diff --git a/templates/resources/repository_ruleset.md.tmpl b/templates/resources/repository_ruleset.md.tmpl new file mode 100644 index 0000000000..10293ad8c7 --- /dev/null +++ b/templates/resources/repository_ruleset.md.tmpl @@ -0,0 +1,273 @@ +--- +page_title: "github_repository_ruleset Resource - terraform-provider-github" +description: |- + Creates a GitHub repository ruleset. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_ruleset + +Creates a GitHub repository ruleset. + +This resource allows you to create and manage rulesets on the repository level. When applied, a new ruleset will be created. When destroyed, that ruleset will be removed. + +## Example Usage + +{{tffile "examples/resources/repository_ruleset/example_1.tf"}} + +## Argument Reference + +- `enforcement` - (Required) (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`. + +- `name` - (Required) (String) The name of the ruleset. + +- `rules` - (Required) (Block List, Min: 1, Max: 1) Rules within the ruleset. (see [below for nested schema](#rules)) + +- `target` - (Required) (String) Possible values are `branch`, `tag` and `push`. + +- `bypass_actors` - (Optional) (Block List) The actors that can bypass the rules in this ruleset. (see [below for nested schema](#bypass_actors)) + +- `conditions` - (Optional) (Block List, Max: 1) Parameters for a repository ruleset condition. For `branch` and `tag` targets, `ref_name` is required. For `push` targets, `ref_name` must NOT be set - conditions are optional for push targets. (see [below for nested schema](#conditions)) + +- `repository` - (Required) (String) Name of the repository to apply ruleset to. + +#### Rules + +The `rules` block supports the following: + +~> **Note:** Rules are target-specific. `branch` and `tag` targets support rules like `creation`, `deletion`, `pull_request`, `required_status_checks`, etc. `push` targets only support `file_path_restriction`, `max_file_size`, `max_file_path_length`, and `file_extension_restriction`. Using the wrong rules for a target will result in a validation error. + +- `branch_name_pattern` - (Optional) (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applied to rulesets with target `branch`. (see [below for nested schema](#rulesbranch_name_pattern)) + +- `commit_author_email_pattern` - (Optional) (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see [below for nested schema](#rulescommit_author_email_pattern)) + +- `commit_message_pattern` - (Optional) (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see [below for nested schema](#rulescommit_message_pattern)) + +- `committer_email_pattern` - (Optional) (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see [below for nested schema](#rulescommitter_email_pattern)) + +- `creation` - (Optional) (Boolean) Only allow users with bypass permission to create matching refs. + +- `deletion` - (Optional) (Boolean) Only allow users with bypass permissions to delete matching refs. + +- `non_fast_forward` - (Optional) (Boolean) Prevent users with push access from force pushing to branches. + +- `merge_queue` - (Optional) (Block List, Max: 1) Merges must be performed via a merge queue. (see [below for nested schema](#rulesmerge_queue)) + +- `pull_request` - (Optional) (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see [below for nested schema](#rulespull_request)) + +- `copilot_code_review` - (Optional) (Block List, Max: 1) Automatically request Copilot code review for new pull requests if the author has access to Copilot code review and their premium requests quota has not reached the limit. (see [below for nested schema](#rulescopilot_code_review)) + +- `required_deployments` - (Optional) (Block List, Max: 1) Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. (see [below for nested schema](#rulesrequired_deployments)) + +- `required_linear_history` - (Optional) (Boolean) Prevent merge commits from being pushed to matching branches. + +- `required_signatures` - (Optional) (Boolean) Commits pushed to matching branches must have verified signatures. + +- `required_status_checks` - (Optional) (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see [below for nested schema](#rulesrequired_status_checks)) + +- `tag_name_pattern` - (Optional) (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applied to rulesets with target `tag`. (see [below for nested schema](#rulestag_name_pattern)) + +- `required_code_scanning` - (Optional) (Block List, Max: 1) Define which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated. Multiple code scanning tools can be specified. (see [below for nested schema](#rulesrequired_code_scanning)) + +- `file_path_restriction` - (Optional) (Block List, Max 1) Parameters to be used for the file_path_restriction rule. When enabled restricts access to files within the repository. (See [below for nested schema](#rulesfile_path_restriction)) + +- `max_file_size` - (Optional) (Block List, Max 1) Parameters to be used for the max_file_size rule. When enabled restricts the maximum size of a file that can be pushed to the repository. (See [below for nested schema](#rulesmax_file_size)) + +- `max_file_path_length` - (Optional) (Block List, Max: 1) Prevent commits that include file paths that exceed a specified character limit from being pushed to the commit graph. This rule only applies to rulesets with target `push`. (see [below for nested schema](#rulesmax_file_path_length)) + +- `file_extension_restriction` - (Optional) (Block List, Max: 1) Prevent commits that include files with specified file extensions from being pushed to the commit graph. This rule only applies to rulesets with target `push`. (see [below for nested schema](#rulesfile_extension_restriction)) +- `update` - (Optional) (Boolean) Only allow users with bypass permission to update matching refs. + +- `update_allows_fetch_and_merge` - (Optional) (Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires `update` to be set to `true`. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter. + +#### rules.branch_name_pattern + +- `operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + +- `pattern` - (Required) (String) The pattern to match with. + +- `name` - (Optional) (String) How this rule will appear to users. + +- `negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches. + +#### rules.commit_author_email_pattern + +- `operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + +- `pattern` - (Required) (String) The pattern to match with. + +- `name` - (Optional) (String) How this rule will appear to users. + +- `negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches. + +#### rules.commit_message_pattern + +- `operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + +- `pattern` - (Required) (String) The pattern to match with. + +- `name` - (Optional) (String) How this rule will appear to users. + +- `negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches. + +#### rules.committer_email_pattern + +- `operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + +- `pattern` - (Required) (String) The pattern to match with. + +- `name` - (Optional) (String) How this rule will appear to users. + +- `negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches. + +#### rules.merge_queue + +- `check_response_timeout_minutes` - (Optional) (Number) Maximum time for a required status check to report a conclusion. After this much time has elapsed, checks that have not reported a conclusion will be assumed to have failed. Defaults to `60`. + +- `grouping_strategy` - (Optional) (String) When set to `ALLGREEN`, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to `HEADGREEN`, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge. Can be one of: `ALLGREEN`, `HEADGREEN`. Defaults to `ALLGREEN`. + +- `max_entries_to_build` - (Optional) (Number) Limit the number of queued pull requests requesting checks and workflow runs at the same time. Defaults to `5`. + +- `max_entries_to_merge` - (Optional) (Number) Limit the number of queued pull requests that will be merged together in a group. Defaults to `5`. + +- `merge_method` - (Optional) (String) Method to use when merging changes from queued pull requests. Can be one of: `MERGE`, `SQUASH`, `REBASE`. Defaults to `MERGE`. + +- `min_entries_to_merge` - (Optional) (Number) The minimum number of PRs that will be merged together in a group. Defaults to `1`. + +- `min_entries_to_merge_wait_minutes` - (Optional) (Number) The time merge queue should wait after the first PR is added to the queue for the minimum group size to be met. After this time has elapsed, the minimum group size will be ignored and a smaller group will be merged. Defaults to `5`. + +#### rules.pull_request + +- `allowed_merge_methods` - (Optional) (List of String, Min: 1) Array of merge methods to be allowed. Allowed values include `merge`, `squash`, and `rebase`. At least one must be enabled. +- `dismiss_stale_reviews_on_push` - (Optional) (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. +- `require_code_owner_review` - (Optional) (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. +- `require_last_push_approval` - (Optional) (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. +- `required_approving_review_count` - (Optional) (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. +- `required_review_thread_resolution` - (Optional) (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. + +#### rules.copilot_code_review + +- `review_on_push` - (Optional) (Boolean) Copilot automatically reviews each new push to the pull request. Defaults to `false`. + +- `review_draft_pull_requests` - (Optional) (Boolean) Copilot automatically reviews draft pull requests before they are marked as ready for review. Defaults to `false`. + +- `allowed_merge_methods` - (Required) (List of String, Min: 1) Array of merge methods to be allowed. Allowed values include `merge`, `squash`, and `rebase`. At least one must be enabled. + +- `required_reviewers` - (Optional) (Block List) Require specific reviewers to approve pull requests. Note: This feature is in beta. (see [below for nested schema](#rulespull_requestrequired_reviewers)) + +#### rules.pull_request.required_reviewers + +- `reviewer` - (Required) (Block List, Max: 1) The reviewer that must review matching files. (see [below for nested schema](#rulespull_requestrequired_reviewersreviewer)) + +- `file_patterns` - (Required) (List of String) File patterns (fnmatch syntax) that this reviewer must approve. + +- `minimum_approvals` - (Required) (Number) Minimum number of approvals required from this reviewer. Set to 0 to make approval optional. + +#### rules.pull_request.required_reviewers.reviewer + +- `id` - (Required) (Number) The ID of the reviewer (Team ID). + +- `type` - (Required) (String) The type of reviewer. Currently only `Team` is supported. + +#### rules.required_deployments + +- `required_deployment_environments` - (Required) (List of String) The environments that must be successfully deployed to before branches can be merged. + +#### rules.required_status_checks + +- `required_check` - (Required) (Block Set, Min: 1) Status checks that are required. Several can be defined. (see [below for nested schema](#rulesrequired_status_checksrequired_check)) + +- `strict_required_status_checks_policy` - (Optional) (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. + +- `do_not_enforce_on_create` - (Optional) (Boolean) Allow repositories and branches to be created if a check would otherwise prohibit it. Defaults to `false`. + +#### rules.required_status_checks.required_check + +- `context` - (Required) (String) The status check context name that must be present on the commit. + +- `integration_id` - (Optional) (Number) The optional integration ID that this status check must originate from. It's a GitHub App ID, which can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app). + +#### rules.tag_name_pattern + +- `operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. + +- `pattern` - (Required) (String) The pattern to match with. + +- `name` - (Optional) (String) How this rule will appear to users. + +- `negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches. + +#### rules.required_code_scanning + +- `required_code_scanning_tool` - (Required) (Block Set, Min: 1) Actions code scanning tools that are required. Multiple can be defined. (see [below for nested schema](#rulesrequired_code_scanningrequired_code_scanning_tool)) + +#### rules.required_code_scanning.required_code_scanning_tool + +- `alerts_threshold` - (Required) (String) The severity level at which code scanning results that raise alerts block a reference update. Can be one of: `none`, `errors`, `errors_and_warnings`, `all`. + +- `security_alerts_threshold` - (Required) (String) The severity level at which code scanning results that raise security alerts block a reference update. Can be one of: `none`, `critical`, `high_or_higher`, `medium_or_higher`, `all`. + +- `tool` - (Required) (String) The name of a code scanning tool. + +#### rules.file_path_restriction + +- `restricted_file_paths` - (Required) (Block Set, Min: 1) The file paths that are restricted from being pushed to the commit graph. + +#### rules.max_file_size + +- `max_file_size` - (Required) (Integer) The maximum allowed size, in megabytes (MB), of a file. Valid range is 1-100 MB. + +#### rules.max_file_path_length + +- `max_file_path_length` - (Required) (Integer) The maximum number of characters allowed in file paths. + +#### rules.file_extension_restriction + +- `restricted_file_extensions` - (Required) (Block Set, Min: 1) The file extensions that are restricted from being pushed to the commit graph. + +#### bypass_actors + +- `actor_id` - (Optional) (Number) The ID of the actor that can bypass a ruleset. If `actor_type` is `Integration`, `actor_id` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app). Some actor types such as `DeployKey` do not have an ID. + +- `actor_type` (String) The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`, `DeployKey`. + +- `bypass_mode` - (Optional) (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`, `exempt`. + +~> Note: at the time of writing this, the following actor types correspond to the following actor IDs: + +- `OrganizationAdmin` -> `1` +- `RepositoryRole` (This is the actor type, the following are the base repository roles and their associated IDs.) + - `maintain` -> `2` + - `write` -> `4` + - `admin` -> `5` + +#### conditions + +- `ref_name` - (Optional) (Block List, Max: 1) Required for `branch` and `tag` targets. Must NOT be set for `push` targets. (see [below for nested schema](#conditionsref_name)) + +~> **Note:** For `push` targets, do not include `ref_name` in conditions. Push rulesets operate on file content, not on refs. The `conditions` block is optional for push targets. + +#### conditions.ref_name + +- `exclude` - (Required) (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. + +- `include` - (Required) (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. + +## Attributes Reference + +The following additional attributes are exported: + +- `etag` (String) + +- `node_id` (String) GraphQL global node id for use with v4 API. + +- `ruleset_id` (Number) GitHub ID for the ruleset. + +## Import + +GitHub Repository Rulesets can be imported using the GitHub repository name and ruleset ID e.g. + +`$ terraform import github_repository_ruleset.example example:12345` diff --git a/templates/resources/repository_topics.md.tmpl b/templates/resources/repository_topics.md.tmpl new file mode 100644 index 0000000000..0606056582 --- /dev/null +++ b/templates/resources/repository_topics.md.tmpl @@ -0,0 +1,35 @@ +--- +page_title: "GitHub: github_repository_topics" +description: |- + Creates and manages the topics on a repository +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_topics + +This resource allows you to create and manage topics for repositories within your GitHub organization or personal account. + +~> Note: This resource is not compatible with the `topic` attribute of the `github_repository` Use either `github_repository_topics` or `topic` in `github_repository`. `github_repository_topics` is only meant to be used if the repository itself is not handled via terraform, for example if it's only read as a datasource (see [issue #1845](https://github.com/integrations/terraform-provider-github/issues/1845)). + +## Example Usage + +{{tffile "examples/resources/repository_topics/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `repository` - (Required) The repository name. + +* `topics` - (Required) A list of topics to add to the repository. + +## Import + +Repository topics can be imported using the `name` of the repository. + +``` +$ terraform import github_repository_topics.terraform terraform +``` diff --git a/templates/resources/repository_webhook.md.tmpl b/templates/resources/repository_webhook.md.tmpl new file mode 100644 index 0000000000..24bef41442 --- /dev/null +++ b/templates/resources/repository_webhook.md.tmpl @@ -0,0 +1,59 @@ +--- +page_title: "GitHub: github_repository_webhook" +description: |- + Creates and manages repository webhooks within GitHub organizations or personal accounts +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_repository_webhook + +This resource allows you to create and manage webhooks for repositories within your GitHub organization or personal account. + +~> **Note on Archived Repositories**: When a repository is archived, GitHub makes it read-only, preventing webhook modifications. If you attempt to destroy resources associated with archived repositories, the provider will gracefully handle the operation by logging an informational message and removing the resource from Terraform state without attempting to modify the archived repository. + +## Example Usage + +{{tffile "examples/resources/repository_webhook/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `repository` - (Required) The repository of the webhook. + +* `events` - (Required) A list of events which should trigger the webhook. See a list of [available events](https://developer.github.com/v3/activity/events/types/). + +* `configuration` - (Required) Configuration block for the webhook. [Detailed below.](#configuration) + +* `active` - (Optional) Indicate if the webhook should receive events. Defaults to `true`. + +### configuration + +* `url` - (Required) The URL of the webhook. + +* `content_type` - (Required) The content type for the payload. Valid values are either `form` or `json`. + +* `secret` - (Optional) The shared secret for the webhook. [See API documentation](https://developer.github.com/v3/repos/hooks/#create-a-hook). + +* `insecure_ssl` - (Optional) Insecure SSL boolean toggle. Defaults to `false`. + +## Attributes Reference + +The following additional attributes are exported: + +* `url` - URL of the webhook. This is a sensitive attribute because it may include basic auth credentials. + +## Import + +Repository webhooks can be imported using the `name` of the repository, combined with the `id` of the webhook, separated by a `/` character. The `id` of the webhook can be found in the URL of the webhook. For example: `"https://github.com/foo-org/foo-repo/settings/hooks/14711452"`. + +Importing uses the name of the repository, as well as the ID of the webhook, e.g. + +``` +$ terraform import github_repository_webhook.terraform terraform/11235813 +``` + +If secret is populated in the webhook's configuration, the value will be imported as "********". diff --git a/templates/resources/team.md.tmpl b/templates/resources/team.md.tmpl new file mode 100644 index 0000000000..3e0217cfa7 --- /dev/null +++ b/templates/resources/team.md.tmpl @@ -0,0 +1,48 @@ +--- +page_title: "GitHub: github_team" +description: |- + Provides a GitHub team resource. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_team + +Provides a GitHub team resource. + +This resource allows you to add/remove teams from your organization. When applied, a new team will be created. When destroyed, that team will be removed. + +## Example Usage + +{{tffile "examples/resources/team/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name of the team. +* `description` - (Optional) A description of the team. +* `privacy` - (Optional) The level of privacy for the team. Must be one of `secret` *(default)* or `closed`. +* `notification_setting` - (Optional) The notification setting for the team. Must be one of `notifications_enabled` *(default)* or `notifications_disabled`. +* `parent_team_id` - (Optional) The ID or slug of the parent team, if this is a nested team. +* `ldap_dn` - (Optional) The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise Server. +* `create_default_maintainer` - (**DEPRECATED**) (Optional) Adds a default maintainer to the team. Defaults to `false` and adds the creating user to the team when `true`. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the created team. +* `node_id` - The Node ID of the created team. +* `slug` - The slug of the created team, which may or may not differ from `name`, depending on whether `name` contains "URL-unsafe" characters. Useful when referencing the team in [`github_branch_protection`](/docs/providers/github/r/branch_protection.html). + +## Import + +GitHub Teams can be imported using the GitHub team ID or name e.g. + +```shell +terraform import github_team.core 1234567 +terraform import github_team.core Administrators +``` diff --git a/templates/resources/team_members.md.tmpl b/templates/resources/team_members.md.tmpl new file mode 100644 index 0000000000..3101e6cd0a --- /dev/null +++ b/templates/resources/team_members.md.tmpl @@ -0,0 +1,57 @@ +--- +page_title: "GitHub: github_team_members" +description: |- + Provides an authoritative GitHub team members resource. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_team_members + +Provides a GitHub team members resource. + +This resource allows you to manage members of teams in your organization. It sets the requested team members for the team and removes all users not managed by Terraform. + +When applied, if the user hasn't accepted their invitation to the organization, they won't be part of the team until they do. + +When destroyed, all users will be removed from the team. + +~> **Note** This resource is not compatible with `github_team_membership`. Use either `github_team_members` or `github_team_membership`. + +~> **Note** You can accidentally lock yourself out of your team using this resource. Deleting a `github_team_members` resource removes access from anyone without organization-level access to the team. Proceed with caution. It should generally only be used with teams fully managed by Terraform. + +~> **Note** Attempting to set a user who is an organization owner to "member" will result in the user being granted "maintainer" instead; this can result in a perpetual `terraform plan` diff that changes their status back to "member". + +## Example Usage + +{{tffile "examples/resources/team_members/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `team_id` - (Required) The team id or the team slug + +~> **Note** Although the team id or team slug can be used it is recommended to use the team id. Using the team slug will cause the team members associations to the team to be destroyed and recreated if the team name is updated. + +* `members` - (Required) List of team members. See [Members](#members) below for details. + +### Members + +`members` supports the following arguments: + +* `username` - (Required) The user to add to the team. +* `role` - (Optional) The role of the user within the team. Must be one of `member` or `maintainer`. Defaults to `member`. + +## Import + +~> **Note** Although the team id or team slug can be used it is recommended to use the team id. Using the team slug will result in terraform doing conversions between the team slug and team id. This will cause team members associations to the team to be destroyed and recreated on import. + +GitHub Team Membership can be imported using the team ID team id or team slug, e.g. + +``` +$ terraform import github_team_members.some_team 1234567 +$ terraform import github_team_members.some_team Administrators +``` diff --git a/templates/resources/team_membership.md.tmpl b/templates/resources/team_membership.md.tmpl new file mode 100644 index 0000000000..1e7e7cd0c9 --- /dev/null +++ b/templates/resources/team_membership.md.tmpl @@ -0,0 +1,40 @@ +--- +page_title: "GitHub: github_team_membership" +description: |- + Provides a GitHub team membership resource. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_team_membership + +Provides a GitHub team membership resource. + +This resource allows you to add/remove users from teams in your organization. When applied, the user will be added to the team. If the user hasn't accepted their invitation to the organization, they won't be part of the team until they do. When destroyed, the user will be removed from the team. + +~> **Note** This resource is not compatible with `github_team_members`. Use either `github_team_members` or `github_team_membership`. + +~> **Note** Organization owners may not be set as "members" of a team; they may only be set as "maintainers". Attempting to set an organization owner as a "member" of a team may result in a `terraform plan` diff that changes their status back to "maintainer". + +## Example Usage + +{{tffile "examples/resources/team_membership/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `team_id` - (Required) The GitHub team id or the GitHub team slug +* `username` - (Required) The user to add to the team. +* `role` - (Optional) The role of the user within the team. Must be one of `member` or `maintainer`. Defaults to `member`. + +## Import + +GitHub Team Membership can be imported using an ID made up of `teamid:username` or `teamname:username`, e.g. + +``` +$ terraform import github_team_membership.member 1234567:someuser +$ terraform import github_team_membership.member Administrators:someuser +``` diff --git a/templates/resources/team_repository.md.tmpl b/templates/resources/team_repository.md.tmpl new file mode 100644 index 0000000000..e66338d24e --- /dev/null +++ b/templates/resources/team_repository.md.tmpl @@ -0,0 +1,44 @@ +--- +page_title: "GitHub: github_team_repository" +description: |- + Manages the associations between teams and repositories. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_team_repository + +~> Note: github_team_repository cannot be used in conjunction with github_repository_collaborators or they will fight over what your policy should be. + +This resource manages relationships between teams and repositories in your GitHub organization. + +Creating this resource grants a particular team permissions on a particular repository. + +The repository and the team must both belong to the same organization on GitHub. This resource does not actually *create* any repositories; to do that, see [`github_repository`](repository.html). + +~> **Note on Archived Repositories**: When a repository is archived, GitHub makes it read-only, preventing team permission modifications. If you attempt to destroy resources associated with archived repositories, the provider will gracefully handle the operation by logging an informational message and removing the resource from Terraform state without attempting to modify the archived repository. + +This resource is non-authoritative, for managing ALL collaborators of a repo, use github_repository_collaborators instead. + +## Example Usage + +{{tffile "examples/resources/team_repository/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `team_id` - (Required) The GitHub team id or the GitHub team slug +* `repository` - (Required) The repository to add to the team. +* `permission` - (Optional) The permissions of team members regarding the repository. Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`. + +## Import + +GitHub Team Repository can be imported using an ID made up of `team_id:repository` or `team_name:repository`, e.g. + +``` +$ terraform import github_team_repository.terraform_repo 1234567:terraform +$ terraform import github_team_repository.terraform_repo Administrators:terraform +``` diff --git a/templates/resources/team_settings.md.tmpl b/templates/resources/team_settings.md.tmpl new file mode 100644 index 0000000000..8aa922cf7c --- /dev/null +++ b/templates/resources/team_settings.md.tmpl @@ -0,0 +1,52 @@ +--- +page_title: "GitHub: github_team_settings" +description: |- + Manages the team settings (in particular the request review delegation settings) +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_team_settings + +This resource manages the team settings (in particular the request review delegation settings) within the organization + +Creating this resource will alter the team Code Review settings. + +The team must both belong to the same organization configured in the provider on GitHub. + +~> **Note**: This resource relies on the v4 GraphQl GitHub API. If this API is not available, or the Stone Crop schema preview is not available, then this resource will not work as intended. + +## Example Usage + +{{tffile "examples/resources/team_settings/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `team_id` - (Required) The GitHub team id or the GitHub team slug +* `review_request_delegation` - (Optional) The settings for delegating code reviews to individuals on behalf of the team. If this block is present, even without any fields, then review request delegation will be enabled for the team. See [GitHub Review Request Delegation](#github-review-request-delegation-configuration) below for details. See [GitHub's documentation](https://docs.github.com/en/organizations/organizing-members-into-teams/managing-code-review-settings-for-your-team#configuring-team-notifications) for more configuration details. + +### GitHub Review Request Delegation Configuration + +The following arguments are supported: + +* `algorithm` - (Optional) The algorithm to use when assigning pull requests to team members. Supported values are `ROUND_ROBIN` and `LOAD_BALANCE`. Default value is `ROUND_ROBIN` +* `member_count` - (Optional) The number of team members to assign to a pull request +* `notify` - (Optional) whether to notify the entire team when at least one member is also assigned to the pull request + +## Import + +GitHub Teams can be imported using the GitHub team ID, or the team slug e.g. + +``` +$ terraform import github_team.code_review_settings 1234567 +``` + +or, + +``` +$ terraform import github_team_settings.code_review_settings SomeTeam +``` diff --git a/templates/resources/team_sync_group_mapping.md.tmpl b/templates/resources/team_sync_group_mapping.md.tmpl new file mode 100644 index 0000000000..9cfb1a034d --- /dev/null +++ b/templates/resources/team_sync_group_mapping.md.tmpl @@ -0,0 +1,44 @@ +--- +page_title: "GitHub: github_team_sync_group_mapping" +description: |- + Creates and manages the connections between a team and its IdP group(s). +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_team_sync_group_mapping + +This resource allows you to create and manage Identity Provider (IdP) group connections within your GitHub teams. You must have team synchronization enabled for organizations owned by enterprise accounts. + +To learn more about team synchronization between IdPs and GitHub, please refer to: https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/synchronizing-teams-between-your-identity-provider-and-github + +## Example Usage + +{{tffile "examples/resources/team_sync_group_mapping/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `team_slug` - (Required) Slug of the team +* `group` - (Required) An Array of GitHub Identity Provider Groups (or empty []). Each `group` block consists of the fields documented below. + +--- + +The `group` block consists of: + +* `group_id` - The ID of the IdP group. + +* `group_name` - The name of the IdP group. + +* `group_description` - The description of the IdP group. + +## Import + +GitHub Team Sync Group Mappings can be imported using the GitHub team `slug` e.g. + +``` +$ terraform import github_team_sync_group_mapping.example some_team +``` diff --git a/templates/resources/user_gpg_key.md.tmpl b/templates/resources/user_gpg_key.md.tmpl new file mode 100644 index 0000000000..1d1e4d114e --- /dev/null +++ b/templates/resources/user_gpg_key.md.tmpl @@ -0,0 +1,36 @@ +--- +page_title: "GitHub: github_user_gpg_key" +description: |- + Provides a GitHub user's GPG key resource. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_user_gpg_key + +Provides a GitHub user's GPG key resource. + +This resource allows you to add/remove GPG keys from your user account. + +## Example Usage + +{{tffile "examples/resources/user_gpg_key/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `armored_public_key` - (Required) Your public GPG key, generated in ASCII-armored format. See [Generating a new GPG key](https://help.github.com/articles/generating-a-new-gpg-key/) for help on creating a GPG key. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The GitHub ID of the GPG key, e.g. `401586` +* `key_id` - The key ID of the GPG key, e.g. `3262EFF25BA0D270` + +## Import + +GPG keys are not importable due to the fact that [API](https://developer.github.com/v3/users/gpg_keys/#gpg-keys) does not return previously uploaded GPG key. diff --git a/templates/resources/user_invitation_accepter.md.tmpl b/templates/resources/user_invitation_accepter.md.tmpl new file mode 100644 index 0000000000..05b980d135 --- /dev/null +++ b/templates/resources/user_invitation_accepter.md.tmpl @@ -0,0 +1,34 @@ +--- +page_title: "GitHub: github_user_invitation_accepter" +description: |- + Provides a resource to manage GitHub repository collaborator invitations. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_user_invitation_accepter + +Provides a resource to manage GitHub repository collaborator invitations. + +## Example Usage + +{{tffile "examples/resources/user_invitation_accepter/example_1.tf"}} + +## Allowing empty invitation IDs + +Set `allow_empty_id` when using `for_each` over a list of `github_repository_collaborator.invitation_id`'s. + +This allows applying a module again when a new `github_repository_collaborator` resource is added to the `for_each` loop. This is needed as the `github_repository_collaborator.invitation_id` will be empty after a state refresh when the invitation has been accepted. + +Note that when an invitation is accepted manually or by another tool between a state refresh and a `terraform apply` using that refreshed state, the plan will contain the invitation ID, but the apply will receive an HTTP 404 from the API since the invitation has already been accepted. + +This is tracked in [#1157](https://github.com/integrations/terraform-provider-github/issues/1157). + +## Argument Reference + +The following arguments are supported: + +* `invitation_id` - (Optional) ID of the invitation to accept. Must be set when `allow_empty_id` is `false`. +* `allow_empty_id` - (Optional) Allow the ID to be unset. This will result in the resource being skipped when the ID is not set instead of returning an error. diff --git a/templates/resources/user_ssh_key.md.tmpl b/templates/resources/user_ssh_key.md.tmpl new file mode 100644 index 0000000000..f9740d515f --- /dev/null +++ b/templates/resources/user_ssh_key.md.tmpl @@ -0,0 +1,41 @@ +--- +page_title: "GitHub: github_user_ssh_key" +description: |- + Provides a GitHub user's SSH key resource. +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_user_ssh_key + +Provides a GitHub user's SSH key resource. + +This resource allows you to add/remove SSH keys from your user account. + +## Example Usage + +{{tffile "examples/resources/user_ssh_key/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `title` - (Required) A descriptive name for the new key. e.g. `Personal MacBook Air` +* `key` - (Required) The public SSH key to add to your GitHub account. + +## Attributes Reference + +The following attributes are exported: + +* `id` - The ID of the SSH key +* `url` - The URL of the SSH key + +## Import + +SSH keys can be imported using their ID e.g. + +``` +$ terraform import github_user_ssh_key.example 1234567 +``` diff --git a/templates/resources/workflow_repository_permissions.md.tmpl b/templates/resources/workflow_repository_permissions.md.tmpl new file mode 100644 index 0000000000..bc75d6f60c --- /dev/null +++ b/templates/resources/workflow_repository_permissions.md.tmpl @@ -0,0 +1,33 @@ +--- +page_title: "GitHub: github_workflow_repository_permissions" +description: |- + Enables and manages Workflow permissions for a GitHub repository +--- + +{{/* This template serves as a starting point for documentation generation, and can be customized with hardcoded values and/or doc gen templates. + +For example, the {{ .SchemaMarkdown }} template can be used to replace manual schema documentation if descriptions of schema attributes are added in the provider source code. */ -}} + +# github_workflow_repository_permissions + +This resource allows you to manage GitHub Workflow permissions for a given repository. You must have admin access to a repository to use this resource. + +## Example Usage + +{{tffile "examples/resources/workflow_repository_permissions/example_1.tf"}} + +## Argument Reference + +The following arguments are supported: + +* `repository` - (Required) The GitHub repository +* `default_workflow_permissions` - (Optional) The default workflow permissions granted to the GITHUB_TOKEN when running workflows. Can be one of: `read` or `write`. +* `can_approve_pull_request_reviews` - (Optional) Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. + +## Import + +This resource can be imported using the name of the GitHub repository: + +``` +$ terraform import github_workflow_repository_permissions.test my-repository +``` diff --git a/tools.go b/tools.go new file mode 100644 index 0000000000..25586ab4e0 --- /dev/null +++ b/tools.go @@ -0,0 +1,10 @@ +//go:build tools +// +build tools + +package main + +import ( + _ "github.com/client9/misspell/cmd/misspell" + _ "github.com/golangci/golangci-lint/v2/cmd/golangci-lint" + _ "github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs" +) diff --git a/website/docs/d/actions_variables.html.markdown b/website/docs/d/actions_variables.html.markdown deleted file mode 100644 index c638c60d01..0000000000 --- a/website/docs/d/actions_variables.html.markdown +++ /dev/null @@ -1,32 +0,0 @@ ---- -layout: "github" -page_title: "GitHub: github_actions_variables" -description: |- - Get Actions variables for a repository ---- - -# github\_actions\_variables - -Use this data source to retrieve the list of variables for a GitHub repository. - -## Example Usage - -```hcl -data "github_actions_variables" "example" { - name = "example" -} -``` - -## Argument Reference - - * `name` - (Optional) The name of the repository. - * `full_name` - (Optional) Full name of the repository (in `org/name` format). - -## Attributes Reference - - * `variables` - list of variables for the repository - * `name` - Name of the variable - * `value` - Value of the variable - * `created_at` - Timestamp of the variable creation - * `updated_at` - Timestamp of the variable last update - diff --git a/website/docs/d/membership.html.markdown b/website/docs/d/membership.html.markdown deleted file mode 100644 index 6f6e735d15..0000000000 --- a/website/docs/d/membership.html.markdown +++ /dev/null @@ -1,34 +0,0 @@ ---- -layout: "github" -page_title: "GitHub: github_membership" -description: |- - Get information on user membership in an organization. ---- - -# github_membership - -Use this data source to find out if a user is a member of your organization, as well -as what role they have within it. -If the user's membership in the organization is pending their acceptance of an invite, -the role they would have once they accept will be returned. - -## Example Usage - -```hcl -data "github_membership" "membership_for_some_user" { - username = "SomeUser" -} -``` - -## Argument Reference - - * `username` - (Required) The username to lookup in the organization. - - * `organization` - (Optional) The organization to check for the above username. - -## Attributes Reference - - * `username` - The username. - * `role` - `admin` or `member` -- the role the user has within the organization. - * `etag` - An etag representing the membership object. - * `state` - `active` or `pending` -- the state of membership within the organization. `active` if the member has accepted the invite, or `pending` if the invite is still pending. diff --git a/website/docs/d/organization.html.markdown b/website/docs/d/organization.html.markdown deleted file mode 100644 index 55979f8be1..0000000000 --- a/website/docs/d/organization.html.markdown +++ /dev/null @@ -1,59 +0,0 @@ ---- -layout: "github" -page_title: "GitHub: github_organization" -description: |- - Get an organization. ---- - -# github_organization - -Use this data source to retrieve basic information about a GitHub Organization. - -## Example Usage - -```hcl -data "github_organization" "example" { - name = "github" -} -``` - -## Argument Reference - -* `name` - (Required) The name of the organization. -* `ignore_archived_repos` - (Optional) Whether or not to include archived repos in the `repositories` list. Defaults to `false`. -* `summary_only` - (Optional) Exclude the repos, members and other attributes from the returned result. Defaults to `false`. - -## Attributes Reference - - * `id` - The ID of the organization - * `node_id` - GraphQL global node ID for use with the v4 API - * `name` - The organization's public profile name - * `orgname` - The organization's name as used in URLs and the API - * `login` - The organization account login - * `description` - The organization account description - * `plan` - The organization account plan name - * `repositories` - (`list`) A list of the full names of the repositories in the organization formatted as `owner/name` strings - * `members` - **Deprecated**: use `users` instead by replacing `github_organization.example.members` to `github_organization.example.users[*].login` which will give you the same value, expect this field to be removed in next major version - * `users` - (`list`) A list with the members of the organization with following fields: - * `id` - The ID of the member - * `login` - The members login - * `email` - Publicly available email - * `role` - Member role `ADMIN`, `MEMBER` - * `two_factor_requirement_enabled` - Whether two-factor authentication is required for all members of the organization. - * `default_repository_permission` - Default permission level members have for organization repositories. - * `members_allowed_repository_creation_type` - The type of repository allowed to be created by members of the organization. Can be one of `ALL`, `PUBLIC`, `PRIVATE`, `NONE`. - * `members_can_create_repositories` - Whether non-admin organization members can create repositories. - * `members_can_create_internal_repositories` - Whether organization members can create internal repositories. - * `members_can_create_private_repositories` - Whether organization members can create private repositories. - * `members_can_create_public_repositories` - Whether organization members can create public repositories. - * `members_can_create_pages` - Whether organization members can create pages sites. - * `members_can_create_public_pages` - Whether organization members can create public pages sites. - * `members_can_create_private_pages` - Whether organization members can create private pages sites. - * `members_can_fork_private_repositories` - Whether organization members can create private repository forks. - * `web_commit_signoff_required` - Whether organization members must sign all commits. - * `advanced_security_enabled_for_new_repositories` - Whether advanced security is enabled for new repositories. - * `dependabot_alerts_enabled_for_new_repositories` - Whether Dependabot alerts is automatically enabled for new repositories. - * `dependabot_security_updates_enabled_for_new_repositories` - Whether Dependabot security updates is automatically enabled for new repositories. - * `dependency_graph_enabled_for_new_repositories` - Whether dependency graph is automatically enabled for new repositories. - * `secret_scanning_enabled_for_new_repositories` - Whether secret scanning is automatically enabled for new repositories. - * `secret_scanning_push_protection_enabled_for_new_repositories` - Whether secret scanning push protection is automatically enabled for new repositories. diff --git a/website/docs/d/organization_app_installations.html.markdown b/website/docs/d/organization_app_installations.html.markdown deleted file mode 100644 index 4f2ec8957c..0000000000 --- a/website/docs/d/organization_app_installations.html.markdown +++ /dev/null @@ -1,40 +0,0 @@ ---- -layout: "github" -page_title: "GitHub: github_organization_app_installations" -description: |- - Get information on all GitHub App installations of the organization. ---- - -# github\_organization\_app_installations - -Use this data source to retrieve all GitHub App installations of the organization. - -## Example Usage - -To retrieve *all* GitHub App installations of the organization: - -```hcl -data "github_organization_app_installations" "all" {} -``` - -## Attributes Reference - -* `installations` - List of GitHub App installations in the organization. Each `installation` block consists of the fields documented below. - ---- - -The `installation` block consists of: - - * `id` - The ID of the GitHub App installation. - * `app_slug` - The URL-friendly name of the GitHub App. - * `app_id` - The ID of the GitHub App. - * `repository_selection` - Whether the installation has access to all repositories or only selected ones. Possible values are `all` or `selected`. - * `permissions` - A map of the permissions granted to the GitHub App installation. - * `events` - The list of events the GitHub App installation subscribes to. - * `client_id` - The OAuth client ID of the GitHub App. - * `target_id` - The ID of the account the GitHub App is installed on. - * `target_type` - The type of account the GitHub App is installed on. Possible values are `Organization` or `User`. - * `suspended` - Whether the GitHub App installation is currently suspended. - * `single_file_paths` - The list of single file paths the GitHub App installation has access to. - * `created_at` - The date the GitHub App installation was created. - * `updated_at` - The date the GitHub App installation was last updated. diff --git a/website/docs/d/organization_ip_allow_list.html.markdown b/website/docs/d/organization_ip_allow_list.html.markdown deleted file mode 100644 index cd22a7af24..0000000000 --- a/website/docs/d/organization_ip_allow_list.html.markdown +++ /dev/null @@ -1,32 +0,0 @@ ---- -layout: "github" -page_title: "GitHub: github_organization_ip_allow_list" -description: |- - Get the IP allow list of an organization. ---- - -# github_organization_ip_allow_list - -Use this data source to retrieve information about the IP allow list of an organization. -The allow list for IP addresses will block access to private resources via the web, API, -and Git from any IP addresses that are not on the allow list. - -## Example Usage - -```hcl -data "github_organization_ip_allow_list" "all" {} -``` - -## Attributes Reference - -* `ip_allow_list` - An Array of allowed IP addresses. -___ - -Each element in the `ip_allow_list` block consists of: - - * `id` - The ID of the IP allow list entry. - * `name` - The name of the IP allow list entry. - * `allow_list_value` - A single IP address or range of IP addresses in CIDR notation. - * `is_active` - Whether the entry is currently active. - * `created_at` - Identifies the date and time when the object was created. - * `updated_at` - Identifies the date and time when the object was last updated. diff --git a/website/docs/d/release.html.markdown b/website/docs/d/release.html.markdown deleted file mode 100644 index 63a49d6504..0000000000 --- a/website/docs/d/release.html.markdown +++ /dev/null @@ -1,87 +0,0 @@ ---- -layout: "github" -page_title: "GitHub: github_release" -description: |- - Get information on a GitHub release. ---- - -# github\_release - -Use this data source to retrieve information about a GitHub release in a specific repository. - -## Example Usage -To retrieve the latest release that is present in a repository: - -```hcl -data "github_release" "example" { - repository = "example-repository" - owner = "example-owner" - retrieve_by = "latest" -} -``` - -To retrieve a specific release from a repository based on its ID: - -```hcl -data "github_release" "example" { - repository = "example-repository" - owner = "example-owner" - retrieve_by = "id" - id = 12345 -} -``` - -Finally, to retrieve a release based on its tag: - -```hcl -data "github_release" "example" { - repository = "example-repository" - owner = "example-owner" - retrieve_by = "tag" - release_tag = "v1.0.0" -} -``` - -## Argument Reference - - * `repository` - (Required) Name of the repository to retrieve the release from. - - * `owner` - (Required) Owner of the repository. - - * `retrieve_by` - (Required) Describes how to fetch the release. Valid values are `id`, `tag`, `latest`. - - * `release_id` - (Optional) ID of the release to retrieve. Must be specified when `retrieve_by` = `id`. - - * `release_tag` - (Optional) Tag of the release to retrieve. Must be specified when `retrieve_by` = `tag`. - - -## Attributes Reference - - * `release_tag` - Tag of release - * `release_id` - ID of release - * `target_commitish` - Commitish value that determines where the Git release is created from - * `name` - Name of release - * `body` - Contents of the description (body) of a release - * `draft` - (`Boolean`) indicates whether the release is a draft - * `prerelease` - (`Boolean`) indicates whether the release is a prerelease - * `created_at` - Date of release creation - * `published_at` - Date of release publishing - * `url` - Base URL of the release - * `html_url` - URL directing to detailed information on the release - * `assets_url` - URL of any associated assets with the release - * `asserts_url` - **Deprecated**: Use `assets_url` resource instead - * `upload_url` - URL that can be used to upload Assets to the release - * `zipball_url` - Download URL of a specific release in `zip` format - * `tarball_url` - Download URL of a specific release in `tar.gz` format - * `assets` - Collection of assets for the release. Each asset conforms to the following schema: - * `id` - ID of the asset - * `url` - URL of the asset - * `node_id` - Node ID of the asset - * `name` - The file name of the asset - * `label` - Label for the asset - * `content_type` - MIME type of the asset - * `size` - Size in byte - * `created_at` - Date the asset was created - * `updated_at` - Date the asset was last updated - * `browser_download_url` - Browser download URL - diff --git a/website/docs/d/user.html.markdown b/website/docs/d/user.html.markdown deleted file mode 100644 index 9b031a89e8..0000000000 --- a/website/docs/d/user.html.markdown +++ /dev/null @@ -1,57 +0,0 @@ ---- -layout: "github" -page_title: "GitHub: github_user" -description: |- - Get information on a GitHub user. ---- - -# github\_user - -Use this data source to retrieve information about a GitHub user. - -## Example Usage - -```hcl -# Retrieve information about a GitHub user. -data "github_user" "example" { - username = "example" -} - -# Retrieve information about the currently authenticated user. -data "github_user" "current" { - username = "" -} - -output "current_github_login" { - value = "${data.github_user.current.login}" -} - -``` - -## Argument Reference - - * `username` - (Required) The username. Use an empty string `""` to retrieve information about the currently authenticated user. - -## Attributes Reference - - * `id` - the ID of the user. - * `node_id` - the Node ID of the user. - * `login` - the user's login. - * `avatar_url` - the user's avatar URL. - * `gravatar_id` - the user's gravatar ID. - * `site_admin` - whether the user is a GitHub admin. - * `name` - the user's full name. - * `company` - the user's company name. - * `blog` - the user's blog location. - * `location` - the user's location. - * `email` - the user's email. - * `gpg_keys` - list of user's GPG keys. - * `ssh_keys` - list of user's SSH keys. - * `bio` - the user's bio. - * `public_repos` - the number of public repositories. - * `public_gists` - the number of public gists. - * `followers` - the number of followers. - * `following` - the number of following users. - * `created_at` - the creation date. - * `updated_at` - the update date. - * `suspended_at` - the suspended date if the user is suspended. diff --git a/website/docs/r/actions_runner_group.html.markdown b/website/docs/r/actions_runner_group.html.markdown deleted file mode 100644 index 2c0c02fe84..0000000000 --- a/website/docs/r/actions_runner_group.html.markdown +++ /dev/null @@ -1,57 +0,0 @@ ---- -layout: "github" -page_title: "GitHub: github_actions_runner_group" -description: |- - Creates and manages an Actions Runner Group within a GitHub organization ---- - -# github_actions_runner_group - -This resource allows you to create and manage GitHub Actions runner groups within your GitHub enterprise organizations. -You must have admin access to an organization to use this resource. - -## Example Usage - -```hcl -resource "github_repository" "example" { - name = "my-repository" -} - -resource "github_actions_runner_group" "example" { - name = github_repository.example.name - visibility = "selected" - selected_repository_ids = [github_repository.example.repo_id] -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) Name of the runner group -* `restricted_to_workflows` - (Optional) If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false. -* `selected_repository_ids` - (Optional) IDs of the repositories which should be added to the runner group -* `selected_workflows` - (Optional) List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true. -* `visibility` - (Optional) Visibility of a runner group. Whether the runner group can include `all`, `selected`, or `private` repositories. A value of `private` is not currently supported due to limitations in the GitHub API. -* `allows_public_repositories` - (Optional) Whether public repositories can be added to the runner group. Defaults to false. - -## Attributes Reference - -* `allows_public_repositories` - Whether public repositories can be added to the runner group -* `default` - Whether this is the default runner group -* `etag` - An etag representing the runner group object -* `inherited` - Whether the runner group is inherited from the enterprise level -* `runners_url` - The GitHub API URL for the runner group's runners -* `selected_repository_ids` - List of repository IDs that can access the runner group -* `selected_repositories_url` - GitHub API URL for the runner group's repositories -* `visibility` - The visibility of the runner group -* `restricted_to_workflows` - If true, the runner group will be restricted to running only the workflows specified in the selected_workflows array. Defaults to false. -* `selected_workflows` - List of workflows the runner group should be allowed to run. This setting will be ignored unless restricted_to_workflows is set to true. - -## Import - -This resource can be imported using the ID of the runner group: - -``` -$ terraform import github_actions_runner_group.test 7 -``` diff --git a/website/github.erb b/website/github.erb deleted file mode 100644 index 997536b42f..0000000000 --- a/website/github.erb +++ /dev/null @@ -1,461 +0,0 @@ -<% wrap_layout :inner do %> - <% content_for :sidebar do %> - - <% end %> - - <%= yield %> - <% end %>