<- All Blueprints
Create a template that deploys...

GCP Service Account

This blueprint creates a Google Cloud Service Account adhering to best practices by requiring a valid account_id that meets naming conventions and encouraging the use of meaningful display_name and description for better resource management. It allows association with a specific project and offers advanced options like disabling the service account when necessary.

Template code
Automatically generated UI

---
constants:
  __name: "{{ account_id }}_{{ __guid }}"
variables:
  account_id:
    desc: "The account ID used to generate the service account email address and a stable unique ID. Must be 6-30 lowercase letters, digits, or hyphens, and cannot start with a digit."
    required: true
    group: Service Account Details
  display_name:
    desc: "The display name for the service account."
    required: false
    group: Service Account Details
    default: "Managed by Resourcely"
  description:
    desc: "A text description of the service account."
    required: false
    group: Service Account Details
  project:
    desc: "The ID of the project in which the service account will be created."
    required: false
    group: Project Settings
    links_to: resource.google_project.project_id
  disabled:
    desc: "Whether the service account is disabled."
    required: false
    group: Advanced
    default: false
    advanced: true
groups:
  Service Account Details:
    order: 1
    desc: "Basic settings for the service account."
  Project Settings:
    order: 2
    desc: "Project association for the service account."
  Advanced:
    order: 3
    desc: "Advanced settings for the service account."
---

resource "google_service_account" "__name" {
  account_id   = {{ account_id }}
  display_name = {{ display_name }}
  description  = {{ description | required: false }}
  project      = {{ project | required: false }}
  disabled     = {{ disabled }}
}

// The service account is created with the specified settings.
// Advanced options like disabling the account are available if needed.
// Providing meaningful descriptions and display names aids in resource management.
//
What am I looking at?

Talk to a Human

See Resourcely in action and learn how it can help you secure and manage your cloud infrastructure today!