https://github.com/global-vmware/vcd_security_tag
This Repository contains the "vcd_security_tag" Terraform Module. You can use this Module to deploy Security Tags into a VMware Cloud Director (VCD) Environment.
https://github.com/global-vmware/vcd_security_tag
infrastructure-as-code security terraform terraform-module vm vmware
Last synced: about 1 year ago
JSON representation
This Repository contains the "vcd_security_tag" Terraform Module. You can use this Module to deploy Security Tags into a VMware Cloud Director (VCD) Environment.
- Host: GitHub
- URL: https://github.com/global-vmware/vcd_security_tag
- Owner: global-vmware
- Created: 2023-05-15T22:50:02.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T16:58:56.000Z (over 2 years ago)
- Last Synced: 2023-12-15T17:36:37.428Z (over 2 years ago)
- Topics: infrastructure-as-code, security, terraform, terraform-module, vm, vmware
- Language: HCL
- Homepage: https://www.rackspace.com/cloud/vmware
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# VCD Security Tag Terraform Module
This Terraform module allows you to create Security Tags and associate them with Virtual Machines (VMs) in an existing VMware Cloud Director (VCD) Environment. This module can be used to provision new Security Tags into [Rackspace Technology SDDC Flex](https://www.rackspace.com/cloud/private/software-defined-data-center-flex) VCD Data Center Regions.
## Requirements
| Name | Version |
|-----------|---------|
| terraform | ~> 1.2 |
| vcd | ~> 3.8.2 |
## Resources
| Name | Type |
|-----------------------------------------------------------|--------------|
| [vcd_vm](https://registry.terraform.io/providers/vmware/vcd/latest/docs/data-sources/vm) | Data Source |
| [vcd_security_tag](https://registry.terraform.io/providers/vmware/vcd/latest/docs/resources/security_tag) | Resource |
## Inputs
| Name | Description | Type | Default | Required |
|-------------------|------------------------------------------------------------------|---------------------------|---------|----------|
| `vdc_org_name` | The name of the organization in VCD | string | `"Organization Name Format: --"` | yes |
| `vdc_name` | Cloud Director VDC Name | string | `"Virtual Data Center Name Format: --"` | Yes |
| `security_tags` | Map of security tags and their corresponding VM names | map(list(string)) | {} | yes |
| `vm_names` | List of VM names that the security tag is going to be applied to | list(string) | [] | yes |
## Outputs
| Name | Description |
|-------------------|------------------------------------------|
| `tag_vm_mapping` | Mapping of security tags and associated VM names. The output is a map where the keys are the tag names and the values are the associated VM names. |
## Example Usage
This is an example of a `main.tf` file that uses the VCD Security Tag Terraform Module to create security tags and associate them with VMs in VMware Cloud Director:
```terraform
module "vcd_security_tags" {
source = "github.com/global-vmware/vcd_security_tag.git?ref=v1.2.1"
vdc_org_name = ""
vdc_name = ""
security_tags = {
"pd-app-web" = ["Prod App Web Server 01", "Prod App Web Server 02"]
}
vm_names = ["Prod App Web Server 01", "Prod App Web Server 02"]
}
```
## Authors
This module is maintained by the [Global VMware Cloud Automation Services Team](https://github.com/global-vmware).