This file contains hidden or 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
| #!/bin/bash | |
| echo "Deleting HSF in account $HARNESS_ACCOUNT_ID. Enter to proceed or Ctr-C to cancel..." | |
| read | |
| echo "Deleting org..." | |
| curl -X DELETE 'https://app.harness.io/v1/orgs/Harness_Platform_Management' \ | |
| -H "x-api-key: $HARNESS_PLATFORM_API_KEY" \ | |
| -H "Harness-Account: $HARNESS_ACCOUNT_ID" |
This file contains hidden or 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
| from doctest import master | |
| from os import getenv | |
| from json import dumps | |
| from requests import post | |
| def get_connectors(type: str, page: int = 0, size: int = 10): | |
| resp = post( | |
| "https://app.harness.io/gateway/ng/api/connectors/listV2", |
This file contains hidden or 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
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Action": [ | |
| "acm:ListCertificates", | |
| "elasticloadbalancing:DescribeLoadBalancers", | |
| "elasticloadbalancing:CreateLoadBalancer", | |
| "elasticloadbalancing:DescribeTargetGroups", | |
| "elasticloadbalancing:CreateTargetGroup", |
This file contains hidden or 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
| apiVersion: harness.io/v1 | |
| kind: resource | |
| identifier: {{ resource_name | replace(" ","-") | replace("-","_") | lower }} | |
| name: {{ resource_name }} | |
| type: hsf_workspace | |
| owner: {{ owner if owner else "group:account/HSF_Admins"}} | |
| metadata: | |
| description: {{ description if description else "Automatically registered Harness Solutions Factory" }} | |
| annotations: | |
| {%- if workspace_uri %} |
This file contains hidden or 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
| - step: | |
| type: Run | |
| name: tf output json container | |
| identifier: tf_output_json_container | |
| spec: | |
| # use the Harness plugin used by TF steps to avoid pulling another container | |
| connectorRef: account.harnessImage | |
| image: plugins/harness_terraform:latest | |
| shell: Sh | |
| command: |- |
This file contains hidden or 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
| apiVersion: harness.io/v1 | |
| kind: Workflow | |
| name: external-template-test | |
| identifier: external_template_test | |
| type: service | |
| owner: group:account/HSF_Admins | |
| metadata: | |
| tags: | |
| - solutions-factory | |
| spec: |
This file contains hidden or 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
| # | |
| # Create a copy of a built in role by copying the permissions and removing any that are not needed | |
| # | |
| # usage: tf apply -var org_id=default -var project_id=default -var scopes_to_remove='["iac_workspace_approve","idp_plugin_edit"]' | |
| # | |
| terraform { | |
| required_providers { | |
| harness = { | |
| source = "harness/harness" |
This file contains hidden or 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" | |
| } | |
| } | |
| } | |
| variable "folder_id" { | |
| type = string |
This file contains hidden or 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
| Content-Type: multipart/mixed; boundary="//" | |
| MIME-Version: 1.0 | |
| --// | |
| Content-Type: text/cloud-config; charset="us-ascii" | |
| MIME-Version: 1.0 | |
| Content-Transfer-Encoding: 7bit | |
| Content-Disposition: attachment; filename="cloud-config.txt" | |
| #cloud-config |
This file contains hidden or 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" | |
| } | |
| aws = { | |
| source = "hashicorp/aws" | |
| } | |
| } | |
| } |
NewerOlder