Skip to content

Commit af1eb2e

Browse files
authored
fix: surface artifactory variables (#618)
* chore: surface artifactory variables * chore: update description * chore: update artifactory defaults * fix: typo
1 parent b86d8b9 commit af1eb2e

File tree

3 files changed

+90
-0
lines changed

3 files changed

+90
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@ statement instead the previous block.
108108
| <a name="input_app_repo_git_token_secret_crn"></a> [app\_repo\_git\_token\_secret\_crn](#input\_app\_repo\_git\_token\_secret\_crn) | The CRN of the Git token used for accessing the sample application repository. | `string` | `""` | no |
109109
| <a name="input_app_repo_git_token_secret_name"></a> [app\_repo\_git\_token\_secret\_name](#input\_app\_repo\_git\_token\_secret\_name) | Name of the Git token secret in the secret provider used for accessing the sample (or bring your own) application repository. | `string` | `""` | no |
110110
| <a name="input_app_repo_secret_group"></a> [app\_repo\_secret\_group](#input\_app\_repo\_secret\_group) | Secret group for the App repository secret. Defaults to the value set in `sm_secret_group` if not set. Only used with `Secrets Manager`. | `string` | `""` | no |
111+
| <a name="input_artifactory_dashboard_url"></a> [artifactory\_dashboard\_url](#input\_artifactory\_dashboard\_url) | Type the URL that you want to navigate to when you click the Artifactory integration tile. | `string` | `""` | no |
112+
| <a name="input_artifactory_integration_name"></a> [artifactory\_integration\_name](#input\_artifactory\_integration\_name) | The name of the Artifactory tool integration | `string` | `"artifactory-dockerconfigjson"` | no |
113+
| <a name="input_artifactory_repo_name"></a> [artifactory\_repo\_name](#input\_artifactory\_repo\_name) | Type the name of your Artifactory repository where your docker images are located. | `string` | `""` | no |
114+
| <a name="input_artifactory_repo_url"></a> [artifactory\_repo\_url](#input\_artifactory\_repo\_url) | Type the URL for your Artifactory release repository. | `string` | `""` | no |
115+
| <a name="input_artifactory_token_secret_group"></a> [artifactory\_token\_secret\_group](#input\_artifactory\_token\_secret\_group) | Secret group prefix for the Artifactory token secret. Defaults to `sm_secret_group` if not set. Only used with `Secrets Manager`. | `string` | `""` | no |
116+
| <a name="input_artifactory_token_secret_name"></a> [artifactory\_token\_secret\_name](#input\_artifactory\_token\_secret\_name) | Name of the artifactory token secret in the secret provider. | `string` | `"artifactory-token"` | no |
117+
| <a name="input_artifactory_user"></a> [artifactory\_user](#input\_artifactory\_user) | Type the User ID or email for your Artifactory repository. | `string` | `""` | no |
111118
| <a name="input_authorization_policy_creation"></a> [authorization\_policy\_creation](#input\_authorization\_policy\_creation) | Disable Toolchain Service to Secrets Manager/Key Protect/Notifications Service authorization policy creation. To disable set the value to `disabled`. This applies to the CI, CD, and CC toolchains. To set independently, see `ci_authorization_policy_creation`, `cd_authorization_policy_creation`, and `cc_authorization_policy_creation`. | `string` | `""` | no |
112119
| <a name="input_autostart"></a> [autostart](#input\_autostart) | Set to `true` to auto run the CI pipeline in the CI toolchain after creation. | `bool` | `false` | no |
113120
| <a name="input_cc_app_group"></a> [cc\_app\_group](#input\_cc\_app\_group) | Specify user or group for app repository. | `string` | `""` | no |
@@ -509,6 +516,7 @@ statement instead the previous block.
509516
| <a name="input_create_secret_group"></a> [create\_secret\_group](#input\_create\_secret\_group) | Set to `true` to create the specified Secrets Manager secret group. | `bool` | `false` | no |
510517
| <a name="input_create_signing_key"></a> [create\_signing\_key](#input\_create\_signing\_key) | Set to `true` to create and add a `signing-key` and the `signing-certificate` to the Secrets Provider. | `bool` | `false` | no |
511518
| <a name="input_create_triggers"></a> [create\_triggers](#input\_create\_triggers) | Set to `true` to create the default triggers associated with the compliance repos and sample app. | `string` | `"true"` | no |
519+
| <a name="input_enable_artifactory"></a> [enable\_artifactory](#input\_enable\_artifactory) | Set to `true` to enable Artifactory for devsecops. | `bool` | `false` | no |
512520
| <a name="input_enable_cos"></a> [enable\_cos](#input\_enable\_cos) | Set to `true` to enable the new COS integration. | `bool` | `false` | no |
513521
| <a name="input_enable_key_protect"></a> [enable\_key\_protect](#input\_enable\_key\_protect) | Set to `true` to the enable Key Protect integrations. | `string` | `"false"` | no |
514522
| <a name="input_enable_pipeline_notifications"></a> [enable\_pipeline\_notifications](#input\_enable\_pipeline\_notifications) | When enabled, pipeline run events will be sent to the Event Notifications and Slack integrations in the enclosing toolchain. | `string` | `""` | no |

main.tf

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,10 @@ module "devsecops_ci_toolchain" {
396396
pipeline_doi_api_key_secret_name = (var.ci_pipeline_doi_api_key_secret_name == "") ? var.pipeline_doi_api_key_secret_name : var.ci_pipeline_doi_api_key_secret_name
397397
pipeline_doi_api_key_secret_group = (var.ci_pipeline_doi_api_key_secret_group == "") ? var.pipeline_doi_api_key_secret_group : var.ci_pipeline_doi_api_key_secret_group
398398

399+
artifactory_token_secret_name = var.artifactory_token_secret_name
400+
artifactory_token_secret_group = var.artifactory_token_secret_group
401+
402+
399403
# CRN SECRETS
400404
app_repo_git_token_secret_crn = (
401405
(local.ci_app_repo_git_token_secret_crn != "") ? local.ci_app_repo_git_token_secret_crn : var.repo_git_token_secret_crn
@@ -575,6 +579,15 @@ module "devsecops_ci_toolchain" {
575579
#DEVOPS INSIGHTS
576580
link_to_doi_toolchain = var.ci_link_to_doi_toolchain
577581

582+
#ARTIFACTORY
583+
enable_artifactory = var.enable_artifactory
584+
artifactory_user = var.artifactory_user
585+
artifactory_dashboard_url = var.artifactory_dashboard_url
586+
artifactory_repo_url = var.artifactory_repo_url
587+
artifactory_repo_name = var.artifactory_repo_name
588+
artifactory_integration_name = var.artifactory_integration_name
589+
590+
578591
#TRIGGER PROPERTIES
579592
create_triggers = var.create_triggers
580593
create_git_triggers = var.create_git_triggers
@@ -666,6 +679,9 @@ module "devsecops_cd_toolchain" {
666679
pipeline_doi_api_key_secret_name = (var.cd_pipeline_doi_api_key_secret_name == "") ? var.pipeline_doi_api_key_secret_name : var.cd_pipeline_doi_api_key_secret_name
667680
pipeline_doi_api_key_secret_group = (var.cd_pipeline_doi_api_key_secret_group == "") ? var.pipeline_doi_api_key_secret_group : var.cd_pipeline_doi_api_key_secret_group
668681

682+
artifactory_token_secret_name = var.artifactory_token_secret_name
683+
artifactory_token_secret_group = var.artifactory_token_secret_group
684+
669685
# CRN SECRETS
670686
deployment_repo_git_token_secret_crn = (
671687
(var.cd_deployment_repo_git_token_secret_crn != "") ? var.cd_deployment_repo_git_token_secret_crn : var.repo_git_token_secret_crn
@@ -855,6 +871,14 @@ module "devsecops_cd_toolchain" {
855871
kp_integration_name = var.kp_integration_name
856872
slack_integration_name = var.slack_integration_name
857873

874+
#ARTIFACTORY
875+
enable_artifactory = var.enable_artifactory
876+
artifactory_user = var.artifactory_user
877+
artifactory_dashboard_url = var.artifactory_dashboard_url
878+
artifactory_repo_url = var.artifactory_repo_url
879+
artifactory_repo_name = var.artifactory_repo_name
880+
artifactory_integration_name = var.artifactory_integration_name
881+
858882
#TRIGGER PROPERTIES
859883
create_triggers = var.create_triggers
860884
create_git_triggers = var.create_git_triggers
@@ -944,6 +968,9 @@ module "devsecops_cc_toolchain" {
944968
pipeline_doi_api_key_secret_name = (var.cc_pipeline_doi_api_key_secret_name == "") ? var.pipeline_doi_api_key_secret_name : var.cc_pipeline_doi_api_key_secret_name
945969
pipeline_doi_api_key_secret_group = (var.cc_pipeline_doi_api_key_secret_group == "") ? var.pipeline_doi_api_key_secret_group : var.cc_pipeline_doi_api_key_secret_group
946970

971+
artifactory_token_secret_name = var.artifactory_token_secret_name
972+
artifactory_token_secret_group = var.artifactory_token_secret_group
973+
947974
# CRN SECRETS
948975
app_repo_git_token_secret_crn = (
949976
(local.cc_app_repo_git_token_secret_crn != "") ? local.cc_app_repo_git_token_secret_crn : var.repo_git_token_secret_crn
@@ -1114,6 +1141,14 @@ module "devsecops_cc_toolchain" {
11141141
sonarqube_is_blind_connection = (var.cc_sonarqube_is_blind_connection == "") ? var.sonarqube_is_blind_connection : var.cc_sonarqube_is_blind_connection
11151142
sonarqube_server_url = (var.cc_sonarqube_server_url == "") ? var.sonarqube_server_url : var.cc_sonarqube_server_url
11161143

1144+
#ARTIFACTORY
1145+
enable_artifactory = var.enable_artifactory
1146+
artifactory_user = var.artifactory_user
1147+
artifactory_dashboard_url = var.artifactory_dashboard_url
1148+
artifactory_repo_url = var.artifactory_repo_url
1149+
artifactory_repo_name = var.artifactory_repo_name
1150+
artifactory_integration_name = var.artifactory_integration_name
1151+
11171152
#TRIGGER PROPERTIES
11181153
create_triggers = var.create_triggers
11191154
trigger_timed_name = var.cc_trigger_timed_name

variables.tf

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,47 @@ variable "app_repo_git_token_secret_crn" {
9797
}
9898
}
9999

100+
variable "artifactory_token_secret_name" {
101+
type = string
102+
default = "artifactory-token"
103+
description = "Name of the artifactory token secret in the secret provider."
104+
}
105+
106+
variable "artifactory_token_secret_group" {
107+
type = string
108+
description = "Secret group prefix for the Artifactory token secret. Defaults to `sm_secret_group` if not set. Only used with `Secrets Manager`."
109+
default = ""
110+
}
111+
112+
variable "artifactory_user" {
113+
type = string
114+
description = "Type the User ID or email for your Artifactory repository."
115+
default = ""
116+
}
117+
118+
variable "artifactory_dashboard_url" {
119+
type = string
120+
default = ""
121+
description = "Type the URL that you want to navigate to when you click the Artifactory integration tile."
122+
}
123+
variable "artifactory_repo_url" {
124+
type = string
125+
default = ""
126+
description = "Type the URL for your Artifactory release repository."
127+
}
128+
129+
variable "artifactory_repo_name" {
130+
type = string
131+
default = ""
132+
description = "Type the name of your Artifactory repository where your docker images are located."
133+
}
134+
135+
variable "artifactory_integration_name" {
136+
type = string
137+
default = "artifactory-dockerconfigjson"
138+
description = "The name of the Artifactory tool integration"
139+
}
140+
100141
variable "authorization_policy_creation" {
101142
type = string
102143
description = "Disable Toolchain Service to Secrets Manager/Key Protect/Notifications Service authorization policy creation. To disable set the value to `disabled`. This applies to the CI, CD, and CC toolchains. To set independently, see `ci_authorization_policy_creation`, `cd_authorization_policy_creation`, and `cc_authorization_policy_creation`."
@@ -358,6 +399,12 @@ variable "create_triggers" {
358399
default = "true"
359400
}
360401

402+
variable "enable_artifactory" {
403+
type = bool
404+
default = false
405+
description = "Set to `true` to enable Artifactory for devsecops."
406+
}
407+
361408
variable "enable_cos" {
362409
type = bool
363410
description = "Set to `true` to enable the new COS integration."

0 commit comments

Comments
 (0)