Skip to content

Instantly share code, notes, and snippets.

View rssnyder's full-sized avatar
🥨
limitless servers in a serverless world

Riley Snyder rssnyder

🥨
limitless servers in a serverless world
View GitHub Profile
@rssnyder
rssnyder / hsf.md
Created May 13, 2026 17:22
hsf seller

Harness Solutions Factory (HSF) — How It Works for Platform Admins

Harness Solutions Factory (HSF) is an automation framework that lets platform engineering teams define, publish, and govern reusable Harness resource bundles — and deliver them to developers through self-service, without requiring any Terraform or platform knowledge on the consumer side.


1. You Define the Templates

Platform admins author Terraform-backed templates that codify opinionated, repeatable configurations — things like a project pre-wired with environments, RBAC roles, user group bindings, pipelines, and connectors. These live in two places:

@rssnyder
rssnyder / Dockerfile
Created April 29, 2026 15:49
custom harness iacm tofu image
ARG TOFU=1.11.6
FROM ghcr.io/opentofu/opentofu:$TOFU-minimal AS tofu
FROM plugins/harness_terraform
COPY --from=tofu /usr/local/bin/tofu /usr/local/bin/tofu
@rssnyder
rssnyder / 3party.md
Created March 30, 2026 20:46
upload 3party data into harness ccm via api
  1. Here is a python implementation of the below process

  2. Call GET signed url. This is needed for any upload.

curl 'https://app.harness.io/gateway/ccm/api/externaldata/signedurl?providerId=<provider id>&accountIdentifier=<account id>&invoicePeriod=20250401-20250501&objectName=<csv file>.csv' \
  -H 'x-api-key: <api key>' \
  -H 'content-type: application/json'
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC/2cE6rUvhdb+lY6RENlicABrqZn+3T7aZn078yCWPRkGgjMMgfnDLQmR98J1kIk2P5GhjgORYb1aAO1yXtUlQf7ZwLj9FtgnJB/tFwY/KJjtvHfV9Ph06HsCpdPD9XVrJ0UnGZ+q46aGxm0LbfhdZXkF4RQk5WSWU41Iifzr7hbXkL2Hs/aclKk8yTZoXI6KWf5IAAROH7M8tHCVYWyJPQaKOrxVlgmuiKxHkj5cwEdmR8GdlS/CICbm/OovH/OKldJRYHQtdxcPyCoOjzulkcyUjKqf+0RlNtd/QLcGRFFtFLrLaVuPswg7wKFoA50xnrV0+qwO0Q6LaIxEhRFhOSvcGwnq2lewtt7kzq021CswA7+UXxRuPjNv+EY0VD4dT6lJInHYYQlIwS9LxkZMkK+4RwW/Ww6iarYWdZM7u8I89YNG/THIYSsAJiYM1rAQnh3LHUX6re5b3GTIAyTE1qwJS/yWv9K/ofgehbIt6lllMjySwTz63AiWYEQ3xcqE= rileysnyder@Riley Snyder
@rssnyder
rssnyder / vm.md
Created February 23, 2026 17:18
ci vm build farm dependencies

harness artifacts are needed for configuring binaries on the build vm machines as well as the docker images used on those machines (in pipelines).

--

for the docker images used in ci pipelines (harness steps are containers) we have a handy API that can retrive the current images:tags used in your account: https://developer.harness.io/docs/continuous-integration/use-ci/set-up-build-infrastructure/harness-ci/#specify-the-harness-ci-images-used-in-your-pipelines

pay close attention to the Send a get-default-config request to get a list of the latest Harness CI build images and tags and you will need to specify k8 or VM depending on your target infra model.

an example curl call is on the same page

@rssnyder
rssnyder / template.rego
Last active February 19, 2026 19:32
template governance
package template
import future.keywords.in
required_tags = {"ci", "cd", "db"}
any_required_tag_exists(map) {
some key in required_tags
_ = map[key]
}
@rssnyder
rssnyder / perms.md
Last active February 5, 2026 19:22
harness permissions 2/3/26

artifact_artregistry_delete artifact_artregistry_deleteartifact artifact_artregistry_downloadartifact artifact_artregistry_edit artifact_artregistry_quarantineartifact artifact_artregistry_uploadartifact artifact_artregistry_view cde_gitspace_create cde_gitspace_delete cde_gitspace_edit

@rssnyder
rssnyder / uninstall_hsf.sh
Last active January 8, 2026 00:07
remove hsf from a harness account
#!/bin/bash
echo "Deleting HSF in account $HARNESS_ACCOUNT_ID. Enter to proceed or Ctr-C to cancel..."
read
echo "Deleting org..."
curl -X DELETE 'https://app.harness.io/v1/orgs/Harness_Platform_Management' \
-H "x-api-key: $HARNESS_PLATFORM_API_KEY" \
-H "Harness-Account: $HARNESS_ACCOUNT_ID"
@rssnyder
rssnyder / dups.py
Created December 3, 2025 15:45
find duplicate k8s/ccm connectors
from doctest import master
from os import getenv
from json import dumps
from requests import post
def get_connectors(type: str, page: int = 0, size: int = 10):
resp = post(
"https://app.harness.io/gateway/ng/api/connectors/listV2",
@rssnyder
rssnyder / autostopping-alb.json
Last active December 29, 2025 14:16
ccm json perms
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"acm:ListCertificates",
"elasticloadbalancing:DescribeLoadBalancers",
"elasticloadbalancing:CreateLoadBalancer",
"elasticloadbalancing:DescribeTargetGroups",
"elasticloadbalancing:CreateTargetGroup",