Skip to content

Commit

Permalink
fix(certificate-scep-server): Rename the resource from "routeros_cert…
Browse files Browse the repository at this point in the history
…ificate_scep_server" to "routeros_system_certificate_scep_server"

Fixes: #473
  • Loading branch information
vaerh committed May 29, 2024
1 parent e5c720a commit 92d966f
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# The ID can be found via API or the terminal
# The command for the terminal is -> /certificate/scep-server/print show-ids
terraform import routeros_certificate_scep_server.example_scep_server "*1"
terraform import routeros_system_certificate_scep_server.example_scep_server "*1"
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ resource "routeros_system_certificate" "example_root_ca" {
}
}

resource "routeros_certificate_scep_server" "example_scep_server" {
# You can also use the alias "routeros_certificate_scep_server"
resource "routeros_system_certificate_scep_server" "example_scep_server" {
ca_cert = routeros_system_certificate.example_root_ca.name
path = "/scep/example_scep_server"
days_valid = 30
Expand Down
31 changes: 16 additions & 15 deletions routeros/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,21 +171,22 @@ func Provider() *schema.Provider {
"routeros_wireguard_peer": ResourceInterfaceWireguardPeer(),

// System Objects
"routeros_ip_cloud": ResourceIpCloud(),
"routeros_ip_cloud_advanced": ResourceIpCloudAdvanced(),
"routeros_system_certificate": ResourceSystemCertificate(),
"routeros_certificate_scep_server": ResourceCertificateScepServer(),
"routeros_system_clock": ResourceSystemClock(),
"routeros_system_identity": ResourceSystemIdentity(),
"routeros_system_logging": ResourceSystemLogging(),
"routeros_system_ntp_client": ResourceSystemNtpClient(),
"routeros_system_ntp_server": ResourceSystemNtpServer(),
"routeros_system_scheduler": ResourceSystemScheduler(),
"routeros_system_script": ResourceSystemScript(),
"routeros_system_user": ResourceUser(),
"routeros_system_user_aaa": ResourceUserAaa(),
"routeros_system_user_group": ResourceUserGroup(),
"routeros_system_user_settings": ResourceSystemUserSettings(),
"routeros_ip_cloud": ResourceIpCloud(),
"routeros_ip_cloud_advanced": ResourceIpCloudAdvanced(),
"routeros_system_certificate": ResourceSystemCertificate(),
"routeros_system_certificate_scep_server": ResourceCertificateScepServer(),
"routeros_certificate_scep_server": ResourceCertificateScepServer(),
"routeros_system_clock": ResourceSystemClock(),
"routeros_system_identity": ResourceSystemIdentity(),
"routeros_system_logging": ResourceSystemLogging(),
"routeros_system_ntp_client": ResourceSystemNtpClient(),
"routeros_system_ntp_server": ResourceSystemNtpServer(),
"routeros_system_scheduler": ResourceSystemScheduler(),
"routeros_system_script": ResourceSystemScript(),
"routeros_system_user": ResourceUser(),
"routeros_system_user_aaa": ResourceUserAaa(),
"routeros_system_user_group": ResourceUserGroup(),
"routeros_system_user_settings": ResourceSystemUserSettings(),

// Aliases for system objects to retain compatibility between original and fork
"routeros_identity": ResourceSystemIdentity(),
Expand Down
5 changes: 5 additions & 0 deletions templates/resources/certificate_scep_server.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# {{.Name}} ({{.Type}})
---

#### This is an alias for backwards compatibility between plugin versions.
Please see documentation for [routeros_system_certificate_scep_server](system_certificate_scep_server.md)

0 comments on commit 92d966f

Please sign in to comment.