hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.83k stars 9.17k forks source link

New Service Catalog resource 'aws_servicecatalog_accept_portfolio_share' #22503

Open bschaatsbergen opened 2 years ago

bschaatsbergen commented 2 years ago

Community Note

Description

To import a service catalog portfolio you'll need to make use of the AcceptPortfolioShare API from the Service Catalog. At the moment this is not supported through our Terraform AWS provider (from what I can see, please correct me if I'm wrong).

API Reference: https://docs.aws.amazon.com/servicecatalog/latest/dg/API_AcceptPortfolioShare.html#servicecatalog-AcceptPortfolioShare-request-PortfolioShareType

There's a CloudFormation resource available too which does not list the PortfolioShareType property, https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-acceptedportfolioshare.html any idea?

New or Affected Resource(s)

Potential Terraform Configuration

resource "aws_servicecatalog_accept_portfolio_share" "example" {
  accept_language = "en"
  portfolio_id = "prod-dnigbtea24ste"
  portfolio_share_type = "aws_organizations"
}

References

adrianbahja01 commented 8 months ago

I think this needs to be prioritized a bit :). It is a missing piece which stops the terraform to automate the whole process. @bschaatsbergen do you have any update on this or any workarounds?

bschaatsbergen commented 8 months ago

I'll happily work on it actually, I noticed the same 2 years ago! @adrianbahja01

Give me a week or two and it's finished 😎

bschaatsbergen commented 8 months ago

Prior to implementing this I would like to finish some existing tech-debt (migrating to the v2 AWS SDK): https://github.com/hashicorp/terraform-provider-aws/pull/36009