{"id":19289636,"url":"https://github.com/yingding/iac-example","last_synced_at":"2026-03-02T05:06:43.891Z","repository":{"id":218369479,"uuid":"746227397","full_name":"yingding/IaC-example","owner":"yingding","description":"examples of using terraform for multi cloud IaC","archived":false,"fork":false,"pushed_at":"2024-05-29T11:35:22.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-23T23:43:14.268Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yingding.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":"2024-01-21T13:03:34.000Z","updated_at":"2024-05-29T11:35:26.000Z","dependencies_parsed_at":"2024-01-21T15:26:24.568Z","dependency_job_id":"d391af37-2a46-4488-adbc-b2271ac32612","html_url":"https://github.com/yingding/IaC-example","commit_stats":null,"previous_names":["yingding/iac-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yingding/IaC-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yingding%2FIaC-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yingding%2FIaC-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yingding%2FIaC-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yingding%2FIaC-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yingding","download_url":"https://codeload.github.com/yingding/IaC-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yingding%2FIaC-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29993160,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-09T22:16:32.649Z","updated_at":"2026-03-02T05:06:43.854Z","avatar_url":"https://github.com/yingding.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IaC-example\nAzure examples of using terraform for multi cloud IaC\n\nThis repository contains terraform code for Azure Cloud with Azure Provider to create:\n* Azure ML Studio workspace\n* Storage Account with \n    * Blob Storage\n    * File Share\n* Azure ML Datastore (Azure Blobstore)\n\n## Install terraform on MacOSX\n```shell\nbrew update\nbrew install terraform\nbrew upgrade\n```\n\n```shell\nbrew update \u0026\u0026 brew upgrade terraform \u0026\u0026 brew cleanup terraform\n```\n\n```shell\nbrew cleanup --dry-run\n# brew cleanup -n\nbrew cleanup\n```\n* https://stackoverflow.com/questions/65502748/why-doesnt-brew-cleanup-or-brew-cleanup-n-show-any-output\n\n\n## Setting up Terraform project\n.tfstate file holds all the configurations of the cloud infrastructure that has been created.\nIt should never be uploaded to the git repository\n\n### .gitignore the .tfstate\n\n# Reference\n* Setup VS code with HCL project: https://medium.com/nerd-for-tech/how-to-auto-format-hcl-terraform-code-in-visual-studio-code-6fa0e7afbb5e\n* .tfstate Terraform state file: https://linumary.medium.com/terraform-and-its-state-file-concept-d411d48fefbc\n\n## Install terraform on Mac\n```shell\nbrew list terraform\nbrew install terraform\nbrew upgrade terraform\n```\nReference:\n* https://developer.hashicorp.com/terraform/tutorials/azure-get-started/azure-build\n\n## Install Azure CLI on Mac\n```shell\nbrew update \u0026\u0026 brew install azure-cli\naz login\n```\nReference:\n* https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-macos\n* https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/service_principal_client_secret\n\n## init terraform\n```shell\n# init terraform state\nterraform init\n# plan the change shall be made to your cloud resources\nterraform plan\n# executed planed changes defined by HCL \nterraform apply\n```\n\n## Apply terraform\nterraform will take the variables from either `terraform.tfvars` or `.auto.tfvars`\n\nOtherwise, we need to define the .tfvars file during the terraform apply.\n```shell\nterraform apply -var-file=\"const.tfvars\"\n```\n\n## Visualize your terraform plan\n```shell\nterraform graph -type=plan | dot -Tpng -o graph.png\n```\n\n## Upgrade to new provider version\n```shell\nterraform init -upgrade\n```\n* https://developer.hashicorp.com/terraform/language/expressions/version-constraints\n\n## Destroy\n```shell\nterraform plan -destroy\nterraform apply -destroy\n```\n* https://developer.hashicorp.com/terraform/cli/commands/destroy\n\n## Terraform Modules\n* terraform modules: https://developer.hashicorp.com/terraform/language/modules\n* developing module: https://developer.hashicorp.com/terraform/language/modules/develop\n\n## Learning Source\n* Get started with Azure: https://developer.hashicorp.com/terraform/tutorials/azure-get-started\n* Get started with GCP: https://developer.hashicorp.com/terraform/tutorials/gcp-get-started\n* Visualize your terraform plan: https://medium.com/vmacwrites/tools-to-visualize-your-terraform-plan-d421c6255f9f\n* create Azure ML Compute Instance: https://github.com/hashicorp/terraform-provider-azurerm/issues/20973#issuecomment-2093776017\n* see principle in application from microsoft entra admin center\n* Multi az tenant application: https://stackoverflow.com/questions/74558631/terraform-authenticating-to-azure-by-service-principal-and-client-secret\n* Structure Terraform project https://spacelift.io/blog/terraform-files","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyingding%2Fiac-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyingding%2Fiac-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyingding%2Fiac-example/lists"}