-
For each ld project:
a. Make an API call to get flag definitions:
i. Be sure to use the summary=0 parameter ii. https://apidocs.launchdarkly.com/tag/Feature-flags/#operation/getFeatureFlags
b. Make an API call for every ld project to get segment definitions:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_providers { | |
harness = { | |
source = "harness/harness" | |
} | |
} | |
} | |
provider "harness" {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_providers { | |
azurerm = { | |
source = "hashicorp/azurerm" | |
version = "=3.0.0" | |
} | |
harness = { | |
source = "harness/harness" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
locals { | |
# pull in accounts csv | |
projects_raw = csvdecode(file("./projects.csv")) | |
# only get linked account (ignore masters) | |
projects = [for account in local.projects_raw : account if account["Type"] == "Linked Account"] | |
} | |
variable "harness_gcp_sa" { | |
type = string | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable "harness_gcp_sa" { | |
type = string | |
} | |
data "google_project" "project" {} | |
# for view access | |
resource "google_project_iam_member" "viewer" { | |
project = data.google_project.project.project_id | |
role = "roles/viewer" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Linked account name | Linked account | Type | |
---|---|---|---|
000000000001 | aws-account-one | Linked Account | |
000000000002 | aws-account-two | Linked Account | |
000000000003 | aws-account-three | Linked Account |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_providers { | |
harness = { | |
source = "harness/harness" | |
} | |
} | |
} | |
data "harness_platform_current_account" "this" {} |
to get a connection into a k8s cluster without deploying a delegate, we need to create a service account with the correct permissions and generate a token for it.
first, we create the service account:
apiVersion: v1
kind: ServiceAccount
metadata:
name: harness
namespace: default
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=stress | |
[Service] | |
SyslogIdentifier=stress | |
StandardOutput=journal | |
StandardError=journal | |
ExecReload=/bin/kill -HUP $MAINPID | |
ExecStart=/usr/bin/stress -c 1 | |
Restart=always |
NewerOlder