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
<!-- Add a description of module(s) in this repo -->
10
-
TODO: Replace me with description of the module(s) in this repo
10
+
This module configures a public certificates engine for a Secrets Manager instance. For more information about enabling Secrets Manager for public certificates, see [Preparing to order public certificates](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-prepare-order-certificates).
11
11
12
+
The module handles the following resources:
13
+
14
+
-[Authorization between Secrets Manager and Cloud Internet Services (CIS)](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-prepare-order-certificates&interface=ui#authorize-cis)
The two configurations make up the `public_cert` secrets type. This module also signs the intermediate certificate authority (CA) when the engine is created.
19
+
## Before you begin
20
+
21
+
Make sure that you have the following prerequisites:
22
+
23
+
- An IBM Cloud Internet Services (CIS) instance
24
+
- A private key `.pem` file generated by the [ACME account creation tool](https://github.com/ibm-cloud-security/acme-account-creation-tool)
25
+
26
+
:information_source:**Tip:** The [Secrets Manager module](https://github.com/terraform-ibm-modules/terraform-ibm-secrets-manager) provides automation to create a Secret Manager instance.
12
27
13
28
<!-- Below content is automatically populated via pre-commit hook -->
secrets_manager_secret_id = "<the secret ID of the private key>" # pragma: allowlist secret
104
+
}
105
+
```
40
106
41
-
Use real values instead of "var.<var_name>" or other placeholder values
42
-
unless real values don't help users know what to change.
43
-
-->
107
+
Because the ACME Let's Encrypt private key is a multi-line string, you may encounter errors passing it into terraform. You can store it as an arbitrary secret in Secrets Manager which terraform will pull or you can use one of the following methods to provide it through the CLI:
|[ibm_iam_account_settings.iam_account_settings](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/data-sources/iam_account_settings)| data source |
176
+
|[ibm_sm_arbitrary_secret.ibm_secrets_manager_secret](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/data-sources/sm_arbitrary_secret)| data source |
94
177
95
178
### Inputs
96
179
97
-
No inputs.
180
+
| Name | Description | Type | Default | Required |
| <aname="input_acme_letsencrypt_private_key"></a> [acme\_letsencrypt\_private\_key](#input\_acme\_letsencrypt\_private\_key)| The private key generated by the ACME account creation tool. Required if private\_key\_secrets\_manager\_instance\_guid and private\_key\_secrets\_manager\_secret\_id are not set. |`string`|`null`| no |
183
+
| <aname="input_ca_config_name"></a> [ca\_config\_name](#input\_ca\_config\_name)| Name of the CA config for the public\_cert secrets engine |`string`|`null`| no |
184
+
| <aname="input_cis_account_id"></a> [cis\_account\_id](#input\_cis\_account\_id)| Account ID of the CIS instance (only needed if different from Secrets Manager account) |`string`|`null`| no |
185
+
| <aname="input_dns_config_name"></a> [dns\_config\_name](#input\_dns\_config\_name)| Name of the DNS config for the public\_cert secrets engine |`string`|`null`| no |
186
+
| <aname="input_ibmcloud_cis_api_key"></a> [ibmcloud\_cis\_api\_key](#input\_ibmcloud\_cis\_api\_key)| Optional, when not using IAM authorization, use an API key for CIS DNS configuration |`string`|`null`| no |
187
+
| <aname="input_internet_service_domain_id"></a> [internet\_service\_domain\_id](#input\_internet\_service\_domain\_id)| (optional) Specific domain in the CIS to authorize Secrets Manager access to. |`string`|`null`| no |
188
+
| <aname="input_internet_services_crn"></a> [internet\_services\_crn](#input\_internet\_services\_crn)| CRN of the CIS instance to authorize Secrets Manager against |`string`|`null`| no |
| <aname="input_private_key_secrets_manager_instance_guid"></a> [private\_key\_secrets\_manager\_instance\_guid](#input\_private\_key\_secrets\_manager\_instance\_guid)| The Secrets Manager instance GUID of the Secrets Manager containing your ACME private key. Required if acme\_letsencrypt\_private\_key is not set. |`string`|`null`| no |
191
+
| <aname="input_private_key_secrets_manager_region"></a> [private\_key\_secrets\_manager\_region](#input\_private\_key\_secrets\_manager\_region)| The region of the Secrets Manager instance containing your ACME private key. (Only needed if different from the region variable) |`string`|`null`| no |
192
+
| <aname="input_private_key_secrets_manager_secret_id"></a> [private\_key\_secrets\_manager\_secret\_id](#input\_private\_key\_secrets\_manager\_secret\_id)| The secret ID of your ACME private key. Required if acme\_letsencrypt\_private\_key is not set. If both are set, this value will be used as the private key. |`string`|`null`| no |
193
+
| <aname="input_region"></a> [region](#input\_region)| Region where resources will be created or fetched from |`string`|`"us-south"`| no |
194
+
| <aname="input_secrets_manager_guid"></a> [secrets\_manager\_guid](#input\_secrets\_manager\_guid)| GUID of secrets manager instance to create the secret engine in |`string`| n/a | yes |
195
+
| <aname="input_service_endpoints"></a> [service\_endpoints](#input\_service\_endpoints)| The service endpoint type to communicate with the provided secrets manager instance. Possible values are `public` or `private`|`string`|`"public"`| no |
196
+
| <aname="input_skip_iam_authorization_policy"></a> [skip\_iam\_authorization\_policy](#input\_skip\_iam\_authorization\_policy)| Set to true to skip the creation of an IAM authorization policy that permits Secrets Manager to create a DNS config in the CIS specified in `internet_services_crn`. WARNING: An authorization policy must exist before a DNS config can be created, OR an API key must be provided in `ibmcloud_cis_api_key`|`bool`|`false`| no |
# More info about this file at https://github.com/terraform-ibm-modules/common-pipeline-assets/blob/main/.github/workflows/terraform-test-pipeline.md#cra-config-yaml
2
2
version: "v1"
3
3
CRA_TARGETS:
4
-
- CRA_TARGET: "examples/complete"# Target directory for CRA scan. If not provided, the CRA Scan will not be run.
4
+
- CRA_TARGET: "examples/iam_auth"# Target directory for CRA scan. If not provided, the CRA Scan will not be run.
5
5
CRA_IGNORE_RULES_FILE: "cra-tf-validate-ignore-rules.json"# CRA Ignore file to use. If not provided, it checks the repo root directory for `cra-tf-validate-ignore-rules.json`
6
-
PROFILE_ID: "0e6e7b5a-817d-4344-ab6f-e5d7a9c49520"# SCC profile ID (currently set to the FSCloud 1.4.0 profile).
7
-
# SCC_INSTANCE_ID: "" # The SCC instance ID to use to download profile for CRA scan. If not provided, a default global value will be used.
8
-
# SCC_REGION: "" # The IBM Cloud region that the SCC instance is in. If not provided, a default global value will be used.
TF_VAR_acme_letsencrypt_private_key: "DUMMY VALUE FOR CRA"
9
9
# CRA_ENVIRONMENT_VARIABLES: # An optional map of environment variables for CRA, where the key is the variable name and value is the value. Useful for providing TF_VARs.
10
10
# TF_VAR_sample: "sample value"
11
11
# TF_VAR_other: "another value"
12
+
# SCC_INSTANCE_ID: "" # The SCC instance ID to use to download profile for CRA scan. If not provided, a default global value will be used.
13
+
# SCC_REGION: "" # The IBM Cloud region that the SCC instance is in. If not provided, a default global value will be used.
14
+
# PROFILE_ID: "" # The Profile ID input for CRA SCC scan. If not provided, a default global value will be used.
0 commit comments