강의

멘토링

커뮤니티

BEST
Security & Network

/

Computer Security

Cloud Security Programming for Practical Use (AWS, Python, Terraform)

It is configured to allow you to learn programming languages (Python, Terraform) for the cloud. You can directly create and apply simple yet tedious repetitive tasks, track when and how you deployed, and implement your company's unique policies that specific solutions cannot address. Specifically, we will apply a security architecture using Terraform, the most popular IaC (Infrastructure as Code) application, and also proceed with creating an ultra-simple dashboard using Python!

(4.9) 52 reviews

653 learners

Level Basic

Course period Unlimited

  • rex
Python
Python
Terraform
Terraform
AWS
AWS
devsecops
devsecops
Python
Python
Terraform
Terraform
AWS
AWS
devsecops
devsecops
rex님의 프로필 이미지

Edited

Announcement of new features (Mocks) and major changes in Terraform 1.7

hello.

This is Kangmin Cheon, a cloud programming instructor who uses it in practice.

Terraform version 1.7 has been released. You can see the related announcement here .
There has been a bigger change (and more stressful) than I thought.

  1. The order in which modules are deleted after testing changes.

    1. existing

      1. Main state file

      2. Status files for each module (in reverse order)

      3. So when writing tests referencing modules, there is no dependency on resources loaded into the main state file.

    2. change

      1. Delete state files in reverse order of run blocks

      2. So don't rely on resources that get deleted early.

    3. A simple example

      1. image

      2. Previously, it was not possible to write like the above, but it is possible from 1.7.

  2. Mocks (in beta)

    1. Simply put, it is a function that defines and uses specific values without creating/deleting/referencing actual providers, resources, data, or modules.

    2. After looking into it in advance, it seems that if we simply create a mock data in a distributed or generated form and put it in, testing will be possible much faster than before.

    3. Examples are given below.

     # main.tftest.hcl mock_provider "aws" { override_data { target = module.credentials.data.aws_s3_object.data_bucket values = { body = "{\"username\":\"username\",\"password\":\"password\"}" } } } run "test" { assert { condition = jsondecode(local_file.credentials_json.content).username == "username" error_message = "incorrect username" } }
    1. You can create results from data blocks and quickly test them through the run block.

  3. Reviews for the 1.7 release

    1. I feel really bad that I changed such important logic in just one minor version. I apologize to those who watched my lecture and made it based on the previous deletion status...

    2. For the above reasons + since it is in beta, I plan to add more information about Mocks later when it becomes more mature and solid. However, I think it is right to share the released information anyway, so I am publishing this news.

thank you

Comment