HARNESS_ACCOUNT_ID: harness account id
HARNESS_PLATFORM_API_KEY: harness api key, requires delegate:read and connectors:read/write
NEW_FEATURE: new feature to add to connectors
| terraform { | |
| required_providers { | |
| harness = { | |
| source = "harness/harness" | |
| } | |
| aws = { | |
| source = "hashicorp/aws" | |
| } | |
| } | |
| } |
| resource "aws_iam_policy" "harness_actions" { | |
| name = "harness_actions" | |
| policy = jsonencode({ | |
| Version = "2012-10-17" | |
| Statement = [ | |
| { | |
| Action = [ | |
| "ec2:DeleteSnapshot", | |
| "rds:StartDBCluster", |
| 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 |
| terraform { | |
| required_providers { | |
| harness = { | |
| source = "harness/harness" | |
| } | |
| } | |
| } | |
| variable "org_id" { | |
| type = string |
| { | |
| "org_id": "default", | |
| "id": "projectA" | |
| } |
| terraform { | |
| required_providers { | |
| helm = { | |
| source = "hashicorp/helm" | |
| } | |
| harness = { | |
| source = "harness/harness" | |
| } | |
| } | |
| } |
deploy a namespaced delegate:
helm upgrade -i namespaced \
harness-delegate/harness-delegate-ng \
--set delegateName=namespaced \
--set accountId=wlgELJ0TTre5aZhzpt8gVA \
--set delegateToken=XXXXXX \
--set managerEndpoint=https://app.harness.io/gratis \
--set delegateDockerImage=harness/delegate:24.05.83001 \
| # fill in these values | |
| API_KEY= | |
| FLAG= | |
| HOST=config.ff.harness.io | |
| TARGET=foo | |
| # Authenticate as a client SDK with target | |
| AUTH_TOKEN=$(curl -X POST "https://$HOST/api/1.0/client/auth" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"apiKey\":\"$API_KEY\",\"target\":{\"identifier\":\"$TARGET\"}}" | jq -r '.authToken') |