{"id":24173075,"url":"https://github.com/dmrhimali/terraform","last_synced_at":"2026-04-15T07:33:48.179Z","repository":{"id":270642590,"uuid":"911011152","full_name":"dmrhimali/terraform","owner":"dmrhimali","description":"Tutorial on how to create and run terraform scripts for providers aws and newrelic","archived":false,"fork":false,"pushed_at":"2025-01-02T03:48:31.000Z","size":21602,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T01:14:15.160Z","etag":null,"topics":["aws-batch","aws-cloudwatch","aws-emr","aws-glue","newrelic","spark","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmrhimali.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-01-02T03:29:50.000Z","updated_at":"2025-01-02T03:48:34.000Z","dependencies_parsed_at":"2025-01-02T04:39:20.911Z","dependency_job_id":null,"html_url":"https://github.com/dmrhimali/terraform","commit_stats":null,"previous_names":["dmrhimali/terraform"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmrhimali%2Fterraform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmrhimali%2Fterraform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmrhimali%2Fterraform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmrhimali%2Fterraform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmrhimali","download_url":"https://codeload.github.com/dmrhimali/terraform/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241509655,"owners_count":19974071,"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":["aws-batch","aws-cloudwatch","aws-emr","aws-glue","newrelic","spark","terraform"],"created_at":"2025-01-13T01:14:21.187Z","updated_at":"2025-10-18T10:46:23.669Z","avatar_url":"https://github.com/dmrhimali.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n\n\n## Terraform\n\nThis project contains multiple terraform sscripts:\n\n- [apm-newrelic-monitoring](apm-newrelic-monitoring)\n- [aws-batch](aws-batch)\n- [aws-emr-spark](aws-emr-spark)\n- [aws-glue](aws-glue)\n- [es-cloudwatch-monitoring](es-cloudwatch-monitoring)\n- [es-newrelic-monitoring](es-newrelic-monitoring)\n- \n\n\n## Gitlab pipeline to run terraform\n**gitlab pipeline**\n\n```yml\nimage: git.dmrh.com:4567/docker-images/terraform\n\nstages:\n- plan\n- apply\n\n.plan:\n  before_script:\n    - git clone https://ci_service:$CI_SERVICE_PASSWORD@bitbucket.dmrh.com/scm/far/terraform.git\n    - git clone https://gitlab+deploy-token-2:$CI_VARS_DEPLOY_TOKEN@git.dmrh.com/operations/amazon-machine-images/ci-variables.git\n    - source ci-variables/$env\n    - cd terraform/environments/$env\n    - echo \"Environment:\" $env\n    - echo \"Target to plan:\" $TARGET\n  script:\n    - terraform init\n    - terraform plan -target module.$TARGET -out=tfplan -lock=false -input=false\n  only:\n    variables:\n      - $TARGET\n  tags:\n      - docker\n      - ops\n\n.apply:\n  before_script:\n    - git clone https://ci_service:$CI_SERVICE_PASSWORD@bitbucket.dmrh.com/scm/far/terraform.git tmp\n    - git clone https://gitlab+deploy-token-2:$CI_VARS_DEPLOY_TOKEN@git.dmrh.com/operations/amazon-machine-images/ci-variables.git\n    - mv tmp/* terraform/*\n    - source ci-variables/$env\n    - cd terraform/environments/$env\n    - echo \"Environment:\" $env\n    - echo \"Applying Target:\" $TARGET\n  script:\n    - terraform apply tfplan\n  only:\n    variables:\n      - $TARGET\n  tags:\n      - docker\n      - ops\n\nLOCAL Plan:\n  extends: .plan\n  stage: plan\n  variables:\n    env: local\n  when: manual\n  artifacts:\n    expire_in: 1h\n    paths:\n      - terraform/environments/$env/.terraform\n      - terraform/environments/$env/tfplan\n\nLOCAL Apply:\n  extends: .apply\n  stage: apply\n  variables:\n    env: local\n  needs: [\"LOCAL Plan\"]\n  dependencies:\n    - LOCAL Plan\n  when: manual\n\nDEV Plan:\n  extends: .plan\n  stage: plan\n  variables:\n    env: dev\n  when: manual\n  artifacts:\n    expire_in: 1h\n    paths:\n      - terraform/environments/$env/.terraform\n      - terraform/environments/$env/tfplan\n\nDEV Apply:\n  extends: .apply\n  stage: apply\n  variables:\n    env: dev\n  needs: [\"DEV Plan\"]\n  dependencies:\n    - DEV Plan\n  when: manual\n\nQA Plan:\n  extends: .plan\n  stage: plan\n  variables:\n    env: qa\n  when: manual\n  artifacts:\n    expire_in: 1h\n    paths:\n      - terraform/environments/$env/.terraform\n      - terraform/environments/$env/tfplan\n\nQA Apply:\n  extends: .apply\n  stage: apply\n  variables:\n    env: qa\n  needs: [\"QA Plan\"]\n  dependencies:\n    - QA Plan\n  when: manual\n\n\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmrhimali%2Fterraform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmrhimali%2Fterraform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmrhimali%2Fterraform/lists"}