Skip to content

Template Structure: Reusable vs Configurable

Understand what's generic (reusable for all orgs) vs what needs customization per organization


🟒 REUSABLE COMPONENTS (Same for all organizations)

These components are completely generic and work identically for any organization without modification.

PowerShell Scripts (automation/ & scripts/)

  • βœ… export_all_groups.ps1 - Export group configurations
  • βœ… export_group_members.ps1 - Export group membership lists
  • βœ… export_shared_drive_acls.ps1 - Export Shared Drive permissions
  • βœ… generate_id_mapping.ps1 - Generate ID mapping files
  • βœ… All GAM wrapper scripts - Reusable for any domain/org

Why reusable: These scripts use variables ({DOMAIN}, etc.) instead of hardcoded values. They work by accepting parameters or reading from environment.

GAM Commands (docs/gam-commands.md)

  • βœ… User creation commands
  • βœ… Group management commands
  • βœ… Shared drive provisioning commands
  • βœ… Email forwarding setup
  • βœ… Security policy enforcement

Why reusable: GAM syntax is standardized. Commands reference placeholders like {DOMAIN}, {USER_EMAIL}, etc.

Documentation Structure (docs/)

  • βœ… index.md - Main documentation page (customizable title/intro)
  • βœ… migration-playbook.md - Generic migration steps
  • βœ… gam-commands.md - GAM command reference
  • βœ… troubleshooting.md - Generic troubleshooting
  • βœ… TEMPLATE_*.md - Template documentation

Why reusable: Structure is the same; content is mostly generic with customizable sections.

MkDocs Setup (mkdocs.yml, docs/ structure)

  • βœ… MkDocs configuration (except site name/URL)
  • βœ… Material theme configuration
  • βœ… Navigation structure
  • βœ… Build/deployment process

Why reusable: MkDocs setup is standard. Only the site name and org-specific URLs change.

GitHub Actions / Workflows (.github/workflows/)

  • βœ… MkDocs deployment workflow
  • βœ… GAM validation workflows
  • βœ… Script testing workflows

Why reusable: Workflows are generic CI/CD patterns; they don't reference org-specific values.

Data Structure Template (data/structure.json)

  • βœ… Folder hierarchy template
  • βœ… Group definitions template
  • βœ… User role structure

Why reusable: This is a template for structure. Each org customizes folder names, group names, etc.


🟑 PARTIALLY CONFIGURABLE (Template structure reusable, values customizable)

These need one-time customization per organization, but the approach is reusable.

User List & Group Definitions

Reusable: The process of creating users and groups
Customizable: - User names, emails, roles - Group names and members - Department/role definitions - Email forwarding rules

How: Templates with {PLACEHOLDER} values replaced during setup.

Email Group Setup

Reusable: GAM commands and scripts that create groups
Customizable: - Group email addresses (must match org domain) - Group membership - Group display names - Group descriptions

Shared Drive Configuration

Reusable: GAM provisioning scripts
Customizable: - Drive names - Drive structure (folder hierarchy) - Access permissions per role - Shared drive managers

Security Policies

Reusable: Policy templates and enforcement scripts
Customizable: - Password requirements (length, complexity) - 2FA enforcement level - Session timeout settings - IP restrictions (if any)

Documentation Content

Reusable: Documentation structure and style
Customizable: - Organization name in all docs - Contact information - Custom procedures - Organization-specific sections


πŸ”΄ NEVER IN REPOSITORY (Secrets & Credentials)

These should NEVER be committed to Git, ever.

Google Cloud Credentials

  • ❌ gam.cfg - Contains OAuth2 tokens for GAM
  • ❌ oauth2.json - Google API authentication
  • ❌ oauth2.txt - GAM authentication tokens
  • ❌ Service account keys
  • ❌ Any .key or .pem files

Organization Secrets

  • ❌ Real user passwords
  • ❌ Admin account passwords
  • ❌ API keys
  • ❌ Service account credentials
  • ❌ Encryption keys

Generated/Sensitive Data

  • ❌ User lists with passwords
  • ❌ Access control reports with sensitive info
  • ❌ Any .csv files with personal data
  • ❌ Audit logs
  • ❌ Usage reports

See .gitignore for complete list of ignored files.


πŸ“‹ Customization Checklist

When adapting this template for a new organization, modify ONLY:

Phase 1: Configuration (Required)

  • [ ] .env.example β†’ Copy to .env with real values (don't commit .env)
  • [ ] {ORG_NAME} β†’ Organization's actual name
  • [ ] {DOMAIN} β†’ Organization's email domain
  • [ ] {ADMIN_EMAIL} β†’ Primary admin email
  • [ ] {GCP_PROJECT_ID} β†’ Google Cloud project ID
  • [ ] docs/index.md - Update organization branding
  • [ ] README.md - Update org-specific sections
  • [ ] docs/ORGANIZATION_SETUP_GUIDE.md - Customize steps

Phase 3: User/Group Structure (Required)

  • [ ] Define users and roles
  • [ ] Define email groups
  • [ ] Define shared drive structure
  • [ ] Define security roles

Phase 4: Org-Specific Procedures (Optional)

  • [ ] Add organization-specific SOP documents
  • [ ] Add custom email templates
  • [ ] Add organization-specific security policies
  • [ ] Add custom workflows

What NOT to Modify

  • ❌ GAM command syntax
  • ❌ PowerShell script logic
  • ❌ MkDocs structure
  • ❌ GitHub workflow logic
  • ❌ Core automation frameworks

πŸ“Š File-by-File Guide

File/Folder Reusable? How to Customize
README.md Partially Update org name, links
docs/ Partially Replace placeholders, add org docs
automation/ βœ… Fully Use as-is; configure via .env
scripts/ βœ… Fully Use as-is; configure via .env
data/structure.json Partially Update folder/group names
templates/ Partially Update email templates with org name
mkdocs.yml Partially Update site name, org URL
.gitignore βœ… Fully Use as-is
.env.example Partially Copy & fill with real values
examples/ Reference Use as setup reference

πŸ”„ Workflow for Onboarding New Organizations

  1. Clone template β†’ git clone https://github.com/Golfklubb-IT/workspace-setup-template.git OrgName-workspace
  2. Create new GitHub repo β†’ Push to OrgName-workspace repository
  3. Run setup script β†’ .\scripts\setup-new-org.ps1 to replace all placeholders
  4. Customize user/group structure β†’ Update data/ files
  5. Review documentation β†’ Update docs/ for org-specific info
  6. Test in staging β†’ Verify all settings before production
  7. Deploy β†’ Execute automation scripts with validated configuration
  8. Document handoff β†’ Create org-specific runbooks and guides

🎯 Key Principle

Template code = 95% reusable
Template configuration = 100% customizable

All organization-specific values use placeholders. The setup script automates replacement, so you rarely edit code directlyβ€”you just fill in configuration values.