You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A new `export` folder should have been created. The `sg-payload.json` file contains the definition for each workflow that will be created for each Terraform Workspace, and the `states` folder contains the files for the Terraform state for each of your workspaces, if the state export was enabled.
37
38
38
39
After completing the export , edit the `sg-payload.json` file to provide tune each workflow configuration with the following:
39
-
### Use the example_payload.jsonc file to refrence and edit the schema of the `sg-payload.json`
40
-
-`DeploymentPlatformConfig` - (Used to authenticate against a cloud provider using a StackGuardian Integration), Create the relevant integration in StackGuardian platform and update `DeploymentPlatformConfig.kind` from the following "AZURE_STATIC", "AWS_STATIC","GCP_STATIC", "AWS_RBAC". Update `DeploymentPlatformConfig.config.integrationId` with "/integrations/INTEGRATION_NAME" and `DeploymentPlatformConfig.config.profileName` with the name of the integration used upon creation.
40
+
### Use the example_payload.jsonc file as a reference and edit the schema of the `sg-payload.json`
41
+
-`DeploymentPlatformConfig` - THis is used to authenticate against a cloud provider using a StackGuardian Integration. Create the relevant integration in StackGuardian platform and update `DeploymentPlatformConfig.kind` from the following "AZURE_STATIC", "AWS_STATIC","GCP_STATIC", "AWS_RBAC". Update `DeploymentPlatformConfig.config.integrationId` with "/integrations/INTEGRATION_NAME" and `DeploymentPlatformConfig.config.profileName` with the name of the integration used upon creation.
41
42
```
42
43
DeploymentPlatformConfig: {
43
44
"kind": "AWS_RBAC",
@@ -47,33 +48,30 @@ After completing the export , edit the `sg-payload.json` file to provide tune ea
47
48
}
48
49
}
49
50
```
50
-
-`VCSConfig` - Provide full path to the `repo` like as well the relevant `sourceConfigDestKind` from the following "GITHUB_COM", "BITBUCKET_ORG", "GITLAB_COM", "AZURE_DEVOPS".
51
+
-`VCSConfig` - Provide full path to the `repo` like as well the relevant `sourceConfigDestKind` from the following "GITHUB_COM", "BITBUCKET_ORG", "GITLAB_COM", "AZURE_DEVOPS"
51
52
-`config.auth`
52
53
-`config.isPrivate`
53
54
54
-
-`ResourceName` // workspace name
55
-
-`wfgrpName` // this corresponds to the labelling of workflow group name in the StackGuardian platform
56
-
-`Description` // description for the workflows created in the StackGuardian platform
57
-
-`Tags` // list of tags for the workflows created in the StackGuardian platform
58
-
-`EnvironmentVariables` // environment variables for the workflows created in the StackGuardian platform
59
-
-`RunnerConstraints` // Runner description for the workflows in the StackGuardian platform
60
-
-`DeploymentPlatformConfig`
61
-
-`Approvers` // Aprrovers for the workflow to run it successfully
62
-
-`TerraformConfig` // Terraform configuration for the workflows created in the StackGuardian platform
63
-
-`WfType` // this corresponds to the workflow type of the workflow created in the StackGuardian platform
64
-
-`UserSchedules` // Scheduled workflow run configuration for the workflow in the StackGuardian platform
65
-
-`MiniSteps` // Ministeps for the workflow to direct the process if the workflow returns an error/success/approval required and workflow chaining .
55
+
-`ResourceName` - name of your StackGuardian Workflow
56
+
-`wfgrpName` - this corresponds to the labelling of workflow group name in the StackGuardian platform
57
+
-`Description` - description for the workflows created in the StackGuardian platform
58
+
-`Tags` - list of tags for the workflows created in the StackGuardian platform
59
+
-`EnvironmentVariables` - environment variables for the workflows created in the StackGuardian platform
60
+
-`RunnerConstraints` - Runner description for the workflows in the StackGuardian platform
61
+
-`Approvers` - Approvers for the workflow to run it successfully
62
+
-`TerraformConfig` - Terraform configuration for the workflows created in the StackGuardian platform
63
+
-`UserSchedules` - Scheduled workflow run configuration for the workflow in the StackGuardian platform
64
+
-`MiniSteps` - Ministeps for the workflow to direct the process if the workflow returns an error/success/approval required and workflow chaining
66
65
67
66
### Bulk import workflows to StackGuardian Platform
68
67
69
-
- Fetch sg-cli(https://github.com/StackGuardian/sg-cli.git) and set up sg-cli locally (documentation present in repo)
68
+
- Fetch [sg-cli](https://github.com/StackGuardian/sg-cli.git) and set it up locally (documentation present in repo)
70
69
- Run the following commands and pass the `sg-payload.json` as payload (represented below)
70
+
- Get your SG API Key here: https://app.stackguardian.io/orchestrator/orgs/<ORG_ID>/settings?tab=api_key
71
71
72
72
```shell
73
73
cd ../../export
74
74
75
-
Get your SG API Key here: https://app.stackguardian.io/orchestrator/orgs/<org-id>/settings?tab=api_key
"auth":length(data.tfe_workspace.data[i].vcs_repo) >0?length(data.tfe_workspace.data[i].vcs_repo[0].oauth_token_id) >0||length(data.tfe_workspace.data[i].vcs_repo[0].github_app_installation_id) >0?"Provide an integration id like /integrations/aws-dev-account or /secrets/my-git-token":"":"",
Approvers = data.tfe_workspace.data[i].auto_apply ==true? [] : ["Add emails of the users who should approve the terraform plan, since approvalPreApply is set to true"]
0 commit comments