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

Add catalog resource and datasource metadata enhancement #780

Merged
merged 17 commits into from
Feb 28, 2022

Conversation

mikeletux
Copy link
Contributor

This PR targets #372 regarding metadata on catalog resource and datasource.

With this enhancement, now when creating a Catalog using vcd_catalog it is possible to include metadata. An example would be:

resource "vcd_catalog" "test-catalog" {
  org = "my_org" 
  
  name               = "my_catalog"
  description        = "This is just a test catalog"

  delete_force      = "true"
  delete_recursive  = "true"

  metadata = {
    catalog  = "catalog Metadata v2"
    catalog2 = "catalog Metadata2 v2"
    catalog3 = "catalog Metadata3"
  }
}

Also, when using vcd_catalog datasource, also metadata regarding a catalog will be retrieved in the compute field metadata.

@mikeletux mikeletux marked this pull request as ready for review February 3, 2022 17:04
Copy link
Contributor

@vbauzys vbauzys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first scan :)

vcd/resource_vcd_catalog.go Outdated Show resolved Hide resolved
vcd/resource_vcd_catalog.go Outdated Show resolved Hide resolved
website/docs/r/catalog.html.markdown Outdated Show resolved Hide resolved
vcd/resource_vcd_catalog.go Outdated Show resolved Hide resolved
@lvirbalas lvirbalas removed the request for review from dataclouder February 14, 2022 16:02
Copy link
Contributor

@vbauzys vbauzys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -46,6 +46,7 @@ The following arguments are supported:
* `publish_enabled` - (*v3.6+*) Enable allows to publish a catalog externally to make its vApp templates and media files available for subscription by organizations outside the Cloud Director installation. Default is `false`.
* `cache_enabled` - (*v3.6+*) Enable early catalog export to optimize synchronization. Default is `false`.
* `preserve_identity_information` - (*v3.6+*) Enable include BIOS UUIDs and MAC addresses in the downloaded OVF package. Preserving the identity information limits the portability of the package and you should use it only when necessary. Default is `false`.
* `metadata` - (*v3.6+*) Key value map of metadata.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an extra space after dash.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

vcd/resource_vcd_catalog.go Outdated Show resolved Hide resolved
Miguel Sama added 13 commits February 28, 2022 12:07
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
…h go-vcloud-sdk

Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
  * Change catalog.DeleteMetadata to catalog.DeleteMetadataEntry
  * Change catalog.AddMetadata to catalog.AddMetadataEntry

Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Miguel Sama added 4 commits February 28, 2022 12:12
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
@mikeletux mikeletux merged commit 99dc59f into vmware:main Feb 28, 2022
@mikeletux mikeletux deleted the add-catalog-metadata branch February 28, 2022 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants