-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
39 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,39 @@ | ||
| # Intentionally empty file for consistency with aws-s3 pattern | ||
| # Module-specific locals should be defined in each submodule | ||
|
|
||
| locals { | ||
| # Portfolio ID must be specified | ||
| portfolio_id = var.portfolio_id | ||
|
|
||
| # Product ID must be specified | ||
| product_id = var.product_id | ||
|
|
||
| # Get the latest provisioning artifact ID | ||
| latest_artifact_id = try( | ||
| [for artifact in data.aws_servicecatalog_provisioning_artifacts.this.provisioning_artifact_details : | ||
| artifact.id if artifact.active | ||
| ][0], | ||
| null | ||
| ) | ||
|
|
||
| # Use provided path_id or default to latest | ||
| provisioning_artifact_id = var.path_id != null ? var.path_id : local.latest_artifact_id | ||
|
|
||
| # Merge default parameters with user-provided parameters | ||
| default_parameters = {} | ||
|
|
||
| parameters = merge( | ||
| local.default_parameters, | ||
| var.parameters | ||
| ) | ||
|
|
||
| # Convert parameters map to the format expected by aws_servicecatalog_provisioned_product | ||
| provisioning_parameters = [ | ||
| for key, value in local.parameters : { | ||
| key = key | ||
| value = tostring(value) | ||
| } | ||
| ] | ||
|
|
||
| module_name = try(data.aws_servicecatalog_product.by_id[0].name, "Unknown") | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters