Skip to content
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

provider/aws: Add AWS DMS (data migration service) resources #11122

Merged
merged 21 commits into from
Feb 2, 2017
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
01096bf
Add aws dms vendoring
jzbruno Jan 20, 2017
ad2cfb1
Add aws dms endpoint resource
jzbruno Jan 20, 2017
ff9beca
Add aws dms replication instance resource
jzbruno Jan 20, 2017
0853b9e
Add aws dms replication subnet group resource
jzbruno Jan 20, 2017
972caea
Add aws dms replication task resource
jzbruno Jan 20, 2017
2b95c0b
Fix aws dms resource go vet errors
jzbruno Jan 20, 2017
1dc36a0
Merge remote-tracking branch 'upstream/master' into aws-dms-resources
jzbruno Jan 23, 2017
02008a1
Review fixes: Add id validators for all resources. Add validator for …
jzbruno Jan 24, 2017
547f94d
Add aws dms resources to importability list
jzbruno Jan 24, 2017
e46367b
Review fixes: Add aws dms iam role dependencies to test cases
jzbruno Jan 24, 2017
485a40c
Review fixes: Adjustments for handling input values
jzbruno Jan 25, 2017
5ffe3e3
Add aws dms replication subnet group tagging
jzbruno Jan 25, 2017
28dbe12
Fix aws dms subnet group doesn't use standard error for resource not …
jzbruno Jan 25, 2017
12c20e7
Merge remote-tracking branch 'upstream/master' into aws-dms-resources
jzbruno Jan 25, 2017
34fe399
Missed update of aws dms vendored version
jzbruno Jan 25, 2017
5e1b72c
Merge remote-tracking branch 'upstream/master' into aws-dms-resources
jzbruno Jan 30, 2017
de0262f
Add aws dms certificate resource
jzbruno Jan 31, 2017
632c500
Update aws dms resources to force new for immutable attributes
jzbruno Jan 31, 2017
8a8b0bc
Merge remote-tracking branch 'upstream/master' into aws-dms-resources
jzbruno Feb 1, 2017
9af5dee
Fix tests failing on subnet deletion by adding explicit dependencies.…
jzbruno Feb 2, 2017
6b4c593
Merge branch 'master' into aws-dms-resources
stack72 Feb 2, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions builtin/providers/aws/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"github.com/aws/aws-sdk-go/service/cloudwatchlogs"
"github.com/aws/aws-sdk-go/service/codecommit"
"github.com/aws/aws-sdk-go/service/codedeploy"
"github.com/aws/aws-sdk-go/service/databasemigrationservice"
"github.com/aws/aws-sdk-go/service/directoryservice"
"github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/aws/aws-sdk-go/service/ec2"
Expand Down Expand Up @@ -105,6 +106,7 @@ type AWSClient struct {
cloudwatchconn *cloudwatch.CloudWatch
cloudwatchlogsconn *cloudwatchlogs.CloudWatchLogs
cloudwatcheventsconn *cloudwatchevents.CloudWatchEvents
dmsconn *databasemigrationservice.DatabaseMigrationService
dsconn *directoryservice.DirectoryService
dynamodbconn *dynamodb.DynamoDB
ec2conn *ec2.EC2
Expand Down Expand Up @@ -275,6 +277,7 @@ func (c *Config) Client() (interface{}, error) {
client.cloudwatchlogsconn = cloudwatchlogs.New(sess)
client.codecommitconn = codecommit.New(sess)
client.codedeployconn = codedeploy.New(sess)
client.dmsconn = databasemigrationservice.New(sess)
client.dsconn = directoryservice.New(sess)
client.dynamodbconn = dynamodb.New(dynamoSess)
client.ec2conn = ec2.New(awsEc2Sess)
Expand Down
29 changes: 29 additions & 0 deletions builtin/providers/aws/import_aws_dms_endpoint_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package aws

import (
"testing"

"github.com/hashicorp/terraform/helper/acctest"
"github.com/hashicorp/terraform/helper/resource"
)

func TestAccAwsDmsEndpointImport(t *testing.T) {
resourceName := "aws_dms_endpoint.dms_endpoint"

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: dmsEndpointDestroy,
Steps: []resource.TestStep{
{
Config: dmsEndpointConfig(acctest.RandString(8)),
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"password"},
},
},
})
}
28 changes: 28 additions & 0 deletions builtin/providers/aws/import_aws_dms_replication_instance_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package aws

import (
"github.com/hashicorp/terraform/helper/acctest"
"github.com/hashicorp/terraform/helper/resource"
"testing"
)

func TestAccAwsDmsReplicationInstanceImport(t *testing.T) {
resourceName := "aws_dms_replication_instance.dms_replication_instance"
randId := acctest.RandString(8)

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: dmsReplicationInstanceDestroy,
Steps: []resource.TestStep{
{
Config: dmsReplicationInstanceConfig(randId),
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package aws

import (
"github.com/hashicorp/terraform/helper/acctest"
"github.com/hashicorp/terraform/helper/resource"
"testing"
)

func TestAccAwsDmsReplicationSubnetGroupImport(t *testing.T) {
resourceName := "aws_dms_replication_subnet_group.dms_replication_subnet_group"
randId := acctest.RandString(8)

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: dmsReplicationSubnetGroupDestroy,
Steps: []resource.TestStep{
{
Config: dmsReplicationSubnetGroupConfig(randId),
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}
28 changes: 28 additions & 0 deletions builtin/providers/aws/import_aws_dms_replication_task_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package aws

import (
"github.com/hashicorp/terraform/helper/acctest"
"github.com/hashicorp/terraform/helper/resource"
"testing"
)

func TestAccAwsDmsReplicationTaskImport(t *testing.T) {
resourceName := "aws_dms_replication_task.dms_replication_task"
randId := acctest.RandString(8)

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: dmsReplicationTaskDestroy,
Steps: []resource.TestStep{
{
Config: dmsReplicationTaskConfig(randId),
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}
4 changes: 4 additions & 0 deletions builtin/providers/aws/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ func Provider() terraform.ResourceProvider {
"aws_db_security_group": resourceAwsDbSecurityGroup(),
"aws_db_subnet_group": resourceAwsDbSubnetGroup(),
"aws_directory_service_directory": resourceAwsDirectoryServiceDirectory(),
"aws_dms_endpoint": resourceAwsDmsEndpoint(),
"aws_dms_replication_instance": resourceAwsDmsReplicationInstance(),
"aws_dms_replication_subnet_group": resourceAwsDmsReplicationSubnetGroup(),
"aws_dms_replication_task": resourceAwsDmsReplicationTask(),
"aws_dynamodb_table": resourceAwsDynamoDbTable(),
"aws_ebs_snapshot": resourceAwsEbsSnapshot(),
"aws_ebs_volume": resourceAwsEbsVolume(),
Expand Down
Loading