alicloud_slb_ca_certificate

更新时间:

A Load Balancer CA Certificate is used by the listener of the protocol https.

For information about slb and how to use it, see What is Server Load Balancer.

For information about CA Certificate and how to use it, see Configure CA Certificate.

Example Usage

  • using CA certificate content

resource "alicloud_slb_ca_certificate" "foo" {
  ca_certificate_name = "tf-testAccSlbCACertificate"
  ca_certificate      = "-----BEGIN CERTIFICATE-----\nMIIDRjCCAq+gAwIBAgIJAJn3ox4K13PoMA0GCSqGSIb3DQEBBQUAMHYxCzAJBgNV\nBAYTAkNOMQswCQYDVQQIEwJCSjELMAkGA1UEBxMCQkoxDDAKBgNVBAoTA0FMSTEP\nMA0GA1UECxMGQUxJWVVOMQ0wCwYDVQQDEwR0ZXN0MR8wHQYJKoZIhvcNAQkBFhB0\nZXN0QGhvdG1haWwuY29tMB4XDTE0MTEyNDA2MDQyNVoXDTI0MTEyMTA2MDQyNVow\ndjELMAkGA1UEBhMCQ04xCzAJBgNVBAgTAkJKMQswCQYDVQQHEwJCSjEMMAoGA1UE\nChMDQUxJMQ8wDQYDVQQLEwZBTElZVU4xDTALBgNVBAMTBHRlc3QxHzAdBgkqhkiG\n9w0BCQEWEHRlc3RAaG90bWFpbC5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJ\nAoGBAM7SS3e9+Nj0HKAsRuIDNSsS3UK6b+62YQb2uuhKrp1HMrOx61WSDR2qkAnB\ncoG00Uz38EE+9DLYNUVQBK7aSgLP5M1Ak4wr4GqGyCgjejzzh3DshUzLCCy2rook\nKOyRTlPX+Q5l7rE1fcSNzgepcae5i2sE1XXXzLRIDIvQxcspAgMBAAGjgdswgdgw\nHQYDVR0OBBYEFBdy+OuMsvbkV7R14f0OyoLoh2z4MIGoBgNVHSMEgaAwgZ2AFBdy\n+OuMsvbkV7R14f0OyoLoh2z4oXqkeDB2MQswCQYDVQQGEwJDTjELMAkGA1UECBMC\nQkoxCzAJBgNVBAcTAkJKMQwwCgYDVQQKEwNBTEkxDzANBgNVBAsTBkFMSVlVTjEN\nMAsGA1UEAxMEdGVzdDEfMB0GCSqGSIb3DQEJARYQdGVzdEBob3RtYWlsLmNvbYIJ\nAJn3ox4K13PoMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAY7KOsnyT\ncQzfhiiG7ASjiPakw5wXoycHt5GCvLG5htp2TKVzgv9QTliA3gtfv6oV4zRZx7X1\nOfi6hVgErtHaXJheuPVeW6eAW8mHBoEfvDAfU3y9waYrtUevSl07643bzKL6v+Qd\nDUBTxOAvSYfXTtI90EAxEG/bJJyOm5LqoiA=\n-----END CERTIFICATE-----"
}
  • using CA certificate file

resource "alicloud_slb_ca_certificate" "foo-file" {
  ca_certificate_name = "tf-testAccSlbCACertificate"
  ca_certificate      = file("${path.module}/ca_certificate.pem")
}

Argument Reference

The following arguments are supported:

  • ca_certificate_name - (Optional, Available in 1.123.1+) Name of the CA Certificate.
  • ca_certificate - (Required, ForceNew) the content of the CA certificate.
  • resource_group_id - (Optional, ForceNew, Available in 1.58.0+) The Id of resource group which the slb_ca certificate belongs.
  • tags - (Optional, Available in v1.66.0+) A mapping of tags to assign to the resource.
  • name - (Deprecated) Field name has been deprecated from provider version 1.123.1. New field ca_certificate_name instead

Attributes Reference

The following attributes are exported:

  • id - The Id of CA Certificate .

Timeouts

-> NOTE: -Available in 1.123.1+

The timeouts block allows you to specify timeouts for certain actions:

  • delete - (Defaults to 5 mins) Used when delete the SLB CA Certificate.

Import

Server Load balancer CA Certificate can be imported using the id, e.g.

$ terraform import alicloud_slb_ca_certificate.example abc123456