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 Constraint resources #14281

Conversation

ahgittin
Copy link

This PR adds four resources for Service Catalog constraints:

  • servicecatalog_constraint
  • servicecatalog_launch_notification_constraint
  • servicecatalog_launch_role_constraint
  • servicecatalog_launch_template_constraint

The first of these is based on the AWS API which supports any constraint --https://docs.aws.amazon.com/servicecatalog/latest/dg/API_CreateConstraint.html . The other three are based on the declarative CFN types which are simpler to work with -- eg https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-launchtemplateconstraint.html. The latter three as implemented here re-use code from the first but faithfully follow the CFN model.

This builds on (yet unmerged) #13797 which provides the Product and other SC resources used here. (This PR will be considerably smaller once that one is merged.)

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

Relates #13797

Release note for CHANGELOG:

New Resource: `aws_servicecatalog_constraint`
New Resource: `aws_servicecatalog_launch_notification_constraint`
New Resource: `aws_servicecatalog_launch_role_constraint`
New Resource: `aws_servicecatalog_launch_template_constraint`

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSServiceCatalog[A-Za-z]*Constraint'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSServiceCatalog[A-Za-z]*Constraint -timeout 120m
=== RUN   TestAccAWSServiceCatalogConstraint_basic
=== PAUSE TestAccAWSServiceCatalogConstraint_basic
=== RUN   TestAccAWSServiceCatalogConstraint_disappears
=== PAUSE TestAccAWSServiceCatalogConstraint_disappears
=== RUN   TestAccAWSServiceCatalogConstraint_updateDescription
=== PAUSE TestAccAWSServiceCatalogConstraint_updateDescription
=== RUN   TestAccAWSServiceCatalogConstraint_updateParameters
=== PAUSE TestAccAWSServiceCatalogConstraint_updateParameters
=== RUN   TestAccAWSServiceCatalogLaunchNotificationConstraint_basic
=== PAUSE TestAccAWSServiceCatalogLaunchNotificationConstraint_basic
=== RUN   TestAccAWSServiceCatalogLaunchNotificationConstraint_disappears
=== PAUSE TestAccAWSServiceCatalogLaunchNotificationConstraint_disappears
=== RUN   TestAccAWSServiceCatalogLaunchNotificationConstraint_updateNotificationArns
=== PAUSE TestAccAWSServiceCatalogLaunchNotificationConstraint_updateNotificationArns
=== RUN   TestAccAWSServiceCatalogLaunchRoleConstraint_basic
=== PAUSE TestAccAWSServiceCatalogLaunchRoleConstraint_basic
=== RUN   TestAccAWSServiceCatalogLaunchRoleConstraint_disappears
--- PASS: TestAccAWSServiceCatalogLaunchRoleConstraint_disappears (36.42s)
=== RUN   TestAccAWSServiceCatalogLaunchRoleConstraint_updateParameters
=== PAUSE TestAccAWSServiceCatalogLaunchRoleConstraint_updateParameters
=== RUN   TestAccAWSServiceCatalogLaunchTemplateConstraint_basic
=== PAUSE TestAccAWSServiceCatalogLaunchTemplateConstraint_basic
=== RUN   TestAccAWSServiceCatalogLaunchTemplateConstraint_disappears
=== PAUSE TestAccAWSServiceCatalogLaunchTemplateConstraint_disappears
=== CONT  TestAccAWSServiceCatalogConstraint_basic
=== CONT  TestAccAWSServiceCatalogLaunchNotificationConstraint_updateNotificationArns
=== CONT  TestAccAWSServiceCatalogLaunchTemplateConstraint_basic
=== CONT  TestAccAWSServiceCatalogLaunchRoleConstraint_updateParameters
=== CONT  TestAccAWSServiceCatalogLaunchTemplateConstraint_disappears
=== CONT  TestAccAWSServiceCatalogLaunchRoleConstraint_basic
=== CONT  TestAccAWSServiceCatalogConstraint_updateParameters
=== CONT  TestAccAWSServiceCatalogLaunchNotificationConstraint_disappears
=== CONT  TestAccAWSServiceCatalogConstraint_updateDescription
=== CONT  TestAccAWSServiceCatalogConstraint_disappears
=== CONT  TestAccAWSServiceCatalogLaunchNotificationConstraint_basic
--- PASS: TestAccAWSServiceCatalogLaunchTemplateConstraint_disappears (28.87s)
--- PASS: TestAccAWSServiceCatalogConstraint_disappears (28.92s)
--- PASS: TestAccAWSServiceCatalogLaunchNotificationConstraint_basic (29.11s)
--- PASS: TestAccAWSServiceCatalogLaunchTemplateConstraint_basic (29.61s)
--- PASS: TestAccAWSServiceCatalogConstraint_basic (29.79s)
--- PASS: TestAccAWSServiceCatalogLaunchNotificationConstraint_disappears (32.86s)
--- PASS: TestAccAWSServiceCatalogLaunchRoleConstraint_basic (36.27s)
--- PASS: TestAccAWSServiceCatalogLaunchNotificationConstraint_updateNotificationArns (41.89s)
--- PASS: TestAccAWSServiceCatalogConstraint_updateDescription (43.29s)
--- PASS: TestAccAWSServiceCatalogLaunchRoleConstraint_updateParameters (45.76s)
--- PASS: TestAccAWSServiceCatalogConstraint_updateParameters (46.21s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	84.153s

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.
@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 212 commits in this branch, many of which make significant conflicting changes. All 212 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

@ghost ghost removed the waiting-response Maintainers are waiting on response from community or contributor. label Mar 12, 2021
@ahgittin ahgittin closed this 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