diff --git a/docs/data-sources/app.md b/docs/data-sources/app.md index 7c254bda12..a5984fd5ac 100644 --- a/docs/data-sources/app.md +++ b/docs/data-sources/app.md @@ -1,12 +1,13 @@ --- page_title: "github_app (Data Source) - GitHub" +subcategory: "" description: |- Get information about an app. --- # github_app (Data Source) -Use this data source to retrieve information about an app. +Get information about an app. ## Example Usage @@ -16,18 +17,16 @@ data "github_app" "foobar" { } ``` -## Argument Reference + +## Schema -The following arguments are supported: +### Required -- `slug` - (Required) The URL-friendly name of your GitHub App. +- `slug` (String) The URL-friendly name of your GitHub App. -## Attribute Reference +### Read-Only -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. +- `description` (String) The app's description. +- `id` (String) The ID of the app. +- `name` (String) The app's full name. +- `node_id` (String) The Node ID of the app. diff --git a/examples/data-sources/app/example_1.tf b/examples/data-sources/github_app/data-source-1.tf similarity index 100% rename from examples/data-sources/app/example_1.tf rename to examples/data-sources/github_app/data-source-1.tf diff --git a/github/data_source_github_app.go b/github/data_source_github_app.go index b4dd3eebb4..1c77b6c72c 100644 --- a/github/data_source_github_app.go +++ b/github/data_source_github_app.go @@ -11,23 +11,33 @@ import ( func dataSourceGithubApp() *schema.Resource { return &schema.Resource{ ReadContext: dataSourceGithubAppRead, + Description: "Get information about an app.", Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + Description: "The ID of the app.", + }, "slug": { - Type: schema.TypeString, - Required: true, + Type: schema.TypeString, + Required: true, + Description: "The URL-friendly name of your GitHub App.", }, "description": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: "The app's description.", }, "name": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: "The app's full name.", }, "node_id": { - Type: schema.TypeString, - Computed: true, + Type: schema.TypeString, + Computed: true, + Description: "The Node ID of the app.", }, }, } diff --git a/templates/data-sources.md.tmpl b/templates/data-sources.md.tmpl index a725089cbe..d914116495 100644 --- a/templates/data-sources.md.tmpl +++ b/templates/data-sources.md.tmpl @@ -9,11 +9,10 @@ description: |- {{ .Description | trimspace }} -{{ if .HasExamples -}} -## Example Usage - -{{- range .ExampleFiles }} +{{- if .HasExamples }} +## Example Usage +{{ range .ExampleFiles }} {{ tffile . }} {{- end }} {{- end }} diff --git a/templates/data-sources/app.md.tmpl b/templates/data-sources/app.md.tmpl deleted file mode 100644 index 9dc87e98e9..0000000000 --- a/templates/data-sources/app.md.tmpl +++ /dev/null @@ -1,29 +0,0 @@ ---- -page_title: "{{.Name}} ({{.Type}}) - {{.RenderedProviderName}}" -description: |- - Get information about an app. ---- - -# {{.Name}} ({{.Type}}) - -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.