Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Make 'name' attribute required for auto-certificates #740

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
## 6.6.10 -- upcoming release
## 6.7.0
### Fixes
- Fix [#735](https://github.com/ionos-cloud/terraform-provider-ionoscloud/issues/735) by reading all values for `api_subnet_allow_list`, not only non-nill values.
### Features
- Add new read-only attribute: `ipv4_cidr_block` to `ionoscloud_lan` resource and data source.
- Make `volume` optional for `ionoscloud_server` resource
- `name` attribute for `ionoscloud_auto_certificate` resource is now required.

## 6.6.9
### Features
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/certificate_manager_auto_certificate.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ resource "ionoscloud_auto_certificate" "example" {
* `location` - (Required)[string] The location of the auto-certificate.
* `common_name` - (Required)[string] The common name (DNS) of the certificate to issue. The common name needs to be part of a zone in IONOS Cloud DNS.
* `key_algorithm` - (Required)[string] The key algorithm used to generate the certificate.
* `name` - (Optional)[string] A certificate name used for management purposes.
* `name` - (Required)[string] A certificate name used for management purposes.
* `subject_alternative_names` - (Optional)[list][string] Optional additional names to be added to the issued certificate. The additional names needs to be part of a zone in IONOS Cloud DNS.
* `last_issued_certificate_id` - (Computed)[string] The ID of the last certificate that was issued.

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require (
github.com/ionos-cloud/sdk-go-bundle/products/monitoring/v2 v2.0.0
github.com/ionos-cloud/sdk-go-bundle/products/vpn/v2 v2.0.2
github.com/ionos-cloud/sdk-go-bundle/shared v0.1.1
github.com/ionos-cloud/sdk-go-cert-manager v1.1.0
github.com/ionos-cloud/sdk-go-cert-manager v1.3.0
github.com/ionos-cloud/sdk-go-container-registry v1.2.0
github.com/ionos-cloud/sdk-go-dataplatform v1.1.1
github.com/ionos-cloud/sdk-go-dbaas-in-memory-db v1.0.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ github.com/ionos-cloud/sdk-go-bundle/products/vpn/v2 v2.0.2 h1:qR/ul88v/3ZF+ZLFF
github.com/ionos-cloud/sdk-go-bundle/products/vpn/v2 v2.0.2/go.mod h1:V6WHbWsQDlZsLtHqgsXO81Z9eJBsczE3Q6VY8J+rutc=
github.com/ionos-cloud/sdk-go-bundle/shared v0.1.1 h1:NWobgIhmUJKG6ohFXefMj+KmpEEvLYEDUgGzpns6HQE=
github.com/ionos-cloud/sdk-go-bundle/shared v0.1.1/go.mod h1:cLIl4zmB1yMdPSNgTzaRmXeuusEAY1O3Lp/iXSc/R6E=
github.com/ionos-cloud/sdk-go-cert-manager v1.1.0 h1:6lM1RoBc6Epw3g7B6CKWoKGsUDP+IPoA4m8+gtYrbOY=
github.com/ionos-cloud/sdk-go-cert-manager v1.1.0/go.mod h1:gf7rfOdClT/kKK58RDmy/tAQ8z6hqRRzs8zmTL/tWLM=
github.com/ionos-cloud/sdk-go-cert-manager v1.3.0 h1:VMbD/XgLmMV2d7uI1+xf/uzRZWKJd8Ayan9IZ6gH1pM=
github.com/ionos-cloud/sdk-go-cert-manager v1.3.0/go.mod h1:8CPWJBuryfrUpiPNrVIPry6qQjZWfIhmRpFkqKiaO2w=
github.com/ionos-cloud/sdk-go-container-registry v1.2.0 h1:C5r2XleKLbSFw9kmb4N8ImqJ/HtLus3yh/R5BHy/6sg=
github.com/ionos-cloud/sdk-go-container-registry v1.2.0/go.mod h1:woBP1+A4N0KXiRj9jG4y/hEXgrVjJv0CUlAvc24mCeo=
github.com/ionos-cloud/sdk-go-dataplatform v1.1.1 h1:Wu9TAiphRyMEweUcQlMblhVCl9qVxQlOYEOw+jJS+Ss=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func resourceCertificateManagerAutoCertificate() *schema.Resource {
},
"name": {
Type: schema.TypeString,
Optional: true,
Required: true,
Description: "A certificate name used for management purposes",
},
"subject_alternative_names": {
Expand Down
6 changes: 2 additions & 4 deletions services/cert/auto_certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,10 @@ func GetAutoCertificateDataCreate(d *schema.ResourceData) *certmanager.AutoCerti
autoCertificate.Properties.Provider = &providerID
commonName := d.Get("common_name").(string)
autoCertificate.Properties.CommonName = &commonName
name := d.Get("name").(string)
autoCertificate.Properties.Name = &name
keyAlgorithm := d.Get("key_algorithm").(string)
autoCertificate.Properties.KeyAlgorithm = &keyAlgorithm
if name, nameOk := d.GetOk("name"); nameOk {
name := name.(string)
autoCertificate.Properties.Name = &name
}
if subjectAlternativeNames, subjectAlternativeNamesOk := d.GetOk("subject_alternative_names"); subjectAlternativeNamesOk {
subjectAlternativeNames := subjectAlternativeNames.([]interface{})
var subjectAlternativeNamesList []string
Expand Down
201 changes: 92 additions & 109 deletions vendor/github.com/ionos-cloud/sdk-go-cert-manager/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ github.com/ionos-cloud/sdk-go-bundle/products/vpn/v2
# github.com/ionos-cloud/sdk-go-bundle/shared v0.1.1
## explicit; go 1.20
github.com/ionos-cloud/sdk-go-bundle/shared
# github.com/ionos-cloud/sdk-go-cert-manager v1.1.0
# github.com/ionos-cloud/sdk-go-cert-manager v1.3.0
## explicit; go 1.18
github.com/ionos-cloud/sdk-go-cert-manager
# github.com/ionos-cloud/sdk-go-container-registry v1.2.0
Expand Down
Loading