Created
July 19, 2020 07:31
-
-
Save Callonski/bc347566df1e7f1ca512ed001c08b7c1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resource "google_project_iam_custom_role" "elastic-backup" { | |
| role_id = "Custom-elastic-role" | |
| title = "Elastic role" | |
| description = "Role for serviceaccounts used by elastic-vms" | |
| permissions = ["iam.serviceAccountKeys.get","storage.objects.get","storage.buckets.get","storage.buckets.create","storage.objects.create","storage.objects.list","storage.objects.delete"] | |
| } | |
| resource "google_project_iam_member" "elastic-backup" { | |
| role = "projects/${var.project_name}/roles/Custom-elastic-role" | |
| member = "serviceAccount:elastic-backup@${var.project_name}.iam.gserviceaccount.com" | |
| } | |
| resource "google_service_account" "elastic-backup" { | |
| account_id = "elastic-backup" | |
| display_name = "Service account for elastic VMs" | |
| } | |
| resource "google_service_account_key" "mykey" { | |
| service_account_id = google_service_account.elastic-backup.name | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment