Skip to content

Instantly share code, notes, and snippets.

View hibeekaey's full-sized avatar
🌍
Working from home

Ibukun Dairo hibeekaey

🌍
Working from home
View GitHub Profile
@hibeekaey
hibeekaey / variables.tf
Last active May 13, 2024 11:24
Repository for managing GitHub with Terraform
variable "token" {
type = string
description = "GitHub personal access token"
}
variable "username" {
type = string
description = "GitHub username"
}
@hibeekaey
hibeekaey / terraform.tfvars
Last active May 13, 2024 11:26
Repository for managing GitHub with Terraform
token = "ghp_xxxx" # insert your GitHub Personal Access Token here
username = "hibeekaey"
repositories = {
"aipnd-project" = {
name = "aipnd-project"
description = "AI Programming with Python Nanodegree Project"
visibility = "public"
archived = false
}
@hibeekaey
hibeekaey / terraform.tf
Created May 4, 2024 23:54
Repository for managing GitHub with Terraform
terraform {
required_providers {
github = {
source = "integrations/github"
version = "6.2.1"
}
}
@hibeekaey
hibeekaey / Makefile
Last active May 5, 2024 12:33
Repository for managing GitHub with Terraform
SCRIPTS_DIR = scripts
# Default target (executed when you run 'make' with no arguments)
all: init-upgrade
# Initialize terraform
init-upgrade:
terraform init -upgrade -reconfigure
# Generate Docs
@hibeekaey
hibeekaey / main.tf
Last active May 13, 2024 11:23
Repository for managing GitHub with Terraform
provider "github" {
token = var.token
owner = var.username
}
module "repository" {
for_each = var.repositories
source = "github.com/hibeekaey/example-github-manager//modules/repository?ref=v1.0.2"
name = each.value.name
description = each.value.description
@hibeekaey
hibeekaey / github-manager.tftest.hcl
Created May 4, 2024 23:51
Repository for managing GitHub with Terraform
variables {
private_repository = {
name = "github-private-repository-test"
description = "This is a test private repository"
visibility = "private"
archived = false
archive_on_destroy = false
}
public_repository = {
name = "github-public-repository-test"
@hibeekaey
hibeekaey / .gitattributes
Last active May 4, 2024 23:59
Repository for managing GitHub with Terraform
terraform.tfstate filter=git-crypt diff=git-crypt
terraform.tfvars filter=git-crypt diff=git-crypt