Closed VickyWinner closed 2 years ago
Marking this issue as stale due to inactivity. This helps us focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!
need this feature.
@VickyWinner Need some clarification. Are you looking for a data source for catalog item?
@Prativa20 data source for catalog item already exists, however, I cannot create entitlement using it. right now I am creating entitlement using below method. However, this way I get all the cloud templates from the project. I am looking for creating entitlement from a catalog item by its name so that I can create entitlements based on its name, not based on the project in which the catalog exists. did I make sense?
data "vra_project" "project_template" {
name = var.project_template
}
data "vra_catalog_source_blueprint" "this" {
project_id = data.vra_project.project_template.id
}
data "vra_project" "this" {
count = var.project_count
name = vra_project.this[count.index].name
depends_on = [vra_project.this]
}
resource "vra_catalog_source_entitlement" "this" {
count = var.project_count
catalog_source_id = data.vra_catalog_source_blueprint.this.id
project_id = data.vra_project.this[count.index].id
}
@Prativa20 Was that clarification helpful? Is this being considered as an valid enhancement?
This is being added as part of #425, you will have the ability to create a catalog_item_entitlement
for a particular catalog_item
:
data "vra_catalog_item" "this" {
name = vra_blueprint.this.name
}
resource "vra_catalog_item_entitlement" "this" {
catalog_item_id = data.vra_catalog_item.this.id
project_id = var.vra_project_id
}
@frodenas, Well, I moved to an alternate process outside Terraform. couldn't wait this long as we need to create/manage projects using automation.
vRA version vRealize Orchestrator 8.2.0.16941495
Terraform version Terraform v0.13.1
terraform-provider-vra plugin version terraform.io/vmware/vra v0.3.3
Is your feature request related to a problem? Please describe. I have pre-created cloud templates in vRA using UI. I am creating a TF module to create project on use basis and tag pre-created cloud templates to newly created project.
Describe the solution you'd like I am looking a way to tag existing cloudTemplates to newly created project. I see currently there is an API endpoint
/catalog/api/admin/entitlements
using which we can do this but I am looking for a data source in terraform to fetch existing cloud template and assign to a new project created using Terraform.Describe alternatives you've considered using an API endpoint
/catalog/api/admin/entitlements
Additional context