Skip to content

Instantly share code, notes, and snippets.

View quangnhut123's full-sized avatar

Tran Quang Nhut (Jonny) quangnhut123

View GitHub Profile
import os
import yaml
# Define the folder path containing the YAML files
folder_path = (
"YOUR_BASE_YAML_FOLDER_PATH"
)
# Initialize variables to store the largest offset and access port
largest_offset = -1
#!/bin/bash
TOKEN="TFC_TOKEN"
ORG_NAME="ORG_NAME"
PAGE_SIZE=20
# Function to fetch workspaces for a specific page number
function fetch_workspaces_page {
local page="$1"
curl -s -H "Authorization: Bearer $TOKEN" \
#!/bin/bash
# Set up your environment variables
TFC_ORG_SOURCE=""
TFC_ORG_DEST=""
TFC_TOKEN_SOURCE=""
TFC_TOKEN_DEST=""
# Define the list of workspace names to exclude
EXCLUDE_WORKSPACES=("workspace_1" "workspace_2")