File tree 5 files changed +42
-0
lines changed
examples/app_authentication
5 files changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ # App Installation Example
2
+
3
+ This example demonstrates authenticating using a GitHub App.
4
+
5
+ The example will create a repository in the specified organization.
6
+
7
+ You may use variables passed via command line:
8
+
9
+ ``` console
10
+ export GITHUB_OWNER=
11
+ export GITHUB_APP_ID=
12
+ export GITHUB_APP_INSTALLATION_ID=
13
+ export GITHUB_APP_PEM_FILE=
14
+ ```
15
+
16
+ ``` console
17
+ terraform apply -var "organization=${GITHUB_ORG}"
18
+ ```
Original file line number Diff line number Diff line change
1
+ resource "github_repository" "github_repository" {
2
+ name = " github_app_example"
3
+ description = " A repository created using GitHub App authentication"
4
+ }
Original file line number Diff line number Diff line change
1
+ provider "github" {
2
+ owner = var. owner
3
+ app_auth {
4
+ // Empty block to allow the provider configurations to be specified through
5
+ // environment variables.
6
+ // See: https://github.com/hashicorp/terraform-plugin-sdk/issues/142
7
+ }
8
+ }
9
+
10
+ terraform {
11
+ required_providers {
12
+ github = {
13
+ source = " integrations/github"
14
+ }
15
+ }
16
+ }
Original file line number Diff line number Diff line change
1
+ variable "owner" {
2
+ description = " GitHub owner used to configure the provider"
3
+ type = string
4
+ }
You can’t perform that action at this time.
0 commit comments