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

Service Catalog PortfolioProductAssociation #13864

Conversation

ahgittin
Copy link

This PR adds support for the aws_servicecatalog_portfolio_product_association.

This part of the provisioned_product dependencies in #13797 and will be included there, but this PR has the changes for that one resource isolated for easier review, done in such a way that this PR can be merged on its own. As a product association depends on product, this depends on and builds the PR for aws_servicecatalog_product #13834. Once that is reviewed and merged the incremental difference in this PR should be much smaller.

All comments to date on #13797 (and lessons since then) have been incorporated here. This is ready for review.

Community Note

Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Release note for CHANGELOG:

New Resource: aws_servicecatalog_portfolio_product_association

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSServiceCatalogPortfolioProductAssociation' 2>&1 | tee x.log
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -count 1 -parallel 20 -run=TestAccAWSServiceCatalogPortfolioProductAssociation -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSServiceCatalogPortfolioProductAssociation_basic
=== PAUSE TestAccAWSServiceCatalogPortfolioProductAssociation_basic
=== RUN   TestAccAWSServiceCatalogPortfolioProductAssociation_disappears
=== PAUSE TestAccAWSServiceCatalogPortfolioProductAssociation_disappears
=== RUN   TestAccAWSServiceCatalogPortfolioProductAssociation_Portfolio_update
=== PAUSE TestAccAWSServiceCatalogPortfolioProductAssociation_Portfolio_update
=== RUN   TestAccAWSServiceCatalogPortfolioProductAssociation_Product_update
=== PAUSE TestAccAWSServiceCatalogPortfolioProductAssociation_Product_update
=== RUN   TestAccAWSServiceCatalogPortfolioProductAssociation_update_all
=== PAUSE TestAccAWSServiceCatalogPortfolioProductAssociation_update_all
=== CONT  TestAccAWSServiceCatalogPortfolioProductAssociation_basic
=== CONT  TestAccAWSServiceCatalogPortfolioProductAssociation_Product_update
=== CONT  TestAccAWSServiceCatalogPortfolioProductAssociation_Portfolio_update
=== CONT  TestAccAWSServiceCatalogPortfolioProductAssociation_disappears
=== CONT  TestAccAWSServiceCatalogPortfolioProductAssociation_update_all
2020/06/22 11:25:05 DestroyEdgeTransformer: pruning unused resource node aws_servicecatalog_portfolio.test-eazpm (prepare state)
2020/06/22 11:25:05 DestroyEdgeTransformer: pruning unused resource node aws_s3_bucket.bucket (prepare state)
2020/06/22 11:25:05 DestroyEdgeTransformer: pruning unused resource node aws_servicecatalog_portfolio_product_association.test (prepare state)
2020/06/22 11:25:05 DestroyEdgeTransformer: pruning unused resource node aws_s3_bucket_object.template1 (prepare state)
2020/06/22 11:25:05 DestroyEdgeTransformer: pruning unused resource node aws_servicecatalog_product.test-eazpm (prepare state)
2020/06/22 11:25:05 DestroyEdgeTransformer: pruning unused resource node data.aws_region.current (prepare state)
2020/06/22 11:25:06 DestroyEdgeTransformer: pruning unused resource node aws_s3_bucket_object.template1 (prepare state)
2020/06/22 11:25:06 DestroyEdgeTransformer: pruning unused resource node aws_s3_bucket.bucket (prepare state)
2020/06/22 11:25:06 DestroyEdgeTransformer: pruning unused resource node data.aws_region.current (prepare state)
--- PASS: TestAccAWSServiceCatalogPortfolioProductAssociation_basic (35.12s)
--- PASS: TestAccAWSServiceCatalogPortfolioProductAssociation_disappears (35.68s)
2020/06/22 11:25:22 DestroyEdgeTransformer: pruning unused resource node data.aws_region.current (prepare state)
2020/06/22 11:25:22 DestroyEdgeTransformer: pruning unused resource node aws_s3_bucket_object.template1 (prepare state)
2020/06/22 11:25:22 DestroyEdgeTransformer: pruning unused resource node aws_servicecatalog_product.test-fj26p (prepare state)
2020/06/22 11:25:22 DestroyEdgeTransformer: pruning unused resource node aws_servicecatalog_portfolio_product_association.test (prepare state)
2020/06/22 11:25:22 DestroyEdgeTransformer: pruning unused resource node aws_servicecatalog_portfolio.test-xib20 (prepare state)
2020/06/22 11:25:22 DestroyEdgeTransformer: pruning unused resource node aws_s3_bucket.bucket (prepare state)
2020/06/22 11:25:29 DestroyEdgeTransformer: pruning unused resource node aws_s3_bucket_object.template1 (prepare state)
2020/06/22 11:25:29 DestroyEdgeTransformer: pruning unused resource node aws_servicecatalog_portfolio_product_association.test (prepare state)
2020/06/22 11:25:29 DestroyEdgeTransformer: pruning unused resource node data.aws_region.current (prepare state)
2020/06/22 11:25:29 DestroyEdgeTransformer: pruning unused resource node aws_servicecatalog_portfolio.test-zrhp2 (prepare state)
2020/06/22 11:25:29 DestroyEdgeTransformer: pruning unused resource node aws_servicecatalog_product.test-zrhp2 (prepare state)
2020/06/22 11:25:29 DestroyEdgeTransformer: pruning unused resource node aws_s3_bucket.bucket (prepare state)
--- PASS: TestAccAWSServiceCatalogPortfolioProductAssociation_Portfolio_update (54.33s)
2020/06/22 11:25:29 DestroyEdgeTransformer: pruning unused resource node aws_s3_bucket.bucket (prepare state)
2020/06/22 11:25:29 DestroyEdgeTransformer: pruning unused resource node aws_s3_bucket_object.template1 (prepare state)
2020/06/22 11:25:29 DestroyEdgeTransformer: pruning unused resource node aws_servicecatalog_portfolio.test-i2we2 (prepare state)
2020/06/22 11:25:29 DestroyEdgeTransformer: pruning unused resource node aws_servicecatalog_product.test-wkjqo (prepare state)
2020/06/22 11:25:29 DestroyEdgeTransformer: pruning unused resource node aws_servicecatalog_portfolio_product_association.test (prepare state)
2020/06/22 11:25:29 DestroyEdgeTransformer: pruning unused resource node data.aws_region.current (prepare state)
--- PASS: TestAccAWSServiceCatalogPortfolioProductAssociation_update_all (60.20s)
--- PASS: TestAccAWSServiceCatalogPortfolioProductAssociation_Product_update (60.55s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	62.023s
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws/internal/flatmap	0.499s [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags	0.315s [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws/internal/naming	0.488s [no tests to run]
?   	github.com/terraform-providers/terraform-provider-aws/aws/internal/service/apigatewayv2/waiter	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws/internal/service/batch/equivalency	0.334s [no tests to run]
?   	github.com/terraform-providers/terraform-provider-aws/aws/internal/service/ecs/waiter	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws/internal/service/eks/token	0.532s [no tests to run]
?   	github.com/terraform-providers/terraform-provider-aws/aws/internal/service/guardduty/waiter	[no test files]
?   	github.com/terraform-providers/terraform-provider-aws/aws/internal/service/iam/waiter	[no test files]
?   	github.com/terraform-providers/terraform-provider-aws/aws/internal/service/kinesisanalytics/waiter	[no test files]
?   	github.com/terraform-providers/terraform-provider-aws/aws/internal/service/kms/waiter	[no test files]
?   	github.com/terraform-providers/terraform-provider-aws/aws/internal/service/neptune/waiter	[no test files]
?   	github.com/terraform-providers/terraform-provider-aws/aws/internal/service/rds/waiter	[no test files]
?   	github.com/terraform-providers/terraform-provider-aws/aws/internal/service/secretsmanager/waiter	[no test files]
?   	github.com/terraform-providers/terraform-provider-aws/aws/internal/service/servicediscovery/waiter	[no test files]
?   	github.com/terraform-providers/terraform-provider-aws/aws/internal/service/workspaces/waiter	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws/internal/tfawsresource	0.691s [no tests to run]
?   	github.com/terraform-providers/terraform-provider-aws/awsproviderlint	[no test files]
?   	github.com/terraform-providers/terraform-provider-aws/awsproviderlint/helper/awsprovidertype/keyvaluetags	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/awsproviderlint/passes	0.925s [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/awsproviderlint/passes/AWSAT001	1.107s [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/awsproviderlint/passes/AWSR001	0.461s [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/awsproviderlint/passes/AWSR002	0.320s [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/awsproviderlint/passes/fmtsprintfcallexpr	0.233s [no tests to run]

bw-intuit and others added 30 commits June 25, 2018 15:10
…t-and-pp

fix trivial conflicts where master has changed how resources are listed (in website and in aws/provider),
to reference servicecatalog_product in the right way

also revert the mode change against the servicecatalog_portfolio markdown
only pulling in the relevant provisioned-product changes
* create needs to block for completion, then the test (as written) will work in our account
* then we need product_portfolio_association and make the test work in any account (create a product, not hard-coded)
* then other TODOs marked in code
* master: (79 commits)
  Update CHANGELOG for hashicorp#8457
  resource/aws_ec2_tag: Finish implementation
  CodeArtifact new service support (hashicorp#13735)
  internal/keyvaluetags: Support servicediscovery and worklink (hashicorp#13732)
  tests/provider: Remove TravisCI (hashicorp#13730)
  update method params in web_acl test check
  Update CHANGELOG for hashicorp#12688
  Fix rebase change
  Fix docs
  Improve error message
  Apply review comments
  Refactor after rebase
  Apply review comments
  Apply changes based on review
  Format test config
  Fix failing build
  Add calculated wcus attribute
  Add documentation
  Add rule_group_reference_statement
  Add rate_based_statement
  ...
Match the same method used in other places within the provider to create idempotency tokens.
@teamterraform
Copy link

Notification of Recent and Upcoming Changes to Contributions

Thank you for this contribution! There have been a few recent development changes that affect this pull request. We apologize for the inconvenience, especially if there have been long review delays up until now. Please note that this is automated message from an unmonitored account. See the FAQ for additional information on the maintainer team and review prioritization.

If you are unable to complete these updates, please leave a comment for the community and maintainers so someone can potentially continue the work. The maintainers will encourage other contributors to use the existing contribution as the base for additional changes as appropriate. Otherwise, contributions that do not receive updated code or comments from the original contributor may be closed in the future so the maintainers can focus on active items.

For the most up to date information about Terraform AWS Provider development, see the Contributing Guide. Additional technical debt changes can be tracked with the technical-debt label on issues.

As part of updating a pull request with these changes, the most current unit testing and linting will run. These may report issues that were not previously reported.

Terraform 0.12 Syntax

Reference: #8950
Reference: #14417

Version 3 and later of the Terraform AWS Provider, which all existing contributions would potentially be added, only supports Terraform 0.12 and later. Certain syntax elements of Terraform 0.11 and earlier show deprecation warnings during runs with Terraform 0.12. Documentation and test configurations, such as those including deprecated string interpolations (some_attribute = "${aws_service_thing.example.id}") should be updated to the newer syntax (some_attribute = aws_service_thing.example.id). Contribution testing will automatically fail on older syntax in the near future. Please see the referenced issues for additional information.

Action Required: Terraform Plugin SDK Version 2

Reference: #14551

The Terraform AWS Provider has been upgraded to the latest version of the Terraform Plugin SDK. Generally, most changes to contributions should only involve updating Go import paths in source code files. Please see the referenced issue for additional information.

Action Required: Removal of website/aws.erb File

Reference: #14712

Any changes to the website/aws.erb file are no longer necessary and should be removed from this contribution to prevent merge issues in the near future when the file is removed from the repository. Please see the referenced issue for additional information.

Upcoming Change of Git Branch Naming

Reference: #14292

Development environments will need their upstream Git branch updated from master to main in the near future. Please see the referenced issue for additional information and scheduling.

Upcoming Change of GitHub Organization

Reference: #14715

This repository will be migrating from https://github.com/terraform-providers/terraform-provider-aws to https://github.com/hashicorp/terraform-provider-aws. No practitioner or developer action is anticipated and most GitHub functionality will automatically redirect to the new location. Go import paths including terraform-providers can remain for now. Please see the referenced issue for additional information and scheduling.

@ahgittin
Copy link
Author

This has been updated as per the 18 Aug notification to use the v2 sdk and remove aws.erb (fixing the conflicts), and also updating to conform to the stricter markdown checks.

Base automatically changed from master to main January 23, 2021 00:58
@breathingdust breathingdust requested a review from a team as a code owner January 23, 2021 00:58
@YakDriver YakDriver self-assigned this Feb 17, 2021
@YakDriver
Copy link
Member

@ahgittin Thank you for your work on this PR! I will be working on this before long. In order to expedite the process, I will likely make some changes. Make sure that you have checked the box "Allow edits from maintainers." (Don't worry though, you will receive all credit for your contribution and code!) Also, please coordinate with us before making any commits to this branch. Again, thank you for your help and we look forward to this popular addition to the AWS provider!

@YakDriver YakDriver removed the needs-triage Waiting for first response or review from a maintainer. label Feb 25, 2021
@YakDriver
Copy link
Member

@ahgittin @cloudsoft Thank you very much for all your work on this PR! I'm excited to work with you on this. However, in order to work with this PR, I need two things:

  1. You must check the "Allow edits from maintainers" box. It is currently not checked. (Only @cloudsoft will be able to check the box since the fork with this branch is in the @cloudsoft repo.)
  2. Currently there are 112 commits, many of which significantly rewrite the branch. All 112 commits need to be squashed into a single commit to proceed.

Since we look forward to adding this feature to the AWS Provider, we need you to make these changes by March 11, 2021. If you are unable to do this, we understand and thank you for your work. However, we will not be able to use this contribution.

@YakDriver YakDriver added the waiting-response Maintainers are waiting on response from community or contributor. label Mar 5, 2021
@ahgittin
Copy link
Author

Replaced by #18074

@ahgittin ahgittin closed this Mar 12, 2021
@ghost ghost removed waiting-response Maintainers are waiting on response from community or contributor. labels Mar 12, 2021
@ghost
Copy link

ghost commented Apr 12, 2021

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 as resolved and limited conversation to collaborators Apr 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. service/servicecatalog Issues and PRs that pertain to the servicecatalog service. size/XXL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants