From 3856db2c9060dc62b95cebb9b1d9b05de43d8fdb Mon Sep 17 00:00:00 2001 From: Amir Ghafari Date: Fri, 1 Jul 2022 23:07:02 +0430 Subject: [PATCH] add example:github easy-github-user-add-ssh-key --- examples/github/easy-github-user-add-ssh-key/README.md | 0 examples/github/easy-github-user-add-ssh-key/main.tf | 6 ++++++ .../github/easy-github-user-add-ssh-key/providers.tf | 5 +++++ .../github/easy-github-user-add-ssh-key/terrafrom.tf | 10 ++++++++++ .../github/easy-github-user-add-ssh-key/variables.tf | 5 +++++ 5 files changed, 26 insertions(+) create mode 100644 examples/github/easy-github-user-add-ssh-key/README.md create mode 100644 examples/github/easy-github-user-add-ssh-key/main.tf create mode 100644 examples/github/easy-github-user-add-ssh-key/providers.tf create mode 100644 examples/github/easy-github-user-add-ssh-key/terrafrom.tf create mode 100644 examples/github/easy-github-user-add-ssh-key/variables.tf diff --git a/examples/github/easy-github-user-add-ssh-key/README.md b/examples/github/easy-github-user-add-ssh-key/README.md new file mode 100644 index 0000000..e69de29 diff --git a/examples/github/easy-github-user-add-ssh-key/main.tf b/examples/github/easy-github-user-add-ssh-key/main.tf new file mode 100644 index 0000000..38b0328 --- /dev/null +++ b/examples/github/easy-github-user-add-ssh-key/main.tf @@ -0,0 +1,6 @@ +# https://github.com/ssbostan/terraform-awesome + +resource "github_user_ssh_key" "simple_user_ssh_key" { + title = "simple user ssh key" + key = file("~/.ssh/id_rsa.pub") +} \ No newline at end of file diff --git a/examples/github/easy-github-user-add-ssh-key/providers.tf b/examples/github/easy-github-user-add-ssh-key/providers.tf new file mode 100644 index 0000000..a56d695 --- /dev/null +++ b/examples/github/easy-github-user-add-ssh-key/providers.tf @@ -0,0 +1,5 @@ +# https://github.com/ssbostan/terraform-awesome + +provider "github" { + token = var.token +} \ No newline at end of file diff --git a/examples/github/easy-github-user-add-ssh-key/terrafrom.tf b/examples/github/easy-github-user-add-ssh-key/terrafrom.tf new file mode 100644 index 0000000..cf8d6c6 --- /dev/null +++ b/examples/github/easy-github-user-add-ssh-key/terrafrom.tf @@ -0,0 +1,10 @@ +# https://github.com/ssbostan/terraform-awesome + +terraform { + required_providers { + github = { + source = "integrations/github" + version = "~> 4.0" + } + } +} \ No newline at end of file diff --git a/examples/github/easy-github-user-add-ssh-key/variables.tf b/examples/github/easy-github-user-add-ssh-key/variables.tf new file mode 100644 index 0000000..6484128 --- /dev/null +++ b/examples/github/easy-github-user-add-ssh-key/variables.tf @@ -0,0 +1,5 @@ +# https://github.com/ssbostan/terraform-awesome + +variable "token" { + type = string +} \ No newline at end of file