I'm trying deploy Service catalog via Terraform. When I try deploy Service catalog product by code:
#Service catalog product
resource "aws_servicecatalog_product" "linuxDesktop" {
  name  = "Linux Desktop"
  description= "Cloud development environment configured for engineering staff. Runs AWS Linux."
  owner = "IT"
  type = "CLOUD_FORMATION_TEMPLATE"
  provisioning_artifact_parameters {
    template_url = "https://fdfdasfadfdf.s3.us-west-2.amazonaws.com/development-environment.yaml"
  }
}
I got error from terraform:
aws_servicecatalog_portfolio.portfolio: Creation complete after 2s [id=port-xe2ql6s2myy3s]
╷
│ Error: error creating Service Catalog Product: InvalidParametersException: The CLOUD_FORMATION_TEMPLATE Product Type only supports the following ProvisioningArtifact Types: CLOUD_FORMATION_TEMPLATE, ACCOUNT_FACTORY
│
│   with aws_servicecatalog_product.linuxDesktop,
│   on main.tf line 31, in resource "aws_servicecatalog_product" "linuxDesktop":
│   31: resource "aws_servicecatalog_product" "linuxDesktop" {
You have to add type to provisioning_artifact_parameters as well:
resource "aws_servicecatalog_product" "linuxDesktop" {
  name  = "Linux Desktop"
  description= "Cloud development environment configured for engineering staff. Runs AWS Linux."
  owner = "IT"
  type = "CLOUD_FORMATION_TEMPLATE"
  provisioning_artifact_parameters {
    template_url = "https://fdfdasfadfdf.s3.us-west-2.amazonaws.com/development-environment.yaml"
    type = "CLOUD_FORMATION_TEMPLATE"
  }
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With