https://github.com/terraform-yacloud-modules/terraform-yandex-certificate-manager
Terraform module to manage Certificate Manager resources within the Yandex.Cloud
https://github.com/terraform-yacloud-modules/terraform-yandex-certificate-manager
hacktoberfest yandex yandex-cloud
Last synced: 7 months ago
JSON representation
Terraform module to manage Certificate Manager resources within the Yandex.Cloud
- Host: GitHub
- URL: https://github.com/terraform-yacloud-modules/terraform-yandex-certificate-manager
- Owner: terraform-yacloud-modules
- License: apache-2.0
- Created: 2024-06-28T06:04:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-20T10:13:22.000Z (9 months ago)
- Last Synced: 2025-01-20T11:24:36.351Z (9 months ago)
- Topics: hacktoberfest, yandex, yandex-cloud
- Language: HCL
- Homepage:
- Size: 77.1 KB
- Stars: 6
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Yandex Cloud Certificate Manager Terraform module
Terraform module which creates Yandex Cloud [Certificate Manager](https://yandex.cloud/en/docs/certificate-manager/) resources.
## Usage
See [examples](https://github.com/terraform-yacloud-modules/terraform-yandex-certificate-manager/tree/main/examples) directory for working examples.
### Self-managed certificate
Import into Certificate Manager a self-managed certificate.
```hcl
module "certificate_manager" {
source = "terraform-yacloud-modules/certificate-manager/yandex"self_managed = {
implicit = {
description = "self-managed domain certificate"
certificate = "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE----- \n -----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----"
private_key = "-----BEGIN RSA PRIVATE KEY----- ... -----END RSA PRIVATE KEY-----"
}
file = {
description = "self-managed domain certificate from file"
certificate = file("cert.pem")
private_key = file("key.pem")
}
lockbox = {
description = "self-managed domain certificate from lockbox"
certificate = "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE----- \n -----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----"
private_key_lockbox_secret = {
id = "lockbox_id"
key = "lockbox_key"
}
}
}
}
```## Examples
Examples codified under
the [`examples`](https://github.com/terraform-yacloud-modules/terraform-yandex-module-template/tree/main/examples) are intended
to give users references for how to use the module(s) as well as testing/validating changes to the source code of the
module. If contributing to the project, please be sure to make any appropriate updates to the relevant examples to allow
maintainers to test your changes and to keep the examples up to date for users. Thank you!- [Self-managed certificate](https://github.com/terraform-yacloud-modules/terraform-yandex-certificate-manager/tree/main/examples/self-managed)
- [Managed certificate](https://github.com/terraform-yacloud-modules/terraform-yandex-certificate-manager/tree/main/examples/managed)## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.3 |
| [yandex](#requirement\_yandex) | >= 0.72.0 |## Providers
| Name | Version |
|------|---------|
| [yandex](#provider\_yandex) | >= 0.72.0 |## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [yandex_cm_certificate.managed](https://registry.terraform.io/providers/yandex-cloud/yandex/latest/docs/resources/cm_certificate) | resource |
| [yandex_cm_certificate.self_managed](https://registry.terraform.io/providers/yandex-cloud/yandex/latest/docs/resources/cm_certificate) | resource |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [managed](#input\_managed) | Managed certificate specification. |map(object({| `{}` | no |
domains = optional(list(string), []) # List of domains for this certificate
description = optional(string, "") # Certificate description.
labels = optional(map(string), {}) # Labels to assign to this certificate.
challenge_type = optional(string, "DNS_CNAME") # Domain owner-check method. Possible values: DNS_CNAME, DNS_TXT, HTTP
challenge_count = optional(number, 1) # Expected number of challenge count needed to validate certificate.
folder_id = optional(string, null) # Folder ID where certificate will be created. If value is omitted, the default provider folder is used.
}))
| [self\_managed](#input\_self\_managed) | Self-managed certificate specification. |map(object({| `{}` | no |
description = optional(string, "") # Certificate description.
labels = optional(map(string), {}) # Labels to assign to this certificate.
certificate = optional(string, null) # Certificate with chain.
private_key = optional(string, null) # Private key of certificate.
private_key_lockbox_secret = optional(object({ id = string, key = string }), null) # Lockbox secret specification for getting private key.
folder_id = optional(string, null) # Folder ID where certificate will be created. If value is omitted, the default provider folder is used.
}))## Outputs
| Name | Description |
|------|-------------|
| [managed\_certificates](#output\_managed\_certificates) | Managed certificates grouped by domain. |
| [self\_managed\_certificates](#output\_self\_managed\_certificates) | Self-managed certificates grouped by domain. |## License
Apache-2.0 Licensed.
See [LICENSE](https://github.com/terraform-yacloud-modules/terraform-yandex-module-template/blob/main/LICENSE).