{"id":21888677,"url":"https://github.com/swisscom/terraform-dcs-demo","last_synced_at":"2026-03-15T03:34:48.551Z","repository":{"id":44315461,"uuid":"211873138","full_name":"swisscom/terraform-dcs-demo","owner":"swisscom","description":"This repo contains sample infrastructure as code snippets to deploy, maintain and manage infrastructure on DCS using Terraform vCloud Director provider.","archived":false,"fork":false,"pushed_at":"2024-10-16T15:40:10.000Z","size":16,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-03-04T22:02:06.600Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swisscom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-30T14:00:16.000Z","updated_at":"2024-10-16T15:40:12.000Z","dependencies_parsed_at":"2024-10-18T11:40:42.397Z","dependency_job_id":"5a20cff4-cf2f-456f-bd2f-db4f0aec02fb","html_url":"https://github.com/swisscom/terraform-dcs-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisscom%2Fterraform-dcs-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisscom%2Fterraform-dcs-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisscom%2Fterraform-dcs-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisscom%2Fterraform-dcs-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swisscom","download_url":"https://codeload.github.com/swisscom/terraform-dcs-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244895531,"owners_count":20527902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-28T11:16:35.980Z","updated_at":"2026-03-15T03:34:43.516Z","avatar_url":"https://github.com/swisscom.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DCS Infrastructure as code with Terraform \n\n## Introduction\nThis repo contains sample infrastructure as code snippets to deploy, maintain and manage infrastructure on DCS using  Terraform [vCloud Director](https://www.terraform.io/docs/providers/vcd/index.html) provider.\n\n[Terraform](https://www.terraform.io/) enables you to safely and predictably create, change, and improve infrastructure. It is an open source tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.\n\n[Download](https://www.terraform.io/downloads.html) Terraform based on your operating system to execute terraform code and plans.\n\nInstall Terraform by unzipping it and moving it to a directory included in your system's [PATH](https://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them).\n\n## How to use this Module\n\n* Make sure that you have DCS contract and have your Contract Number/Pro-Number ready.\n\n* Create vCloud Director API User from DCS Self Service Portal.\n\n* Create Dynamic Data Center from DCS Self Service Portal.\n\n#### What are these different files \n1. **config-values.tfvars** \nThis file is to pass configuration values to the terraform apply/destroy commands instead of passing values manually. \n**Edit this file by exchanging the values as per your DCS environment setup**.\n \n1. **main.tf** \nThis file is to define terraform provider for [vCloud Director](https://github.com/terraform-providers/terraform-provider-vcd).\n\n1. **variables.tf**\nThis file defines all the needed variables that are referenced in this sample terraform script. \n\n1. **dcs-terraform-basic-sample.tf**\nThis sample terraform script shows how terraform can be used to write infrastructure as code in DCS with vCloud Director. This particular example will create a vDC Network,vApp and VM attached to the network. \n\n#### Quick Start  \n\n1. Open your shell change directory to `\\terraform-dcs-demo` and execute `terraform init` it will download vCloud Director provider and initialize terraform.\n1. Run `terraform validate` to make sure the configuration is valid.\n1. Run `terraform apply -var-file=\"config-values.tfvars\"` to apply the changes required to reach the desired state of the configuration. This will start deploying resources in your DCS contract.\n1. Run `terraform destroy -var-file=\"config-values.tfvars\"` Infrastructure managed by Terraform will be destroyed. This will ask for confirmation before destroying. This will start destroying resources managed by Terraform in your DCS contract.\n\n\n\n\n    \n## References\n\n[Terraform](https://www.terraform.io/)\n\n[Download Terraform](https://www.terraform.io/downloads.html)\n\n[vCloud Director Terraform Provider](https://github.com/terraform-providers/terraform-provider-vcd)\n\n[Getting Started with Terraform](https://learn.hashicorp.com/terraform/getting-started/install)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswisscom%2Fterraform-dcs-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswisscom%2Fterraform-dcs-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswisscom%2Fterraform-dcs-demo/lists"}