Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Created March 28, 2021 03:01
Show Gist options
  • Select an option

  • Save KyMidd/7d3a40d39cf89d3dabea8670b04230fc to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/7d3a40d39cf89d3dabea8670b04230fc to your computer and use it in GitHub Desktop.
while IFS= read -r line; do
# Set approvalRequired
approvalRequired="notSure"
# Prepare resource path, e.g.: module.networking.aws_security_group_rule.Inbound_192Slash16_PermitAll
resource_path=$(echo $line | cut -d " " -f 2)
# Prepare resource type, e.g.: aws_security_group_rule
resource_type=$(echo $resource_path | rev | cut -d "." -f 2 | rev)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment