Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
12 changes: 12 additions & 0 deletions examples/github/easy-github-repository-add-new-file/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# https://github.com/ssbostan/terraform-awesome

resource "github_repository_file" "simple_github_repository_file" {
repository = var.github_repository
branch = "main"
file = "simple_file"
content = "This file was created by Terraform."
commit_message = "Managed by Terraform"
commit_author = "Terraform User"
commit_email = "[email protected]"
overwrite_on_create = true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://github.com/ssbostan/terraform-awesome

provider "github" {
token = var.github_token
}
10 changes: 10 additions & 0 deletions examples/github/easy-github-repository-add-new-file/terraform.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# https://github.com/ssbostan/terraform-awesome

terraform {
required_providers {
github = {
source = "integrations/github"
version = "~> 4.0"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# https://github.com/ssbostan/terraform-awesome

variable "github_token" {
type = string
}

variable "github_repository" {
type = string # Your repository to add file
}