docs: https://docs.harness.io/article/tm0w6rruqv-harness-api
fn_run_query () {
#
from requests import get, put | |
if __name__ == "__main__": | |
harness_account_id = "wlgELJ0TTre5aZhzpt8gVA" | |
harness_platform_api_key = "xxxxxxxxxx" | |
custom_delegate_location = "my_docker_repo/harness/delegate" | |
resp = get( |
--- | |
apiVersion: v1 | |
data: | |
token: <first gen api token here> | |
kind: Secret | |
metadata: | |
name: harness-api-key | |
namespace: harness-autostopping |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRole | |
metadata: | |
name: ccm-visibility-clusterrole | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- pods |
locals { | |
accounts = csvdecode(file("${path.module}/AWS Account to Cost Center Mapping.csv")) | |
external_id = "harness:891928451355:pC_7h33wQTeZ_j-libvF4A" | |
role_name = "HarnessCERole" | |
} | |
resource "harness_platform_connector_awscc" "accounts" { | |
for_each = { for account in local.accounts : account.vendor_account_identifier => account } | |
identifier = "aws${each.key}" |
from csv import reader | |
from os import getenv | |
from sys import argv | |
from re import sub | |
import json | |
from requests import put, post, get | |
class AWSAccount: |
pipeline: | |
name: generate something | |
identifier: generate_something | |
projectIdentifier: development | |
orgIdentifier: default | |
tags: {} | |
stages: | |
- stage: | |
name: generate | |
identifier: generate |
locals { | |
org_name = replace(replace(var.org, "/[ -]/", "_"), "/\\W/", "") | |
org_id = lower(local.org_name) | |
} | |
data "harness_platform_current_user" "current" {} | |
# create the org and project | |
resource "harness_platform_organization" "this" { | |
identifier = local.org_id |
package feature_flags | |
# Only allow FF edits by users in a group called ff_editors | |
# This helps seperate create and edit access, which are currently bundled together | |
deny["You are not allowed to edit flags"] { | |
input.metadata.action == "onsave" | |
# createdAt is in ms vs timestamp in s | |
createdAt := floor(input.flag.createdAt / 1000) |
docs: https://docs.harness.io/article/tm0w6rruqv-harness-api
fn_run_query () {
#
--- | |
version: "3" | |
services: | |
plex: | |
image: ghcr.io/linuxserver/plex | |
container_name: plex | |
network_mode: host | |
restart: unless-stopped | |
environment: |