{"id":21884051,"url":"https://github.com/mongoexpuser/terraform-created-resources","last_synced_at":"2026-04-05T08:34:12.283Z","repository":{"id":134452965,"uuid":"255243963","full_name":"MongoExpUser/Terraform-Created-Resources","owner":"MongoExpUser","description":"Terraform module for creation of resources on public clouds platforms.","archived":false,"fork":false,"pushed_at":"2021-05-09T22:51:44.000Z","size":122,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-30T12:43:23.386Z","etag":null,"topics":["aws","bash","hcl","iac","linode","mongodb","nodejs"],"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/MongoExpUser.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":"2020-04-13T05:58:42.000Z","updated_at":"2024-07-28T10:56:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"8b16c2ff-9c9b-4527-8321-3a209f78be66","html_url":"https://github.com/MongoExpUser/Terraform-Created-Resources","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MongoExpUser/Terraform-Created-Resources","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoExpUser%2FTerraform-Created-Resources","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoExpUser%2FTerraform-Created-Resources/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoExpUser%2FTerraform-Created-Resources/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoExpUser%2FTerraform-Created-Resources/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MongoExpUser","download_url":"https://codeload.github.com/MongoExpUser/Terraform-Created-Resources/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoExpUser%2FTerraform-Created-Resources/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31430009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T08:13:15.228Z","status":"ssl_error","status_checked_at":"2026-04-05T08:13:11.839Z","response_time":75,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["aws","bash","hcl","iac","linode","mongodb","nodejs"],"created_at":"2024-11-28T10:12:06.415Z","updated_at":"2026-04-05T08:34:12.234Z","avatar_url":"https://github.com/MongoExpUser.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"#\n# Terraform-Created-Resources\n\n\u003cstrong\u003eTerraform module for creation of resources on public cloud platforms.\u003c/strong\u003e\n\u003cbr\u003e\n\nThe following public cloud platforms and resources are currently covered:\n1) \u003cstrong\u003e```AWS```\u003c/strong\u003e - EC2 and Lightsails instances (VMs) with Node.js and MongoDB installations. \u003cbr\u003e\n    Note 1: Node.js is installed on the the web server instance(s). \u003cbr\u003e\n    Note 2: Node.js and MongoDB are installed on the db server instance(s). \u003cbr\u003e\n    Note 3: Node.js installation can be disabled on the db server instance(s): \u003cbr\u003e\n            a) By setting the variable \u003cstrong\u003e```enable_web_server```\u003c/strong\u003e, in the \u003cstrong\u003e```init_mongodb_server.sh```\u003c/strong\u003e file to \u003cstrong\u003e```false```\u003c/strong\u003e. \u003cbr\u003e\n            b) See line \u003cstrong\u003e30\u003c/strong\u003e of \u003cstrong\u003e```init_mongodb_server.sh```\u003c/strong\u003e file.  \u003cbr\u003e\n2) \u003cstrong\u003e```Linode```\u003c/strong\u003e - Linode instances (VMs) with Node.js and MongoDB installations. \u003cbr\u003e\n    Note 1: Node.js and MongoDB are installed on the web server instance(s). \u003cbr\u003e\n    Note 2: MongoDB installation can be disabled on the web server instance(s): \u003cbr\u003e\n            a) By setting the variable, \u003cstrong\u003e```enable_mongodb_server```\u003c/strong\u003e, to \u003cstrong\u003e```false```\u003c/strong\u003e in the \u003cstrong\u003e```startup script```\u003c/strong\u003e \u003cbr\u003e\n            b) See line \u003cstrong\u003e122\u003c/strong\u003e of the \u003cstrong\u003e```main.tf```\u003c/strong\u003e file, where \u003cstrong\u003e```linode_stackscript_init```\u003c/strong\u003e is defined.\u003cbr\u003e\n\n\nThis repo is based on \u003cstrong\u003e```Terraform Version 0.14.4```\u003c/strong\u003e.\n\n## RUNNING MODULE\n\n### To run the module to create resources on ```AWS```:\n\n1) Save or download the start-up bash file(s) in the link(s) below to the current working directory (CWD): \u003cbr\u003e\n   a) https://raw.githubusercontent.com/MongoExpUser/Terraform-Created-Resources/master/init_web_server.sh \u003cbr\u003e\n   b) https://raw.githubusercontent.com/MongoExpUser/Terraform-Created-Resources/master/init_mongodb_server.sh \u003cbr\u003e\n\n2) Also, copy the following script into a file (base.tf) in the current working directory:\n\n```hcl\n# define credential variable(s) of provider(s)\nvariable \"aws_access_key\" {}\nvariable \"aws_secret_key\" {}\nvariable \"aws_region\" {}\nvariable \"create_aws_resources\" {default = 1}\n\n# define provider(s)\nprovider \"aws\" {\n  access_key = var.aws_access_key\n  secret_key = var.aws_secret_key\n  region     = var.aws_region\n}\n\n# create resource(s)\nmodule \"public_cloud_resources\" {\n  source = \"git::https://github.com/MongoExpUser/Terraform-Created-Resources.git\"\n}\n\n# create output(s)\noutput \"ec2_web_server_instances\" {\n  description = \"A list of all created EC2 web server instances\"\n  # the list contains key-value pairs of each instance's attributes\n  value = module.public_cloud_resources.aws_ec2_web_servers\n}\n\noutput \"ec2_db_server_instances\" {\n  description = \"A list of all created EC2 db server instances\"\n  # the list contains key-value pairs of each instance's attributes\n  value = module.public_cloud_resources.aws_ec2_db_servers\n}\n\noutput \"lightsail_web_server_instances\" {\n  description = \"A list of all created AWS lightsail web server instances\"\n  # the list contains key-value pairs of each instance's attributes\n  value = module.public_cloud_resources.aws_lightsail_web_servers\n}\n\noutput \"lightsail_db_server_instances\" {\n  description = \"A list of all created AWS lightsail db server instances\"\n  # the list contains key-value pairs of each instance's attributes\n  value = module.public_cloud_resources.aws_lightsail_db_servers\n}\n\noutput \"lightsail_web_server_static_ips\" {\n  description = \"A list of all created AWS lightsail static ips\"\n  # the list contains key-value pairs of each instance's attributes\n  value = module.public_cloud_resources.aws_lightsail_web_server_static_ips\n}\n\noutput \"lightsail_db_server_static_ips\" {\n  description = \"A list of all created AWS lightsail static ips\"\n  # the list contains key-value pairs of each instance's attributes\n  value = module.public_cloud_resources.aws_lightsail_db_server_static_ips\n}\n\n```\n\n\n3) Finally, execute the module from the base file (base.tf) in the current working directory (CWD) by typing the following commands at the prompt (assuming running via \u003cstrong\u003e```bash```\u003c/strong\u003e  with \u003cstrong\u003e```sudo```\u003c/strong\u003e access):\n\n\n```bash\n  #1) run init\n  sudo terraform init\n  \n  #2) run terraform plan\n  sudo TF_VAR_aws_access_key=\"access-key-value\" \\\n       TF_VAR_aws_secret_key=\"secret-key-value\" \\\n       TF_VAR_aws_region=\"aws-region-value\" \\\n       terraform plan\n                                                                                    \n  #3) run terraform apply\n  sudo TF_VAR_aws_access_key=\"access-key-value\" \\\n      TF_VAR_aws_secret_key=\"secret-key-value\" \\\n      TF_VAR_aws_region=\"aws-region-value\" \\\n      terraform apply\n```\n\n\n\n### To run the module to create resources on ```Linode```:\n\n\n1) Copy the following script into a file (base.tf) in the current working directory:\n\n```hcl\n# define credential variable(s) of provider(s)\nvariable \"linode_token_value\" {}\nvariable \"create_linode_resources\" {default = 1}\n\n# define provider(s)\nprovider \"linode\" {\n  token = var.linode_token_value\n}\n\n# create resource(s)\nmodule \"public_cloud_resources\" {\n  source = \"git::https://github.com/MongoExpUser/Terraform-Created-Resources.git\"\n}\n\n# create outputs\noutput \"linode_sshkeys\" {\n  description = \"A list of all created linode_sshkeys\"\n  # the list contains key-value pairs of each linode_sshkey's attributes\n  value = module.public_cloud_resources.linode_sshkeys\n}\n\noutput \"linode_stackscripts\" {\n  description = \"A list of all created linode_stackscripts\"\n  # the list contains key-value pairs of each linode_stackscript's attributes\n  value =  module.public_cloud_resources.linode_stackscripts\n}\n\noutput \"linode_instance_web_servers\" {\n  description = \"A list of all created linode_instances\"\n  # the list contains key-value pairs of each linode_instance's attributes\n  value = module.public_cloud_resources.linode_instance_web_servers\n}\n\n```\n\n\n2) Then, execute the module from the base file (base.tf) in the current working directory (CWD) by typing the following commands at the prompt (assuming running via \u003cstrong\u003e```bash```\u003c/strong\u003e  with \u003cstrong\u003e```sudo```\u003c/strong\u003e access):\n\n\n```bash\n  #1) run init\n  sudo terraform init\n  \n  #2) run terraform plan\n  sudo TF_VAR_linode_token_value=\"linode-token-value\" terraform plan\n                                                                                    \n  #3) run terraform apply\n  sudo TF_VAR_linode_token_value=\"linode-token-value\" terraform apply\n```\n\n\n\n# License\n\nCopyright © 2015 - present. MongoExpUser\n\nLicensed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongoexpuser%2Fterraform-created-resources","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongoexpuser%2Fterraform-created-resources","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongoexpuser%2Fterraform-created-resources/lists"}