Terraform bash snippets

From UVOO Tech Wiki
Revision as of 03:10, 9 March 2024 by Busk (talk | contribs) (Created page with "``` sed -i -e '/backend "azurerm"/,/}/ { /resource_group_name/ { s/resource_group_name = .*/resource_group_name = "new-resource-group"/ } /key/!s/}/ resource_group_...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
sed -i -e '/backend "azurerm"/,/}/ {
  /resource_group_name/ {
    s/resource_group_name = .*/resource_group_name = "new-resource-group"/
  }
  /key/!s/}/  resource_group_name = "new-resource-group"\n&/
}' terraform.tf