provider/aws: Support Import `aws_cloudfront_origin_access_identity` (#7506)
* provider/aws: Support Import `aws_cloudfront_origin_access_identity` ``` make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSCloudFrontOriginAccessIdentity_' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /vendor/) TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSCloudFrontOriginAccessIdentity_ -timeout 120m === RUN TestAccAWSCloudFrontOriginAccessIdentity_importBasic --- PASS: TestAccAWSCloudFrontOriginAccessIdentity_importBasic (17.07s) === RUN TestAccAWSCloudFrontOriginAccessIdentity_basic --- PASS: TestAccAWSCloudFrontOriginAccessIdentity_basic (15.34s) === RUN TestAccAWSCloudFrontOriginAccessIdentity_noComment --- PASS: TestAccAWSCloudFrontOriginAccessIdentity_noComment (16.29s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 48.717s ``` * Update import_aws_cloudfront_origin_access_identity_test.go
This commit is contained in:
parent
dc313de5b4
commit
38e3d3ba87
|
@ -0,0 +1,28 @@
|
|||
package aws
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/terraform/helper/resource"
|
||||
)
|
||||
|
||||
func TestAccAWSCloudFrontOriginAccessIdentity_importBasic(t *testing.T) {
|
||||
resourceName := "aws_cloudfront_origin_access_identity.origin_access_identity"
|
||||
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
Providers: testAccProviders,
|
||||
CheckDestroy: testAccCheckCloudFrontOriginAccessIdentityDestroy,
|
||||
Steps: []resource.TestStep{
|
||||
resource.TestStep{
|
||||
Config: testAccAWSCloudFrontOriginAccessIdentityConfig,
|
||||
},
|
||||
|
||||
resource.TestStep{
|
||||
ResourceName: resourceName,
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
|
@ -15,6 +15,9 @@ func resourceAwsCloudFrontOriginAccessIdentity() *schema.Resource {
|
|||
Read: resourceAwsCloudFrontOriginAccessIdentityRead,
|
||||
Update: resourceAwsCloudFrontOriginAccessIdentityUpdate,
|
||||
Delete: resourceAwsCloudFrontOriginAccessIdentityDelete,
|
||||
Importer: &schema.ResourceImporter{
|
||||
State: schema.ImportStatePassthrough,
|
||||
},
|
||||
|
||||
Schema: map[string]*schema.Schema{
|
||||
"comment": &schema.Schema{
|
||||
|
|
Loading…
Reference in New Issue