-
Notifications
You must be signed in to change notification settings - Fork 127
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
Add support for lb certificate #310
Comments
Is anyone working on this? |
Hi @alekc, What do you think about this schema? // scaleway/resource_lb_certificate_beta.go
var s = &schema.Resource{
Schema: map[string]*schema.Schema{
"lb_id": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validationUUIDorUUIDWithLocality(),
Description: "The load-balancer ID",
},
"name": { // Default: newRandomName("lb-cf")
Type: schema.TypeString,
Description: "The name of the load-balancer certificate",
},
"letsencrypt": {
ConflictsWith: []string{"custom_certificate"},
MaxItems: 1,
Description: "The Let's Encrypt type certificate type configuration",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"common_name": {
Type: schema.TypeString,
Required: true,
Description: "The main domain name of the certificate",
},
"subject_alternative_name": {
Type: schema.TypeString,
Required: true,
Description: "The alternative domain names of the certificate",
},
},
},
},
"custom_certificate": {
ConflictsWith: []string{"letsencrypt"},
MaxItems: 1,
Description: "The custom type certificate type configuration",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"certificate_chain": {
Type: schema.TypeString,
Required: true,
Description: "The full PEM-formatted certificate chain",
},
},
},
},
// Readonly attributes
"common_name": {
Type: schema.TypeString,
Computed: true,
Description: "The main domain name of the certificate",
},
"subject_alternative_name": {
Type: schema.TypeString,
Computed: true,
Description: "The alternative domain names of the certificate",
},
"fingerprint": {
Type: schema.TypeString,
Computed: true,
Description: "The identifier (SHA-1) of the certificate",
},
"not_valid_before": {
Type: schema.TypeString,
Computed: true,
Description: "The not valid before validity bound timestamp",
},
"not_valid_after": {
Type: schema.TypeString,
Computed: true,
Description: "The not valid after validity bound timestamp",
},
"status": {
Type: schema.TypeString,
Computed: true,
Description: "The status of certificate",
},
},
} |
Yeah I can work on it in about 3 days from now. Looks good but couple of things:
For the rest LGTM |
Hi @alekc and sorry for the response delay, The responses for your points:
Thanks! :) |
@alekc regarding your staging LetsEncrypt idea, we actually don't need it as we have an agreement with them to remove API limits. |
We should add support for load-balancer certificate
The text was updated successfully, but these errors were encountered: