4337 links
  • Arnaud's links
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
    Type 1 or more characters for results.
    Links per page: 20 50 100
    page 1 / 1
    3 results tagged for x
    • HashiCorp Terraform 0.12 Preview: For and For-Each

      for and for_each

      • https://learn.hashicorp.com/tutorials/terraform/for-each?utm_source=WEBSITE&utm_medium=WEB_BLOG&utm_offer=ARTICLE_PAGE
      September 10, 2020 at 10:33:43 AM GMT+2 - permalink - archive.org - https://www.hashicorp.com/blog/hashicorp-terraform-0-12-preview-for-and-for-each
      for for_each terraform
    • Note: How to know which policy contains a specific action?
      Warning : this loop does a lot of call to aws api, use it with caution

      To know that I needed to list all policies and associated statements (for the default policy version)

      ```
      #!/bin/bash
      IFS=$'\n'
      for line in $(aws iam list-policies|jq '.Policies|.[]|[ .PolicyName, .Arn, .DefaultVersionId ]| @csv' -r|sed 's/","/ /g'|sed 's/"//g'); do
          name=$(echo $line|cut -d' ' -f1);
          arn=$(echo $line|cut -d' ' -f2);
          version=$(echo $line|cut -d' ' -f3);
          echo "$name"
          aws iam get-policy-version --policy-arn $arn --version-id $version
      done
      ```

      Put this in a script, redirect output to a file and go get grep!
      February 22, 2017 at 4:16:06 PM GMT+1 * - permalink - archive.org - https://links.infomee.fr/?bERNcg
      aws bash for foreach iam policy separator
    • Check incoming update from puppet forge

      Un petit script pour check si les modules ont de nouvelles version dispo (il faut jq)

      #!/bin/bash
      
      modules=$(puppet module list|grep '\(v[0-9]\.[0-9]\.[0-9]\)')
      
      IFS=$'\n'
      for line in $modules; do
          name=$(echo $line|cut -d' ' -f2)
          version=$(echo $line|grep -o '\(v[0-9]\.[0-9]\.[0-9]\)'|sed 's/v//')
          current_version=$(curl -s https://forgeapi.puppetlabs.com/v3/modules/${name}|jq '.current_release.version'|sed 's/"//g')
          if [[ $version == $current_version ]]; then
              echo "OK $name $version $current_version"
          else
              echo "OUTDATED $name $version $current_version"
          fi  
      done
      November 30, 2015 at 4:37:25 PM GMT+1 * - permalink - archive.org - https://links.infomee.fr/?6tdMVA
      bash for forge IFS loop module puppet
    Links per page: 20 50 100
    page 1 / 1
    Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation