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

resource/aws_rds_cluster_instance: Support Performance Insights #2331

Merged
merged 10 commits into from
Dec 22, 2017
Merged

resource/aws_rds_cluster_instance: Support Performance Insights #2331

merged 10 commits into from
Dec 22, 2017

Conversation

kwent
Copy link
Contributor

@kwent kwent commented Nov 17, 2017

Support Performance Insights for rds_cluster_instance

Fixes: #2198

$ go test -run=TestAccAWSRDSClusterInstance_withInstancePerformanceInsights -timeout=30s -parallel=4 ./aws
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.056s

@kwent
Copy link
Contributor Author

kwent commented Nov 21, 2017

Any reviewers for this ?

@Ninir Ninir added the enhancement Requests to existing resources that expand the functionality or scope. label Nov 21, 2017
Copy link
Contributor

@Ninir Ninir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kwent

Thanks for the work here, the overall modifications look very good! :)

However, the new acceptance test if failing with:

=== RUN   TestAccAWSRDSClusterInstance_withInstancePerformanceInsights
--- FAIL: TestAccAWSRDSClusterInstance_withInstancePerformanceInsights (109.20s)
	testing.go:503: Step 0 error: Error applying: 1 error(s) occurred:
		
		* aws_rds_cluster_instance.cluster_instances: 1 error(s) occurred:
		
		* aws_rds_cluster_instance.cluster_instances: InvalidParameterCombination: Access denied to Performance Insights
			status code: 400, request id: 9417a2ac-c09d-4f9a-9d06-50c336ea6167

Is it because it can only runs on Aurora postgres engines?

(As per the documentation: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html:

Amazon RDS Performance Insights is currently available only for use with Amazon Aurora (PostgreSQL).)

@kwent
Copy link
Contributor Author

kwent commented Nov 22, 2017

@Ninir Thanks. Yes probably ! I will fix the test.

Should i also check against the engine and notify the user that Performance Insights is only available for engine = aurora-postgresql or just let the API threw this error ?

@kwent
Copy link
Contributor Author

kwent commented Nov 23, 2017

Hi @Ninir,

The PR should be in a much better place now. Let me know !

@kwent
Copy link
Contributor Author

kwent commented Dec 15, 2017

Any follow up on this ? cc @Ninir

How can i help ?

Regards

@Ninir
Copy link
Contributor

Ninir commented Dec 15, 2017

Hi @kwent

Just ran your tests, and got:

--- FAIL: TestAccAWSRDSClusterInstance_withInstancePerformanceInsights (117.00s)
	testing.go:503: Step 0 error: Error applying: 1 error(s) occurred:
		
		* aws_rds_cluster_instance.cluster_instances: 1 error(s) occurred:
		
		* aws_rds_cluster_instance.cluster_instances: InvalidParameterCombination: Cannot find version 9.6.3 for aurora

Can you investigate please? thanks!

@kwent
Copy link
Contributor Author

kwent commented Dec 15, 2017

I believe i now fixed it. I followed #2419 recommendation.

@kwent
Copy link
Contributor Author

kwent commented Dec 20, 2017

@Ninir Mind relaunching the test ?

@Ninir
Copy link
Contributor

Ninir commented Dec 21, 2017

Hi @kwent !

Sure, here is the result:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSRDSClusterInstance_withInstancePerformanceInsights'

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSRDSClusterInstance_withInstancePerformanceInsights -timeout 120m
=== RUN   TestAccAWSRDSClusterInstance_withInstancePerformanceInsights
--- FAIL: TestAccAWSRDSClusterInstance_withInstancePerformanceInsights (116.18s)
	testing.go:503: Step 0 error: Error applying: 1 error(s) occurred:
		
		* aws_rds_cluster_instance.cluster_instances: 1 error(s) occurred:
		
		* aws_rds_cluster_instance.cluster_instances: InvalidParameterCombination: RDS does not support creating a DB instance with the following combination: DBInstanceClass=db.r3.large, Engine=aurora-postgresql, EngineVersion=9.6.3, LicenseModel=postgresql-license. For supported combinations of instance class and database engine version, see the documentation.
			status code: 400, request id: c6cfaa29-b903-4322-8cae-bb12b56a233f

Are you able to run those tests on your own? Tell me if you need any help on that :)
It's getting ready to cross to the finish line! 🚀

engine = "aurora-postgresql"
identifier = "tf-cluster-instance-%d"
cluster_identifier = "${aws_rds_cluster.default.id}"
instance_class = "db.r3.large"
Copy link
Contributor

@ColinHebert ColinHebert Dec 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ColinHebert Thanks ! Fixed.

Copy link
Contributor

@Ninir Ninir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi folks,

@kwent : just made a change to tests so that the one that was not passing do now. See the latest commit for that!

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSRDSClusterInstance_'                               

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSRDSClusterInstance_ -timeout 120m
=== RUN   TestAccAWSRDSClusterInstance_importBasic
--- PASS: TestAccAWSRDSClusterInstance_importBasic (686.87s)
=== RUN   TestAccAWSRDSClusterInstance_basic
--- PASS: TestAccAWSRDSClusterInstance_basic (1383.96s)
=== RUN   TestAccAWSRDSClusterInstance_namePrefix
--- PASS: TestAccAWSRDSClusterInstance_namePrefix (642.38s)
=== RUN   TestAccAWSRDSClusterInstance_generatedName
--- PASS: TestAccAWSRDSClusterInstance_generatedName (644.96s)
=== RUN   TestAccAWSRDSClusterInstance_kmsKey
--- PASS: TestAccAWSRDSClusterInstance_kmsKey (721.82s)
=== RUN   TestAccAWSRDSClusterInstance_disappears
--- PASS: TestAccAWSRDSClusterInstance_disappears (660.97s)
=== RUN   TestAccAWSRDSClusterInstance_withInstanceEnhancedMonitor
--- PASS: TestAccAWSRDSClusterInstance_withInstanceEnhancedMonitor (705.20s)
=== RUN   TestAccAWSRDSClusterInstance_withInstancePerformanceInsights
--- PASS: TestAccAWSRDSClusterInstance_withInstancePerformanceInsights (892.01s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	6338.228s

Thanks for the work and reactivity! :) 🚀

@Ninir Ninir changed the title Support Performance Insights for rds_cluster_instance resource/aws_rds_cluster_instance: Support Performance Insights Dec 22, 2017
@Ninir Ninir merged commit af666ee into hashicorp:master Dec 22, 2017
@kwent kwent deleted the kwent/performance_insights branch December 22, 2017 21:03
erran pushed a commit to erran/terraform-provider-aws that referenced this pull request Dec 28, 2017
resource/aws_rds_cluster_instance: Support Performance Insights
@bflad
Copy link
Contributor

bflad commented Jan 12, 2018

This has been released in terraform-provider-aws version 1.7.0. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 8, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support performance insights on Aurora PostgreSQL
4 participants