flosell / iam-policy-json-to-terraform

Small tool to convert an IAM Policy in JSON format into a Terraform aws_iam_policy_document
https://flosell.github.io/iam-policy-json-to-terraform/
Apache License 2.0
774 stars 58 forks source link

Add auto-convert #38

Closed gordonbondon closed 2 years ago

gordonbondon commented 2 years ago

Fixes #26

This looks smth like this:

https://user-images.githubusercontent.com/9439689/139159710-ca43b9df-f468-4926-8466-177824117632.mov

One concern - this removes the counter logic. But it should be possible to manually trigger the counter in javascript handler. What do you think?

flosell commented 2 years ago

Hi @gordonbondon, looking good, thanks for that! Manually triggering the counter in the handler should be fine, according to the docs, what you are looking for is probably something like this:

window.goatcounter.count({
      path:  'convert-button-clicked',
      title: 'Convert-button was clicked',
      event: true,
})
gordonbondon commented 2 years ago

I've added the counter back.

flosell commented 2 years ago

Looking great, thanks for the contribution! 🚀