Open in app

Sign In

Write

Sign In

Nicolai Antiferov
Nicolai Antiferov

139 Followers

Home

About

Pinned

Fix ‘Objects have changed outside of Terraform’ with invoke wrapper

Note: From v1.2 (not released yet), this issue probably shouldn’t be that bad, comment — Last May Hashicorp introduced new feature in path version (0.15.4). And while on paper it looked nice, in reality it became one hell of a mess unfortunately. And since it was available in soon released v1.x, they said that even option to disable it won’t be added to not break…

Terraform

3 min read

Terraform

3 min read


Pinned

Random task execution withAnsible

It might look very simple, but I haven’t found it anywhere already described. So I wanted to execute some task in Ansible playbook not always, with random decision. And the solution is simple as pie: tasks: - name: Random task debug: msg: 'This task runs randomly' when: 10 | random | bool So here we use Random Number Filter with bool filter. It will generate numbers from 0 to 10, and thanks to bool filter, the result will be true only if value will be equal to 1. According to this, this task will be executed once in 10 runs. You can change the number, to get more or less probability.

Ansible

1 min read

Ansible

1 min read


Pinned

PromQL / How to return 0 instead of ‘no data’

Another short note. I found the answer in the middle of issue on Grafana GitHub and decided to make a memo. So I wanted to show in ‘single stat’ panel number of alets. But when there is no alerts, my request returns no data , which is not so informative. …

Prometheus

1 min read

Prometheus

1 min read


Published in

AWS Tip

·Pinned

Terraform v0.14+ dependency lock file (.terraform.lock.hcl) gotchas

UPD: 1, 2 are still relevant for newer versions (0.15, 1.x) — In December 2020 a new version of Terraform was released — v0.14. Along with many new things there was released a pretty nice feature — Provider Dependency Lockfile. …

Terraform

2 min read

Terraform

2 min read


Feb 4

Summary “Five Steps to Make Your Go Code Faster & More Efficient” FOSDEM 04.02.2023 by Bartek Plotka

Summary of the ‘Efficient Go’ Book. Story from Thanos project inspired it. First Thanos compactor was implemented not very optimized and with increased usage in different companies issues started arising with memory overuse, OOM, etc. Solutions: Add an option to use less memory. …

2 min read

Summary “Five Steps to Make Your Go Code Faster & More Efficient” FOSDEM 04.02.2023
Summary “Five Steps to Make Your Go Code Faster & More Efficient” FOSDEM 04.02.2023

2 min read


Feb 4

Summary “Squeezing a go function” FOSDEM 04.02.2023 by Jesús Espino, Mattermost

Optimize what you need when you need. Don’t over optimize. Don’t guess. Measure everything and optimize based on data. Benchmarks go benchmark — built in with go, like tests. “go test -bench .” It’s possible to report allocations from benchmark context. Profiling Usually first you profile and then benchmark parts. But in…

1 min read

Summary “Squeezing a go function” FOSDEM 04.02.2023 by Jesús Espino, Mattermost
Summary “Squeezing a go function” FOSDEM 04.02.2023 by Jesús Espino, Mattermost

1 min read


Feb 4

Summary “Recipes for reducing cognitive load” FOSDEM 04.02.2023 by Federico Paolinelli

Based on experience of reviewing PRs in metallb project. The less cognitive load, the less you spend energy. The simpler is solution, the less is load. Line of sight One line of happy path and next ident for exceptions. “Align to the left” There are different ways to achieve this. …

2 min read

2 min read


Jan 22

How to check only changed in CI

When you have a lot of code in the repository, like in monorepo case, it became very important to check in CI only things that changed in PR (pull request). Otherwise, CI will be slow and potentially broke on not your changes, which could ruin DevEx experience. If you’re using…

Python

2 min read

Python

2 min read


Oct 29, 2022

How CODEOWNERS really work

All modern code collaboration systems support CODEOWNERS. This is a file that stored in your repository and defines which team is responsible for which parts of code. It helps split responsibility between teams and together with review ensures that all changes are ok. This article is based on GitHub, but…

Github

2 min read

Github

2 min read


May 31, 2022

Exclude ‘Objects have changed outside of Terraform’ from GitHub Actions output

Ad-hoc fix for annoying Terraform “feature” in GH actions context — As I described in previous article, in terraform 0.15.4 HashiCorp added new thing which shows you what changed from previous apply. Sounds nice to see drift in infrastructure before apply, but in reality depending on providers/resources you’re using, it often ends in huge amount of output in terminal window, which…

Terraform

2 min read

Terraform

2 min read

Nicolai Antiferov

Nicolai Antiferov

139 Followers

Engineer ¯\_(ツ)_/¯

Following
  • George Shuklin

    George Shuklin

  • Artem Yakimenko

    Artem Yakimenko

  • David Przybilla

    David Przybilla

  • Anton Babenko

    Anton Babenko

  • Yan Cui

    Yan Cui

See all (89)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech

Teams