While you can manually administer AWS, it is easier to do so with Terraform. Plus, it is best to follow Infrastructure-as-Code (IaC) practice.

You can find all the code snippets below (and more) in the following Git repository: https://github.com/whyn07m3/terraform-examples/tree/main/aws

CloudWatch + Simple Notification Service (SNS)

The configuration below will setup a CloudWatch billing alarm that will get triggered when estimated monthly charge goes over $10. When alarm gets triggered it will send an email to the specified email address. Before receiving any billing alarm emails, you will first have to confirm the subscription, which AWS will send you upon creating this subscription.

You can easily populate every new merge request with a default set of labels. They can still be removed later, if not needed, but it’s useful to have them pre-populated and remove the ones that are not needed, then having to remember their names.

It can be very useful in a team, members of which might not know certain labeling aspects of the project.

Keep in mind, though, the labels you are specifying in your merge request template must have already been created.

  • include is a global configuration key
  • include takes another YAML file and adds it to the current one
  • The current YAML file overwrites keys with the same name found in the “included” YAML file
  • Including other YAML files is mainly useful to import templates, common utilities and setups, as well as breaking up big YAML files into smaller sections
  • workflow is a global configuration key
  • It uses rules key to specify conditions for creating a pipeline

Animated example:
When a scheduled event is triggered, GitLab checks pipeline configuration. It sees global workflow key and that its first rule matches. Because the rule specifies to never execute the pipeline, no pipeline is created.

Roma Sychevskiy

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store