Skip to content

Commit

Permalink
Merge branch 'coveo-master' into master-with-emr-fleet
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Duchesne committed Feb 27, 2019
2 parents e8efb48 + ccc546e commit 40b77d6
Show file tree
Hide file tree
Showing 109 changed files with 7,043 additions and 1,265 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## 1.60.0 (February 22, 2019)

ENHANCEMENTS:

* resource/aws_route53_record: Add validation for alias `name` and `zone_id` arguments ([#7606](https://github.com/terraform-providers/terraform-provider-aws/issues/7606))

BUG FIXES:

* resource/aws_db_instance: Prevent snapshot restore error with `allocated_storage` and io1 `storage_type` ([#5800](https://github.com/terraform-providers/terraform-provider-aws/issues/5800)] / [[#7426](https://github.com/terraform-providers/terraform-provider-aws/issues/7426))
* resource/aws_flow_log: Prevent crash on unsuccessful flow log creation ([#7528](https://github.com/terraform-providers/terraform-provider-aws/issues/7528))
* resource/aws_kinesis_analytics_application: Retry input Kinesis Firehose Delivery Stream `InvalidArgumentException` permission errors for IAM eventual consistency during creation ([#7578](https://github.com/terraform-providers/terraform-provider-aws/issues/7578))
* resource/aws_launch_template: Properly read and write `description` ([#7569](https://github.com/terraform-providers/terraform-provider-aws/issues/7569))
* resource/aws_rds_cluster: Remove requirement for `master_password` and `master_username` when creating via `global_cluster_identifier` ([#7213](https://github.com/terraform-providers/terraform-provider-aws/issues/7213))
* resource/aws_vpc_endpoint: Suppress equivalent `policy` differences ([#7645](https://github.com/terraform-providers/terraform-provider-aws/issues/7645))

## 1.59.0 (February 14, 2019)

FEATURES:
Expand Down
3 changes: 2 additions & 1 deletion aws/aws_sweeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ func sharedClientForRegion(region string) (interface{}, error) {
}

conf := &Config{
Region: region,
MaxRetries: 5,
Region: region,
}

// configures a default client for the region, using the above env vars
Expand Down
3 changes: 3 additions & 0 deletions aws/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ import (
"github.com/aws/aws-sdk-go/service/servicediscovery"
"github.com/aws/aws-sdk-go/service/ses"
"github.com/aws/aws-sdk-go/service/sfn"
"github.com/aws/aws-sdk-go/service/shield"
"github.com/aws/aws-sdk-go/service/simpledb"
"github.com/aws/aws-sdk-go/service/sns"
"github.com/aws/aws-sdk-go/service/sqs"
Expand Down Expand Up @@ -292,6 +293,7 @@ type AWSClient struct {
serverlessapplicationrepositoryconn *serverlessapplicationrepository.ServerlessApplicationRepository
sesConn *ses.SES
sfnconn *sfn.SFN
shieldconn *shield.Shield
simpledbconn *simpledb.SimpleDB
snsconn *sns.SNS
sqsconn *sqs.SQS
Expand Down Expand Up @@ -653,6 +655,7 @@ func (c *Config) Client() (interface{}, error) {
client.serverlessapplicationrepositoryconn = serverlessapplicationrepository.New(sess)
client.sesConn = ses.New(sess)
client.sfnconn = sfn.New(sess)
client.shieldconn = shield.New(sess)
client.simpledbconn = simpledb.New(sess)
client.snsconn = sns.New(awsSnsSess)
client.sqsconn = sqs.New(awsSqsSess)
Expand Down
20 changes: 0 additions & 20 deletions aws/resource_aws_api_gateway_rest_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package aws
import (
"fmt"
"log"
"strings"
"testing"
"time"

Expand All @@ -28,27 +27,8 @@ func testSweepAPIGatewayRestApis(region string) error {
}
conn := client.(*AWSClient).apigateway

// https://github.com/terraform-providers/terraform-provider-aws/issues/3808
prefixes := []string{
"test",
"tf_acc_",
"tf-acc-",
}

err = conn.GetRestApisPages(&apigateway.GetRestApisInput{}, func(page *apigateway.GetRestApisOutput, lastPage bool) bool {
for _, item := range page.Items {
skip := true
for _, prefix := range prefixes {
if strings.HasPrefix(*item.Name, prefix) {
skip = false
break
}
}
if skip {
log.Printf("[INFO] Skipping API Gateway REST API: %s", *item.Name)
continue
}

input := &apigateway.DeleteRestApiInput{
RestApiId: item.Id,
}
Expand Down
12 changes: 0 additions & 12 deletions aws/resource_aws_autoscaling_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,6 @@ func testSweepAutoscalingGroups(region string) error {
}

for _, asg := range resp.AutoScalingGroups {
var testOptGroup bool
for _, testName := range []string{"foobar", "terraform-", "tf-test", "tf-asg-"} {
if strings.HasPrefix(*asg.AutoScalingGroupName, testName) {
testOptGroup = true
break
}
}

if !testOptGroup {
continue
}

deleteopts := autoscaling.DeleteAutoScalingGroupInput{
AutoScalingGroupName: asg.AutoScalingGroupName,
ForceDelete: aws.Bool(true),
Expand Down
16 changes: 0 additions & 16 deletions aws/resource_aws_batch_compute_environment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"log"
"regexp"
"strings"
"testing"
"time"

Expand Down Expand Up @@ -32,10 +31,6 @@ func testSweepBatchComputeEnvironments(region string) error {
}
conn := client.(*AWSClient).batchconn

prefixes := []string{
"tf_acc",
}

out, err := conn.DescribeComputeEnvironments(&batch.DescribeComputeEnvironmentsInput{})
if err != nil {
if testSweepSkipSweepError(err) {
Expand All @@ -46,17 +41,6 @@ func testSweepBatchComputeEnvironments(region string) error {
}
for _, computeEnvironment := range out.ComputeEnvironments {
name := computeEnvironment.ComputeEnvironmentName
skip := true
for _, prefix := range prefixes {
if strings.HasPrefix(*name, prefix) {
skip = false
break
}
}
if skip {
log.Printf("[INFO] Skipping Batch Compute Environment: %s", *name)
continue
}

log.Printf("[INFO] Disabling Batch Compute Environment: %s", *name)
err := disableBatchComputeEnvironment(*name, 20*time.Minute, conn)
Expand Down
5 changes: 0 additions & 5 deletions aws/resource_aws_cloudwatch_event_permission_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"log"
"regexp"
"strings"
"testing"
"time"

Expand Down Expand Up @@ -56,10 +55,6 @@ func testSweepCloudWatchEventPermissions(region string) error {
for _, statement := range policyDoc.Statements {
sid := statement.Sid

if !strings.HasPrefix(sid, "TestAcc") {
continue
}

log.Printf("[INFO] Deleting CloudWatch Event Permission %s", sid)
_, err := conn.RemovePermission(&events.RemovePermissionInput{
StatementId: aws.String(sid),
Expand Down
5 changes: 0 additions & 5 deletions aws/resource_aws_cloudwatch_event_rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"log"
"regexp"
"strings"
"testing"

"github.com/aws/aws-sdk-go/aws"
Expand Down Expand Up @@ -48,10 +47,6 @@ func testSweepCloudWatchEventRules(region string) error {
for _, rule := range output.Rules {
name := aws.StringValue(rule.Name)

if !strings.HasPrefix(name, "tf") {
continue
}

log.Printf("[INFO] Deleting CloudWatch Event Rule %s", name)
_, err := conn.DeleteRule(&events.DeleteRuleInput{
Name: aws.String(name),
Expand Down
5 changes: 0 additions & 5 deletions aws/resource_aws_cognito_user_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"log"
"regexp"
"strings"
"testing"

"github.com/aws/aws-sdk-go/aws"
Expand Down Expand Up @@ -52,10 +51,6 @@ func testSweepCognitoUserPools(region string) error {
for _, userPool := range output.UserPools {
name := aws.StringValue(userPool.Name)

if !strings.HasPrefix(name, "tf_acc_") {
continue
}

log.Printf("[INFO] Deleting Cognito User Pool %s", name)
_, err := conn.DeleteUserPool(&cognitoidentityprovider.DeleteUserPoolInput{
UserPoolId: userPool.Id,
Expand Down
5 changes: 0 additions & 5 deletions aws/resource_aws_config_configuration_aggregator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"log"
"regexp"
"strings"
"testing"

"github.com/aws/aws-sdk-go/aws"
Expand Down Expand Up @@ -45,10 +44,6 @@ func testSweepConfigConfigurationAggregators(region string) error {
log.Printf("[INFO] Found %d config configuration aggregators", len(resp.ConfigurationAggregators))

for _, agg := range resp.ConfigurationAggregators {
if !strings.HasPrefix(*agg.ConfigurationAggregatorName, "tf-") {
continue
}

log.Printf("[INFO] Deleting config configuration aggregator %s", *agg.ConfigurationAggregatorName)
_, err := conn.DeleteConfigurationAggregator(&configservice.DeleteConfigurationAggregatorInput{
ConfigurationAggregatorName: agg.ConfigurationAggregatorName,
Expand Down
6 changes: 1 addition & 5 deletions aws/resource_aws_datasync_agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"log"
"regexp"
"strings"
"testing"

"github.com/aws/aws-sdk-go/aws"
Expand Down Expand Up @@ -49,10 +48,7 @@ func testSweepDataSyncAgents(region string) error {

for _, agent := range output.Agents {
name := aws.StringValue(agent.Name)
if !strings.HasPrefix(name, "tf-acc-test-") {
log.Printf("[INFO] Skipping DataSync Agent: %s", name)
continue
}

log.Printf("[INFO] Deleting DataSync Agent: %s", name)
input := &datasync.DeleteAgentInput{
AgentArn: agent.AgentArn,
Expand Down
6 changes: 1 addition & 5 deletions aws/resource_aws_datasync_task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"log"
"regexp"
"strings"
"testing"

"github.com/aws/aws-sdk-go/aws"
Expand Down Expand Up @@ -49,10 +48,7 @@ func testSweepDataSyncTasks(region string) error {

for _, task := range output.Tasks {
name := aws.StringValue(task.Name)
if !strings.HasPrefix(name, "tf-acc-test") {
log.Printf("[INFO] Skipping DataSync Task: %s", name)
continue
}

log.Printf("[INFO] Deleting DataSync Task: %s", name)
input := &datasync.DeleteTaskInput{
TaskArn: task.TaskArn,
Expand Down
5 changes: 0 additions & 5 deletions aws/resource_aws_dax_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"log"
"regexp"
"strings"
"testing"

"github.com/aws/aws-sdk-go/aws"
Expand Down Expand Up @@ -47,10 +46,6 @@ func testSweepDAXClusters(region string) error {
log.Printf("[INFO] Found %d DAX clusters", len(resp.Clusters))

for _, cluster := range resp.Clusters {
if !strings.HasPrefix(*cluster.ClusterName, "tf-") {
continue
}

log.Printf("[INFO] Deleting DAX cluster %s", *cluster.ClusterName)
_, err := conn.DeleteCluster(&dax.DeleteClusterInput{
ClusterName: cluster.ClusterName,
Expand Down
6 changes: 4 additions & 2 deletions aws/resource_aws_db_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,8 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error
}

if attr, ok := d.GetOk("iops"); ok {
opts.Iops = aws.Int64(int64(attr.(int)))
modifyDbInstanceInput.Iops = aws.Int64(int64(attr.(int)))
requiresModifyDbInstance = true
}

if attr, ok := d.GetOk("license_model"); ok {
Expand Down Expand Up @@ -878,7 +879,8 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error
}

if attr, ok := d.GetOk("storage_type"); ok {
opts.StorageType = aws.String(attr.(string))
modifyDbInstanceInput.StorageType = aws.String(attr.(string))
requiresModifyDbInstance = true
}

if attr, ok := d.GetOk("tde_credential_arn"); ok {
Expand Down
Loading

0 comments on commit 40b77d6

Please sign in to comment.