Skip to content

Instantly share code, notes, and snippets.

View franzramadhan's full-sized avatar
🏠
Working from home

Frans Caisar Ramadhan franzramadhan

🏠
Working from home
View GitHub Profile
@franzramadhan
franzramadhan / example_local_file.tf
Created August 22, 2019 06:33 — forked from arnobroekhof/example_local_file.tf
Terraform 0.11.x loop through a map and create files with content based on a maps --> key, value
variable "object_list" {
type = "map"
default = {
content1 = "this is example content 1",
content2 = "this is example content 2"
}
}
resource "local_file" "local_files" {
count = "${length(var.object_list)}" # perform this action based on the amount of items in the map
@franzramadhan
franzramadhan / delete_git_submodule.md
Created July 22, 2019 03:30 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule