Skip to content

Instantly share code, notes, and snippets.

@rssnyder
Created October 24, 2023 14:26
Show Gist options
  • Save rssnyder/4a17554a24944bf3e74aaf8e43693ce1 to your computer and use it in GitHub Desktop.
Save rssnyder/4a17554a24944bf3e74aaf8e43693ce1 to your computer and use it in GitHub Desktop.
harness terraform provider example

set the following environment variables

HARNESS_ACCOUNT_ID: your harness account id HARNESS_PLATFORM_API_KEY: your harness api key

example:

HARNESS_ACCOUNT_ID=wlgELJ0TTre5aZhzpt8gVA HARNESS_PLATFORM_API_KEY=sat.wlgELJ0TTre5aZhzpt8gVA.xxxxxxxxxxxx

terraform {
required_providers {
harness = {
source = "harness/harness"
}
}
}
provider "harness" {}
resource "harness_platform_connector_awscc" "master" {
identifier = "master"
name = "master"
account_id = "012345678901"
report_name = "harnessccm"
s3_bucket = "harnessccm"
features_enabled = [
"BILLING",
]
cross_account_access {
role_arn = "arn:aws:iam::012345678901:role/HarnessCERole"
external_id = "harness:867530900000:sdjfhewfhsddfjw"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment