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 Security Tags resource #845

Merged
merged 35 commits into from
May 10, 2022
Merged

Conversation

mikeletux
Copy link
Contributor

There is not issue associated with this PR.

Description

This PR brings to the Terraform provider a new resource to create security tags on VCD.

Detailed description

With this PR, the Terraform provider for VCD introduces the possibility of creating security tags via new vcd_security_tag resource.
With this resource, a new security tag can be created and can be associated to several VMs. An example would be:

resource "vcd_security_tag" "my_tag" {
  name = "test-tag"
  vm_ids = [vcd_vm.my-vm-one.id, vcd_vm.my-vm-two.id]
}

Where name is the security tag name and vm_ids a list of VM IDs that this security tag is going to be applied to.

Alongside this resource it comes acceptance tests as well as Terraform documentation on how to use this new resource.

Miguel Sama added 12 commits May 3, 2022 11:26
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>
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 changed the title Feature security tags New feature - VCD Security Tags May 4, 2022
Signed-off-by: Miguel Sama <msama@vmware.com>
@mikeletux mikeletux marked this pull request as ready for review May 4, 2022 10:01
@mikeletux mikeletux removed the request for review from dataclouder May 4, 2022 10:01
@mikeletux mikeletux self-assigned this May 4, 2022
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.

I will play manually to check some things.

website/docs/r/security_tag.html.markdown Show resolved Hide resolved
Signed-off-by: Miguel Sama <msama@vmware.com>
vcd/resource_vcd_security_tag.go Outdated Show resolved Hide resolved
website/docs/r/security_tag.html.markdown Show resolved Hide resolved
website/docs/r/security_tag.html.markdown Outdated Show resolved Hide resolved
vcd/resource_vcd_security_tag.go Outdated Show resolved Hide resolved
vcd/resource_vcd_security_tag.go Outdated Show resolved Hide resolved
vcd/resource_vcd_security_tag.go Show resolved Hide resolved
vcd/resource_vcd_security_tag.go Show resolved Hide resolved
website/docs/r/security_tag.html.markdown Outdated Show resolved Hide resolved
@mikeletux mikeletux changed the title New feature - VCD Security Tags Security Tags May 5, 2022
Signed-off-by: Miguel Sama <msama@vmware.com>
Miguel Sama added 6 commits May 5, 2022 17:23
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>
Copy link
Collaborator

@Didainius Didainius left a comment

Choose a reason for hiding this comment

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

Pretty much last comments - should be good to go after fixes.

vcd/resource_vcd_security_tag_test.go Outdated Show resolved Hide resolved
vcd/resource_vcd_security_tag_test.go Show resolved Hide resolved
vcd/resource_vcd_security_tag.go Outdated Show resolved Hide resolved
website/docs/r/security_tag.html.markdown Outdated Show resolved Hide resolved
vcd/resource_vcd_security_tag.go Outdated Show resolved Hide resolved
vcd/resource_vcd_security_tag_test.go Show resolved Hide resolved
vcd/resource_vcd_security_tag_test.go Show resolved Hide resolved
Miguel Sama added 9 commits May 6, 2022 12:39
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>
Signed-off-by: Miguel Sama <msama@vmware.com>
Copy link
Collaborator

@Didainius Didainius left a comment

Choose a reason for hiding this comment

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

Thanks!

Miguel Sama added 3 commits May 9, 2022 09:19
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
Signed-off-by: Miguel Sama <msama@vmware.com>
@adambarreiro
Copy link
Collaborator

Just a nit-like suggestion, to rename the PR to something more specific like "Add Security Tags resource"

Copy link
Collaborator

@adambarreiro adambarreiro left a comment

Choose a reason for hiding this comment

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

Great work 💪

Signed-off-by: Miguel Sama <msama@vmware.com>
@mikeletux mikeletux changed the title Security Tags Add Security Tags resource May 10, 2022
@mikeletux mikeletux merged commit 9d188f7 into vmware:main May 10, 2022
@mikeletux mikeletux deleted the feature-security-tags branch May 10, 2022 14:04
@lvirbalas lvirbalas mentioned this pull request Feb 23, 2023
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