diff --git a/.changelog/16474.txt b/.changelog/16474.txt new file mode 100644 index 00000000000..cd9aacb39b4 --- /dev/null +++ b/.changelog/16474.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/aws_lb_listner_certificate: Add import support +``` diff --git a/aws/resource_aws_lb_listener_certificate_test.go b/aws/resource_aws_lb_listener_certificate_test.go index df32ec3bde6..ff6a71320e6 100644 --- a/aws/resource_aws_lb_listener_certificate_test.go +++ b/aws/resource_aws_lb_listener_certificate_test.go @@ -33,6 +33,11 @@ func TestAccAwsLbListenerCertificate_basic(t *testing.T) { resource.TestCheckResourceAttrPair(resourceName, "listener_arn", lbListenerResourceName, "arn"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } @@ -46,6 +51,7 @@ func TestAccAwsLbListenerCertificate_multiple(t *testing.T) { } rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_lb_listener_certificate.default" resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -66,6 +72,11 @@ func TestAccAwsLbListenerCertificate_multiple(t *testing.T) { resource.TestCheckResourceAttrSet("aws_lb_listener_certificate.additional_2", "certificate_arn"), ), }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, { Config: testAccLbListenerCertificateConfigMultipleAddNew(rName, keys, certificates), Check: resource.ComposeTestCheckFunc(