Skip to content

Instantly share code, notes, and snippets.

@prabhu
Created July 18, 2020 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prabhu/41df0ec0b66d01ddfcea45c9af6b6863 to your computer and use it in GitHub Desktop.
Save prabhu/41df0ec0b66d01ddfcea45c9af6b6863 to your computer and use it in GitHub Desktop.
Create GitHub repository using template
data "github_repositories" "java_ms_template" {
query = "org:${var.organization} language:java topic:microservice topic:template"
}
resource "github_repository" "new_ms" {
name = "new-java-microservice"
description = "New Java Microservice"
private = true
template {
owner = var.organization
repository = data.github_repositories.java_ms_template.name
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment