-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
CloudSearch Domain Resource Support #17723
Conversation
Thank you for your contribution! 🚀 Please note that typically Go dependency changes are handled in this repository by dependabot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the Additional details:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome @celestialorb 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
Only question I have at the moment from someone more intimately familiar with Terraform resource/provider design, is should an index in a CloudSearch domain be a separate resource? I feel as if it should be due to its complexity, but perhaps the initial approach taken by @Mi3-14159 is perfectly fine. |
Nice work @celestialorb! This would be extremely helpful to our team! Is there something blocking the review of this PR? |
8c4863f
to
404d49d
Compare
@austinkelleher Not sure, haven't seen anyone official pop into the PR yet. Don't know what can be done to get it noticed; I'm sure there's a ton of PRs to review on their end. I've gone ahead and updated the code and docs so that all the checks pass again for this PR. In the meantime I've published this custom version of the provider under my own namespace, |
Awesome job @celestialorb !! It's working great and couldn't have come at a better time for our team! |
@celestialorb Thanks for the provider. I am getting an issue even if i dont change the index elements still the plan shows me changes if i do terraform plan and it recreates all of the index everytime. resource "aws_cloudsearch_domain" "domain" { dynamic "index" { service_access_policies = data.aws_iam_policy_document.cloudsearch_access_policy.json Value from vars file indexes = [ |
@vsharma29 The issue here is that you're setting an
There's still some work to done surrounding indices, given that they aren't exactly straight-forward and I think the approach originally taken can be improved upon. |
@celestialorb All the fields which i have set up are text or text array so it can be set . I am not sure whats driving the plan to |
My mistake, I thought I had spotted an |
Including a copy of the plan would help to debug the issue. |
Yeah, I'll need to see what your plan looks like. I can't reproduce the issue on my end. |
Sorry about late reply. Copy of my plan.` |
Looks like it's because you're changing the |
Pull request #21306 has significantly refactored the AWS Provider codebase. As a result, most PRs opened prior to the refactor now have merge conflicts that must be resolved before proceeding. Specifically, PR #21306 relocated the code for all AWS resources and data sources from a single We recognize that many pull requests have been open for some time without yet being addressed by our maintainers. Therefore, we want to make it clear that resolving these conflicts in no way affects the prioritization of a particular pull request. Once a pull request has been prioritized for review, the necessary changes will be made by a maintainer -- either directly or in collaboration with the pull request author. For a more complete description of this refactor, including examples of how old filepaths and function names correspond to their new counterparts: please refer to issue #20000. For a quick guide on how to amend your pull request to resolve the merge conflicts resulting from this refactor and bring it in line with our new code patterns: please refer to our Service Package Refactor Pull Request Guide. |
933837c
to
9512c35
Compare
…s policy corrections.
…d make configurable) to reach Active state. Acceptance test output: % make testacc TESTARGS='-run=TestAccCloudSearchDomainServiceAccessPolicy_' PKG=cloudsearch ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/cloudsearch/... -v -count 1 -parallel 20 -run=TestAccCloudSearchDomainServiceAccessPolicy_ -timeout 180m === RUN TestAccCloudSearchDomainServiceAccessPolicy_basic === PAUSE TestAccCloudSearchDomainServiceAccessPolicy_basic === RUN TestAccCloudSearchDomainServiceAccessPolicy_update === PAUSE TestAccCloudSearchDomainServiceAccessPolicy_update === CONT TestAccCloudSearchDomainServiceAccessPolicy_basic === CONT TestAccCloudSearchDomainServiceAccessPolicy_update --- PASS: TestAccCloudSearchDomainServiceAccessPolicy_basic (1613.17s) --- PASS: TestAccCloudSearchDomainServiceAccessPolicy_update (2419.09s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudsearch 2422.751s
…domain has been created.
% make testacc TESTARGS='-run=TestAccCloudSearchDomain_indexFields' PKG=cloudsearch ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/cloudsearch/... -v -count 1 -parallel 20 -run=TestAccCloudSearchDomain_indexFields -timeout 180m === RUN TestAccCloudSearchDomain_indexFields === PAUSE TestAccCloudSearchDomain_indexFields === CONT TestAccCloudSearchDomain_indexFields --- PASS: TestAccCloudSearchDomain_indexFields (1083.01s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudsearch 1086.866s
% make testacc TESTARGS='-run=TestAccCloudSearchDomain_indexFields' PKG=cloudsearch ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/cloudsearch/... -v -count 1 -parallel 20 -run=TestAccCloudSearchDomain_indexFields -timeout 180m === RUN TestAccCloudSearchDomain_indexFields === PAUSE TestAccCloudSearchDomain_indexFields === CONT TestAccCloudSearchDomain_indexFields --- PASS: TestAccCloudSearchDomain_indexFields (1565.71s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudsearch 1570.444s
% make testacc TESTARGS='-run=TestAccCloudSearchDomain_update' PKG=cloudsearch ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/cloudsearch/... -v -count 1 -parallel 20 -run=TestAccCloudSearchDomain_update -timeout 180m === RUN TestAccCloudSearchDomain_update === PAUSE TestAccCloudSearchDomain_update === CONT TestAccCloudSearchDomain_update --- PASS: TestAccCloudSearchDomain_update (1264.26s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudsearch 1267.577s
…ate'. % make testacc TESTARGS='-run=TestAccCloudSearchDomain_update' PKG=cloudsearch ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/cloudsearch/... -v -count 1 -parallel 20 -run=TestAccCloudSearchDomain_update -timeout 180m === RUN TestAccCloudSearchDomain_update === PAUSE TestAccCloudSearchDomain_update === CONT TestAccCloudSearchDomain_update --- PASS: TestAccCloudSearchDomain_update (1570.32s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudsearch 1574.295s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
Commercial
% make testacc TESTARGS='-run=TestAccCloudSearchDomain_' PKG=cloudsearch
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/cloudsearch/... -v -count 1 -parallel 20 -run=TestAccCloudSearchDomain_ -timeout 180m
=== RUN TestAccCloudSearchDomain_basic
=== PAUSE TestAccCloudSearchDomain_basic
=== RUN TestAccCloudSearchDomain_disappears
=== PAUSE TestAccCloudSearchDomain_disappears
=== RUN TestAccCloudSearchDomain_indexFields
=== PAUSE TestAccCloudSearchDomain_indexFields
=== RUN TestAccCloudSearchDomain_update
=== PAUSE TestAccCloudSearchDomain_update
=== CONT TestAccCloudSearchDomain_basic
=== CONT TestAccCloudSearchDomain_indexFields
=== CONT TestAccCloudSearchDomain_disappears
=== CONT TestAccCloudSearchDomain_update
--- PASS: TestAccCloudSearchDomain_disappears (662.90s)
--- PASS: TestAccCloudSearchDomain_basic (679.61s)
--- PASS: TestAccCloudSearchDomain_indexFields (1588.94s)
--- PASS: TestAccCloudSearchDomain_update (1789.34s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudsearch 1792.704s
% make testacc TESTARGS='-run=TestAccCloudSearchDomainServiceAccessPolicy_' PKG=cloudsearch
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/cloudsearch/... -v -count 1 -parallel 20 -run=TestAccCloudSearchDomainServiceAccessPolicy_ -timeout 180m
=== RUN TestAccCloudSearchDomainServiceAccessPolicy_basic
=== PAUSE TestAccCloudSearchDomainServiceAccessPolicy_basic
=== RUN TestAccCloudSearchDomainServiceAccessPolicy_update
=== PAUSE TestAccCloudSearchDomainServiceAccessPolicy_update
=== CONT TestAccCloudSearchDomainServiceAccessPolicy_basic
=== CONT TestAccCloudSearchDomainServiceAccessPolicy_update
--- PASS: TestAccCloudSearchDomainServiceAccessPolicy_basic (1807.86s)
--- PASS: TestAccCloudSearchDomainServiceAccessPolicy_update (2546.93s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudsearch 2550.273s
GovCloud
% make testacc TESTARGS='-run=TestAccCloudSearchDomain_' PKG=cloudsearch
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/cloudsearch/... -v -count 1 -parallel 20 -run=TestAccCloudSearchDomain_ -timeout 180m
=== RUN TestAccCloudSearchDomain_basic
=== PAUSE TestAccCloudSearchDomain_basic
=== RUN TestAccCloudSearchDomain_disappears
=== PAUSE TestAccCloudSearchDomain_disappears
=== RUN TestAccCloudSearchDomain_indexFields
=== PAUSE TestAccCloudSearchDomain_indexFields
=== RUN TestAccCloudSearchDomain_update
=== PAUSE TestAccCloudSearchDomain_update
=== CONT TestAccCloudSearchDomain_basic
=== CONT TestAccCloudSearchDomain_indexFields
=== CONT TestAccCloudSearchDomain_disappears
=== CONT TestAccCloudSearchDomain_update
=== CONT TestAccCloudSearchDomain_basic
acctest.go:608: skipping tests; partition aws-us-gov does not support cloudsearch service
=== CONT TestAccCloudSearchDomain_indexFields
acctest.go:608: skipping tests; partition aws-us-gov does not support cloudsearch service
--- SKIP: TestAccCloudSearchDomain_indexFields (1.47s)
--- SKIP: TestAccCloudSearchDomain_basic (1.47s)
=== CONT TestAccCloudSearchDomain_disappears
acctest.go:608: skipping tests; partition aws-us-gov does not support cloudsearch service
--- SKIP: TestAccCloudSearchDomain_disappears (1.47s)
=== CONT TestAccCloudSearchDomain_update
acctest.go:608: skipping tests; partition aws-us-gov does not support cloudsearch service
--- SKIP: TestAccCloudSearchDomain_update (1.47s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudsearch 4.968s
% make testacc TESTARGS='-run=TestAccCloudSearchDomainServiceAccessPolicy_' PKG=cloudsearch
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/cloudsearch/... -v -count 1 -parallel 20 -run=TestAccCloudSearchDomainServiceAccessPolicy_ -timeout 180m
=== RUN TestAccCloudSearchDomainServiceAccessPolicy_basic
=== PAUSE TestAccCloudSearchDomainServiceAccessPolicy_basic
=== RUN TestAccCloudSearchDomainServiceAccessPolicy_update
=== PAUSE TestAccCloudSearchDomainServiceAccessPolicy_update
=== CONT TestAccCloudSearchDomainServiceAccessPolicy_basic
=== CONT TestAccCloudSearchDomainServiceAccessPolicy_update
=== CONT TestAccCloudSearchDomainServiceAccessPolicy_basic
acctest.go:608: skipping tests; partition aws-us-gov does not support cloudsearch service
--- SKIP: TestAccCloudSearchDomainServiceAccessPolicy_basic (1.30s)
=== CONT TestAccCloudSearchDomainServiceAccessPolicy_update
acctest.go:608: skipping tests; partition aws-us-gov does not support cloudsearch service
--- SKIP: TestAccCloudSearchDomainServiceAccessPolicy_update (1.30s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/cloudsearch 4.651s
@celestialorb Thanks for the contribution 🎉 👏. |
This functionality has been released in v3.73.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Closes #7833
Output from acceptance testing: