iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🔧

Exploring AI Coding as an Infrastructure Engineer

に公開

1. Objectives

  1. Attempt to create automation tools for current work tasks at home
  2. Try out AI coding
  3. Deepen understanding of Python coding

I took the challenges I felt during my actual work and turned them directly into personal verification themes.

2. Overview of the Automation Tool

I automated the process of creating firewall rules (FW punching).

  • Target FW: FortiGate only
  • Features: Bulk registration of objects and policies

To reduce accidents during operation, I prioritized the following points:

  • Pre-verification via Dry-run
  • Automatic backup before and after execution
  • Difference display for review purposes

Please refer to the README for details on usage, commands, and CSV specifications.
https://github.com/tenpa7188/fwctl

Note: This has only been verified in a home environment and is not used in production.
When using it, please understand the contents and verify it thoroughly beforehand.

3. Reflections

3.1 Regarding AI Coding

I was astonished by the excellence of AI, as I was able to build an automation tool using only prompts.
It made me feel that being able to use generative AI (especially AI coding) might now be an essential skill for an engineer, and I want to continue creating automation tools in the future.

Since the direction is determined by the prompt, I felt that rather than immediate implementation, consulting with the AI from the conceptual stage leads to a better outcome.

3.2 Learning Python Coding

The learning flow was mostly a repetition of the following:

  1. Have the AI generate code
  2. Review it
  3. Ask the AI about parts I don't understand
  4. Try changing values slightly

Even this alone deepened my understanding.
Since working code is generated immediately, it was easy to learn while watching how it actually operates.

While AI coding has evolved to this extent, I'm not sure if humans need to be able to code themselves. However, I believe it's necessary to know coding well enough to at least understand it. Understanding what the AI is doing and taking responsibility for what is created with AI—I believe this is the role of a human.

4. Conclusion

While experiencing the power of generative AI through AI coding, I also felt a sense of fear that my job as an engineer might disappear.
To survive in this rapidly changing era, I realized it is crucial to have a mindset of continuous daily updates, rather than just relying on past knowledge and experience.

Discussion