docs: add examples
diff --git a/docs/resources/github_connection.md b/docs/resources/github_connection.md
new file mode 100644
index 0000000..83c5117
--- /dev/null
+++ b/docs/resources/github_connection.md
@@ -0,0 +1,39 @@
+---
+# generated by https://github.com/hashicorp/terraform-plugin-docs
+page_title: "devlake_github_connection Resource - devlake"
+subcategory: ""
+description: |-
+
+---
+
+# devlake_github_connection (Resource)
+
+
+
+
+
+<!-- schema generated by tfplugindocs -->
+## Schema
+
+### Required
+
+- `app_id` (Number) The app id of the github app used for authentication.
+- `installation_id` (Number) The installation id of the github app used for authentication.
+- `name` (String) The name of the github connection.
+- `secret_key` (String, Sensitive) Github app private key used for authentication.
+
+### Optional
+
+- `auth_method` (String) The authentication method. Currently only supports 'AppKey'.
+- `enable_graphql` (Boolean) Whether to use the faster graphql api endpoints. Defaults to 'true'.
+- `endpoint` (String) The base endpoint URL. Defaults to 'https://api.github.com/'.
+- `proxy` (String) If you are behind a corporate firewall or VPN you may need to utilize a proxy server.
+- `rate_limit_per_hour` (Number) DevLake uses a dynamic rate limit to collect Bitbucket Server/Data Center data. You can adjust the rate limit if you want to increase or lower the speed.
+- `token` (String, Sensitive) PAT for github authentication. Currently not supported.
+
+### Read-Only
+
+- `created_at` (String) When the connection was created in devlake.
+- `id` (String) Numeric identifier for the connection. This is a string for easier resource import.
+- `last_updated` (String) Timestamp of the last Terraform update of the connection.
+- `updated_at` (String) When the connection was updated in devlake.
diff --git a/docs/resources/github_connection_scopeconfig.md b/docs/resources/github_connection_scopeconfig.md
new file mode 100644
index 0000000..b480237
--- /dev/null
+++ b/docs/resources/github_connection_scopeconfig.md
@@ -0,0 +1,53 @@
+---
+# generated by https://github.com/hashicorp/terraform-plugin-docs
+page_title: "devlake_github_connection_scopeconfig Resource - devlake"
+subcategory: ""
+description: |-
+
+---
+
+# devlake_github_connection_scopeconfig (Resource)
+
+
+
+
+
+<!-- schema generated by tfplugindocs -->
+## Schema
+
+### Required
+
+- `connection_id` (String) The connection id of the connection this scope config belongs to.
+- `name` (String) The name of the scope config.
+
+### Optional
+
+- `deployment_pattern` (String) Convert a GitHub workflow run as a DevLake Deployment when: The name of the GitHub workflow run or one of its jobs matches this pattern.
+- `entities` (List of String) The entities this scope config uses, e.g. 'CODEREVIEW', 'CROSS' or 'CODE'. See the documentation for the meaning of the individual values.
+- `env_name_pattern` (String) If its environment name matches this pattern, this deployment is a 'Production Deployment'.
+- `issue_component` (String) This looks like an error in the API, the webinterface doesn't provide a field for this.
+- `issue_priority` (String) This looks like an error in the API, the webinterface doesn't provide a field for this.
+- `issue_severity` (String) This looks like an error in the API, the webinterface doesn't provide a field for this.
+- `issue_type_bug` (String) This looks like an error in the API, the webinterface doesn't provide a field for this.
+- `issue_type_incident` (String) This looks like an error in the API, the webinterface doesn't provide a field for this.
+- `issue_type_requirement` (String) This looks like an error in the API, the webinterface doesn't provide a field for this.
+- `pr_body_close_pattern` (String) Connect entities across domains to measure metrics such as Bug Count per 1k Lines of Code. Connect PRs and Issues with the following pattern.
+- `pr_component` (String) Text (PR body) that matches the RegEx will be set as the component of the pull request.
+- `pr_type` (String) Text (PR title) that matches the RegEx will be set as the type of a pull request.
+- `ref_diff` (Attributes) Calculate the commits diff between two consecutive tags that match the following RegEx. Issues closed by PRs which contain these commits will also be calculated. The result will be shown in table.refs_commits_diffs and table.refs_issues_diffs. (see [below for nested schema](#nestedatt--ref_diff))
+
+### Read-Only
+
+- `created_at` (String) When the scope config was created in devlake.
+- `id` (String) Numeric identifier for the connection scopeconfig. This is a string for easier resource import.
+- `last_updated` (String) Timestamp of the last Terraform update of the scope config.
+- `production_pattern` (String) Convert a GitHub workflow run as a DevLake Deployment when: If the name or its branch’s name also matches this pattern, this deployment is a 'Production Deployment'. Use only with 'deployment_pattern'.
+- `updated_at` (String) When the connection was updated in devlake.
+
+<a id="nestedatt--ref_diff"></a>
+### Nested Schema for `ref_diff`
+
+Optional:
+
+- `tags_limit` (Number) Compare the last number of tags.
+- `tags_pattern` (String) Matching tags are included in the calculation.
diff --git a/examples/resources/github_connection/import.sh b/examples/resources/github_connection/import.sh
new file mode 100644
index 0000000..77a7076
--- /dev/null
+++ b/examples/resources/github_connection/import.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+# Copyright (c) HashiCorp, Inc.
+
+
+# github connection can be imported by specifying the numeric identifier.
+terraform import devlake_github_connection.tfresourcename "1"
diff --git a/examples/resources/github_connection/resource.tf b/examples/resources/github_connection/resource.tf
new file mode 100644
index 0000000..2218156
--- /dev/null
+++ b/examples/resources/github_connection/resource.tf
@@ -0,0 +1,21 @@
+# Copyright (c) HashiCorp, Inc.
+
+terraform {
+ required_providers {
+ devlake = {
+ source = "registry.terraform.io/incubator-devlake-terraform/devlake"
+ }
+ }
+}
+
+provider "devlake" {
+ host = "http://localhost:4000/api"
+ token = "whatever"
+}
+
+resource "devlake_github_connection" "gh" {
+ name = "should_not_exist"
+ app_id = 123123
+ installation_id = 321321
+ secret_key = "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEA8Y******\n******sm3C6hlD0XCuVGG1rPuh\n-----END RSA PRIVATE KEY-----"
+}
diff --git a/examples/resources/github_connection_scopeconfig/import.sh b/examples/resources/github_connection_scopeconfig/import.sh
new file mode 100644
index 0000000..65fd195
--- /dev/null
+++ b/examples/resources/github_connection_scopeconfig/import.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+# Copyright (c) HashiCorp, Inc.
+
+
+# github connection can be imported by specifying the numeric identifier of the connection and the scopeconfig.
+terraform import devlake_github_connection_scopeconfig.scopeconf "1,1"
diff --git a/examples/resources/github_connection_scopeconfig/resource.tf b/examples/resources/github_connection_scopeconfig/resource.tf
new file mode 100644
index 0000000..01228ae
--- /dev/null
+++ b/examples/resources/github_connection_scopeconfig/resource.tf
@@ -0,0 +1,27 @@
+# Copyright (c) HashiCorp, Inc.
+
+terraform {
+ required_providers {
+ devlake = {
+ source = "registry.terraform.io/incubator-devlake-terraform/devlake"
+ }
+ }
+}
+
+provider "devlake" {
+ host = "http://localhost:4000/api"
+ token = "whatever"
+}
+
+
+resource "devlake_github_connection" "gh" {
+ name = "should_not_exist"
+ app_id = 123123
+ installation_id = 321321
+ secret_key = "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEA8Y******\n******sm3C6hlD0XCuVGG1rPuh\n-----END RSA PRIVATE KEY-----"
+}
+
+resource "devlake_github_connection_scopeconfig" "scopeconf" {
+ connection_id = devlake_github_connection.gh.id
+ name = "conf1"
+}