threads / discuss / 52492

IaC monitoring with Git

Subject: IaC monitoring with Git

## tl;dr

2 messages between Dec 19, 2019 and Dec 20, 2019.

replies: 1people: 2as markdown or json

Christopher Díaz Riveros· Dec 19, 2019, 21:30 UTC · lore
Hi all,

I'm trying to figure out a git based solution for a use case we have at my work place. We use IaC for our infrastructure, when we want to create new instances/accounts/etc we add a certain set of tags in our files to indicate some key aspects of the instances/accounts.

There is one specific tag, owner, which we use to set a contact point in case we need someone to make a change. The main issue with this is that you can set the tag to anything, valid or not, or it could become invalid over time.

Would a valid approach for first issue be to set a pre-receive hook in our repositories so that before the PR is merged, we check validity of the contact email, a.k.a. owner tag (we assume validity means that email exist), maybe via ldapsearch or another command like this?

For the second case, I'd assume git does not by default monitor contents of files on a regular basis, does anybody have faced this issue and successfully found a way to periodically check contents and trigger alerts on repositories based on same case (email becomes invalid, then trigger alert)?

Thanks a lot for your help!
Christian Couder· Dec 20, 2019, 09:29 UTC · re: Christopher Díaz Riveros · lore

Re: IaC monitoring with Git

Hi,

On Thu, Dec 19, 2019 at 10:31 PM Christopher Díaz Riveros <christopher.diaz.riv@gmail.com> wrote:

> Would a valid approach for first issue be to set a pre-receive hook in
> our repositories so that before the PR is merged, we check validity of
> the contact email, a.k.a. owner tag (we assume validity means that
> email exist), maybe via ldapsearch or another command like this?

You might find it easier and simpler to use CI tools like Travis CI, Circle CI, GitLab pipelines, GitHub Actions, and so on to run the checks instead of using a hook.

Show 5 quoted lines
> For the second case, I'd assume git does not by default monitor
> contents of files on a regular basis, does anybody have faced this
> issue and successfully found a way to periodically check contents and
> trigger alerts on repositories based on same case (email becomes
> invalid, then trigger alert)?
Many CI tools let you schedule jobs regularly.

Best, Christian.

← back to recent threads