provider/digitalocean: Mark not_after and sha1_fingerprint as computed
This commit is contained in:
parent
ba69749d99
commit
c99dc70ce0
|
@ -44,12 +44,14 @@ func resourceDigitalOceanCertificate() *schema.Resource {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
ForceNew: true,
|
ForceNew: true,
|
||||||
|
Computed: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
"sha1_fingerprint": {
|
"sha1_fingerprint": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
ForceNew: true,
|
ForceNew: true,
|
||||||
|
Computed: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,8 +31,7 @@ func TestAccDigitalOceanCertificate_Basic(t *testing.T) {
|
||||||
CheckDestroy: testAccCheckDigitalOceanCertificateDestroy,
|
CheckDestroy: testAccCheckDigitalOceanCertificateDestroy,
|
||||||
Steps: []resource.TestStep{
|
Steps: []resource.TestStep{
|
||||||
{
|
{
|
||||||
ExpectNonEmptyPlan: true,
|
Config: testAccCheckDigitalOceanCertificateConfig_basic(rInt, privateKeyMaterial, leafCertMaterial, certChainMaterial),
|
||||||
Config: testAccCheckDigitalOceanCertificateConfig_basic(rInt, privateKeyMaterial, leafCertMaterial, certChainMaterial),
|
|
||||||
Check: resource.ComposeTestCheckFunc(
|
Check: resource.ComposeTestCheckFunc(
|
||||||
testAccCheckDigitalOceanCertificateExists("digitalocean_certificate.foobar", &cert),
|
testAccCheckDigitalOceanCertificateExists("digitalocean_certificate.foobar", &cert),
|
||||||
resource.TestCheckResourceAttr(
|
resource.TestCheckResourceAttr(
|
||||||
|
@ -105,11 +104,9 @@ resource "digitalocean_certificate" "foobar" {
|
||||||
private_key = <<EOF
|
private_key = <<EOF
|
||||||
%s
|
%s
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
leaf_certificate = <<EOF
|
leaf_certificate = <<EOF
|
||||||
%s
|
%s
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
certificate_chain = <<EOF
|
certificate_chain = <<EOF
|
||||||
%s
|
%s
|
||||||
EOF
|
EOF
|
||||||
|
|
Loading…
Reference in New Issue