Skip to content

Commit

Permalink
chore(release): 1.76.6
Browse files Browse the repository at this point in the history
  • Loading branch information
semantic-release-bot committed Feb 19, 2025
1 parent f978a8d commit 3c3c59c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 27 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [1.76.6](https://github.com/terraform-routeros/terraform-provider-routeros/compare/v1.76.5...v1.76.6) (2025-02-19)

### Bug Fixes

* Importing certificate and key without `routeros_file` resource ([8d3374e](https://github.com/terraform-routeros/terraform-provider-routeros/commit/8d3374e74fb2e25983fa58d4ef80dedda823396b)), closes [#660](https://github.com/terraform-routeros/terraform-provider-routeros/issues/660)

## [1.76.5](https://github.com/terraform-routeros/terraform-provider-routeros/compare/v1.76.4...v1.76.5) (2025-02-17)

### Bug Fixes
Expand Down
37 changes: 11 additions & 26 deletions docs/resources/system_certificate.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,12 @@ data "routeros_x509" "cert" {
-----END CERTIFICATE-----
EOT
}
resource "routeros_file" "key" {
name = "external.key"
# The lines of the certificate must not contain indentation.
contents = <<EOT
resource "routeros_system_certificate" "external" {
name = "external.crt"
common_name = data.routeros_x509.cert.common_name
import {
cert_file_content = data.routeros_x509.cert.pem
key_file_content = <<EOT
-----BEGIN ENCRYPTED PRIVATE KEY-----
MIHeMEkGCSqGSIb3DQEFDTA8MBsGCSqGSIb3DQEFDDAOBAiy/wEW6/MglgICCAAw
HQYJYIZIAWUDBAEqBBD6v8dLA2FjPn62Xz57pcu9BIGQhclivPw1eC2b14ea58Tw
Expand All @@ -96,23 +97,8 @@ nzDdbYN6/yUiMqapW2xZaT7ZFnbEai4n9/utgtEDnfKHlZvZj2kRhvYoWrvTkt/W
Sk+abxJ+NMQoh+S5d73niu1CO8uqQjOd8BoSOurURsOh
-----END ENCRYPTED PRIVATE KEY-----
EOT
}
resource "routeros_file" "cert" {
name = "external.crt"
# Normalized certificate
contents = data.routeros_x509.cert.pem
}
resource "routeros_system_certificate" "external" {
name = "external.crt"
common_name = data.routeros_x509.cert.common_name
import {
cert_file_name = routeros_file.cert.name
key_file_name = routeros_file.key.name
passphrase = "11111111"
passphrase = "11111111"
}
depends_on = [routeros_file.key, routeros_file.cert]
}
```

Expand All @@ -129,7 +115,7 @@ resource "routeros_system_certificate" "external" {
- `copy_from` (String)
- `country` (String) Country Name (2 letter code).
- `days_valid` (Number) Certificate lifetime.
- `import` (Block Set) (see [below for nested schema](#nestedblock--import))
- `import` (Block Set, Max: 1) (see [below for nested schema](#nestedblock--import))
- `key_size` (String)
- `key_usage` (Set of String) Detailed key usage descriptions can be found in RFC 5280.
- `locality` (String) Locality Name (eg, city).
Expand Down Expand Up @@ -173,12 +159,11 @@ resource "routeros_system_certificate" "external" {
<a id="nestedblock--import"></a>
### Nested Schema for `import`

Required:

- `cert_file_name` (String) Certificate file name that will be imported.

Optional:

- `cert_file_content` (String) Certificate in PEM format.
- `cert_file_name` (String) Certificate file name that will be imported.
- `key_file_content` (String) Key in PEM format.
- `key_file_name` (String) Key file name that will be imported.
- `passphrase` (String, Sensitive) File passphrase if there is such.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "terraform-provider-routeros",
"version": "1.76.5",
"version": "1.76.6",
"repository": {
"type": "git",
"url": "https://github.com/terraform-routeros/terraform-provider-routeros"
Expand Down

0 comments on commit 3c3c59c

Please sign in to comment.