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 / tf_output_json_container.yaml
Created July 2, 2025 20:47
generate tf outputs in iacm stage
- step:
type: Run
name: tf output json container
identifier: tf_output_json_container
spec:
# use the Harness plugin used by TF steps to avoid pulling another container
connectorRef: account.harnessImage
image: plugins/harness_terraform:latest
shell: Sh
command: |-
@rssnyder
rssnyder / hsf-custom.yaml
Last active July 1, 2025 21:36
hsf workflow template for custom templates
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: external-template-test
title: external-template-test
description: external-template-test
tags:
- solutions-factory
- harness
spec:
@rssnyder
rssnyder / role.tf
Created June 18, 2025 17:11
Create a copy of the default Project Admin role
#
# Create a copy of a built in role by copying the permissions and removing any that are not needed
#
# usage: tf apply -var org_id=default -var project_id=default -var scopes_to_remove='["iac_workspace_approve","idp_plugin_edit"]'
#
terraform {
required_providers {
harness = {
source = "harness/harness"
@rssnyder
rssnyder / rg_folder.tf
Created May 16, 2025 14:59
Creating a Harness Resource Group for a CCM Perspective Folder
terraform {
required_providers {
harness = {
source = "harness/harness"
}
}
}
variable "folder_id" {
type = string
@rssnyder
rssnyder / cloud-init.sh
Created May 1, 2025 15:35
harness ccm as proxy config
Content-Type: multipart/mixed; boundary="//"
MIME-Version: 1.0
--//
Content-Type: text/cloud-config; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="cloud-config.txt"
#cloud-config
@rssnyder
rssnyder / ec2_k3s_delegate.tf
Created April 23, 2025 16:29
Create a Harness Delegate using K3s on an EC2 instance
terraform {
required_providers {
harness = {
source = "harness/harness"
}
aws = {
source = "hashicorp/aws"
}
}
}

auth

HARNESS_ACCOUNT_ID: harness account id

HARNESS_PLATFORM_API_KEY: harness api key, requires delegate:read and connectors:read/write

settings

NEW_FEATURE: new feature to add to connectors

@rssnyder
rssnyder / iam.tf
Created March 27, 2025 21:15
asdfsg
resource "aws_iam_policy" "harness_actions" {
name = "harness_actions"
policy = jsonencode({
Version = "2012-10-17"
Statement = [
{
Action = [
"ec2:DeleteSnapshot",
"rds:StartDBCluster",
@rssnyder
rssnyder / nonsense.tf
Last active July 9, 2025 13:25
Nonsense AWS Terraform
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
}
}
variable "region" {
pipeline:
name: catalog ingestion api
identifier: catalog_ingestion_api
projectIdentifier: idp
orgIdentifier: default
tags: {}
stages:
- stage:
name: add data
identifier: add_data