{"id":15292389,"url":"https://github.com/nirbelelti/otc_terraform_cloud_configuration","last_synced_at":"2025-03-24T10:17:48.615Z","repository":{"id":257440997,"uuid":"858243082","full_name":"nirbelelti/OTC_terraform_cloud_configuration","owner":"nirbelelti","description":"This project automates the provisioning of Managed Kubernetes Clusters (CCE) on OpenTelekomCloud using Terraform. It creates scalable, high-availability clusters with node pools across multiple availability zones. Key features include autoscaling, add-ons like the metrics server, and generating a Kubeconfig file for easy cluster management","archived":false,"fork":false,"pushed_at":"2024-09-16T15:09:25.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T10:17:45.858Z","etag":null,"topics":["cce","cluster","dns","load-balancer","s3-bucket","swr","terraform","vpc"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nirbelelti.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2024-09-16T15:00:22.000Z","updated_at":"2024-09-16T15:12:01.000Z","dependencies_parsed_at":"2024-09-16T19:44:13.046Z","dependency_job_id":"a8b5e55f-94a0-457e-ade8-721b138cd5cf","html_url":"https://github.com/nirbelelti/OTC_terraform_cloud_configuration","commit_stats":null,"previous_names":["nirbelelti/otc_terraform_cloud_configuration"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirbelelti%2FOTC_terraform_cloud_configuration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirbelelti%2FOTC_terraform_cloud_configuration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirbelelti%2FOTC_terraform_cloud_configuration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nirbelelti%2FOTC_terraform_cloud_configuration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nirbelelti","download_url":"https://codeload.github.com/nirbelelti/OTC_terraform_cloud_configuration/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245249230,"owners_count":20584497,"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":["cce","cluster","dns","load-balancer","s3-bucket","swr","terraform","vpc"],"created_at":"2024-09-30T16:17:41.244Z","updated_at":"2025-03-24T10:17:48.583Z","avatar_url":"https://github.com/nirbelelti.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform Cloud Configuration Demo\n\nThis project demonstrates the use of Terraform to configure cloud resources on OpenTelekomCloud. The configuration includes setting up a VPC, CCE, DNS, Load Balancer, SWR, and other necessary resources.\n\n## Prerequisites\n\n- Terraform \u003e= 0.12\n- OpenTelekomCloud account\n- Access to the OpenTelekomCloud API\n\n## Project Structure\n\n- `stages/development/main.tf`: Main Terraform configuration file for the development stage.\n- `modules/`: Directory containing reusable Terraform modules.\n\n## Configuration\n1. Define the variables in a `variables.tf` file.\n2. Reference these variables in the `provider` block.\n3. Add a `.gitignore` file to exclude the `terraform.tfvars` file from being committed.\n\n### Step-by-Step Plan:\n1. Create a `variables.tf` file to define the variables.\n2. Modify the `provider` block to use these variables.\n3. Create a `terraform.tfvars` file to set the values for these variables.\n4. Add a `.gitignore` file to exclude the `terraform.tfvars` file.\n\n### Code:\n\n#### `variables.tf`\n```terraform ```\nThe folowwed variables need to be set in your Terraform configuration:\n```\nvariable \"user_name\" {\n  type        = string\n  description = \"OpenTelekomCloud user name.\"\n}\n\nvariable \"password\" {\n  type        = string\n  description = \"OpenTelekomCloud password.\"\n}\n\nvariable \"domain_name\" {\n  type        = string\n  description = \"OpenTelekomCloud domain name.\"\n}\n\nvariable \"tenant_name\" {\n  type        = string\n  description = \"OpenTelekomCloud tenant name.\"\n}\n```\nInstead of using the variables.tf file, you can use the terraform.tfvars file to set the variables or insert the variables directly into the console. (at your own risk)\nyou can read more about the variables.tf and tfvars files [here](https://developer.hashicorp.com/terraform/language/values/variables)\n\n\n#### `stages/development/main.tf`\n```terraform\nprovider \"opentelekomcloud\" {\n  user_name   = var.user_name\n  password    = var.password\n  domain_name = var.domain_name\n  tenant_name = var.tenant_name\n}\n```\n\n#### `terraform.tfvars`\n```hcl\nuser_name   = \"your_username\"\npassword    = \"your_password\"\ndomain_name = \"your_domain\"\ntenant_name = \"your_tenant\"\n```\n\n#### `.gitignore`\n```\nterraform.tfvars\n```\n\n### Variables\n\nThe following variables need to be set in your Terraform configuration:\n\n- `project_name`: Name of the project.\n- `stage_name`: Stage name (e.g., dev, prod).\n- `cidr`: CIDR block for the VPC.\n- `node_flavor`: Flavor ID for the CCE nodes.\n- `tags`: Tags to apply to the resources.\n- `allowed_ip`: Allowed IP addresses for access control.\n- `region`: Region for the resources.\n\n### Example\n\nHere is an example of how to set the variables in a `terraform.tfvars` file:\n\n```hcl\nproject_name  = \"your_project\"\nstage_name    = \"dev\"\ncidr          = \"10.0.0.0/16\"\nnode_flavor   = \"s2.large.2\"\ntags          = { \"env\" = \"dev\" }\nallowed_ip    = [\"0.0.0.0/0\"]\nregion        = \"eu-de\"\n```\n### Running the Configuration\nFirst, you need to  to be in the ```stages/development```  directory.\ninitialize the Terraform configuration by running the following command:\n```shell\nterraform init\n```\n\n\nThen, you can ethe apply or view the planed configuration by running the following command:\nfor view the planed configuration and changes ran the command below:\\\n```shell\nbash terraform plan\n```\nyou can also run the following command to apply the configuration:\n```shell\nbash terraform apply\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirbelelti%2Fotc_terraform_cloud_configuration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnirbelelti%2Fotc_terraform_cloud_configuration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnirbelelti%2Fotc_terraform_cloud_configuration/lists"}