본문으로 건너뛰기
cccskills
무료GitHub에 공개

infrastructure-as-code

Infrastructure as Code with Terraform, Pulumi, and Ansible. Use when the user asks about provisioning cloud infrastructure, writing Terraform configs, managing infrastructure state, or automating server configuration.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ProjectZeroDays/FreeAI_AI_Inference_Workstation스타 5(GitHub 5 + cccskills 0)
연동 도구Terraform

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md5.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Infrastructure as Code

Terraform Basics

Provider Configuration

# main.tf
terraform {
  required_version = ">= 1.0"
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 5.0"
    }
  }

  backend "s3" {
    bucket = "my-terraform-state"
    key    = "prod/terraform.tfstate"
    region = "us-east-1"
  }
}

provider "aws" {
  region = var.aws_region
}

Variables and Outputs

# variables.tf
variable "aws_region" {
  type    = string
  default = "us-east-1"
}

variable "environment" {
  type = string
  validation {
    condition     = contains(["dev", "staging", "prod"], var.environment)
    error_message = "Must be dev, staging, or prod."
  }
}

variable "instance_type" {
  type    = string
  default = "t3.micro"
}

# outputs.tf
output "instance_ip" {
  value = aws_instance.web.public_ip
}

output "db_endpoint" {
  value = aws_db_instance.main.endpoint
}

EC2 Instance

resource "aws_instance" "web" {
  ami           = "ami-0c55b159cbfafe1f0"
  instance_type = var.instance_type
  
  tags = {
    Name        = "web-server"
    Environment = var.environment
  }

  vpc_security_group_ids = [aws_security_group.web.id]
  subnet_id              = aws_subnet.public.id
}

VPC

resource "aws_vpc" "main" {
  cidr_block           = "10.0.0.0/16"
  enable_dns_hostnames = true
  enable_dns_support   = true

  tags = {
    Name = "main-vpc"
  }
}

resource "aws_subnet" "public" {
  vpc_id                  = aws_vpc.main.id
  cidr_block              = "10.0.1.0/24"
  availability_zone       = "${var.aws_region}a"
  map_public_ip_on_launch = true

  tags = {
    Name = "public-subnet"
  }
}

resource "aws_internet_gateway" "main" {
  vpc_id = aws_vpc.main.id
}

Security Group

resource "aws_security_group" "web" {
  name        = "web-sg"
  description = "Security group for web servers"
  vpc_id      = aws_vpc.main.id

  ingress {
    from_port   = 443
    to_port     = 443
    protocol    = "tcp"
    cidr_blocks = ["0.0.0.0/0"]
  }

  ingress {
    from_port   = 80
    to_port     = 80
    protocol    = "tcp"
    cidr_blocks = ["0.0.0.0/0"]
  }

  egress {
    from_port   = 0
    to_port     = 0
    protocol    = "-1"
    cidr_blocks = ["0.0.0.0/0"]
  }
}

RDS Database

resource "aws_db_instance" "main" {
  identifier     = "myapp-db"
  engine         = "postgres"
  engine_version = "16"
  instance_class = "db.t3.micro"

  allocated_storage     = 20
  max_allocated_storage = 100

  db_name  = "myapp"
  username = var.db_username
  password = var.db_password

  backup_retention_period = 7
  multi_az               = true
  storage_encrypted      = true

  vpc_security_group_ids = [aws_security_group.db.id]
  db_subnet_group_name   = aws_db_subnet_group.main.name
}

Modules

# modules/ecs-service/main.tf
variable "name" {}
variable "image" {}
variable "port" {}
variable "cpu" {}
variable "memory" {}

resource "aws_ecs_service" "this" {
  name            = var.name
  cluster         = var.cluster_id
  task_definition = aws_ecs_task_definition.this.arn
  desired_count   = 2

  load_balancer {
    target_group_arn = var.target_group_arn
    container_name   = var.name
    container_port   = var.port
  }
}

output "service_name" {
  value = aws_ecs_service.this.name
}

# Usage
module "api_service" {
  source = "./modules/ecs-service"
  
  name            = "api"
  image           = "123456.dkr.ecr.us-east-1.amazonaws.com/api:latest"
  port            = 3000
  cpu             = 256
  memory          = 512
  cluster_id      = aws_ecs_cluster.main.id
  target_group_arn = aws_lb_target_group.api.arn
}

Workspaces

# Create workspace for environment
terraform workspace new dev
terraform workspace new staging
terraform workspace new prod

# Switch workspace
terraform workspace select dev

# List workspaces
terraform workspace list

Terraform Commands

# Initialize
terraform init

# Plan changes
terraform plan -out=tfplan

# Apply changes
terraform apply tfplan

# Destroy resources
terraform destroy

# Format code
terraform fmt -recursive

# Validate
terraform validate

# Show state
terraform show

# Import existing resource
terraform import aws_instance.web i-1234567890abcdef0

Ansible Playbook

# playbook.yml
---
- hosts: webservers
  become: yes
  vars:
    app_version: "1.2.3"
    app_port: 3000

  tasks:
    - name: Install dependencies
      apt:
        name:
          - nginx
          - nodejs
          - npm
        state: present
        update_cache: yes

    - name: Copy nginx config
      template:
        src: templates/nginx.conf.j2
        dest: /etc/nginx/sites-available/myapp
      notify: Restart nginx

    - name: Deploy application
      git:
        repo: https://github.com/myorg/myapp.git
        dest: /opt/myapp
        version: "v{{ app_version }}"
      notify: Restart app

    - name: Install npm dependencies
      npm:
        path: /opt/myapp
        state: present

    - name: Start application
      systemd:
        name: myapp
        state: started
        enabled: yes

  handlers:
    - name: Restart nginx
      service:
        name: nginx
        state: restarted

    - name: Restart app
      systemd:
        name: myapp
        state: restarted

Best Practices

  1. Store state remotely (S3 + DynamoDB locking)
  2. Use workspaces for environments
  3. Version your infrastructure code
  4. Use modules for reusable components
  5. Plan before applying
  6. Tag all resources
  7. Use variables for configurable values
  8. Keep secrets out of code (use vault/KMS)
  9. Implement drift detection
  10. Document your infrastructure

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

WCAG compliance, accessibility testing, ARIA patterns, screen reader optimization, and keyboard navigation. Use when the user asks about making apps accessible, WCAG guidelines, ARIA attributes, screen reader support, or accessibility audits.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ProjectZeroDays/FreeAI_AI_Inference_Workstation52026년 9월 4일 업데이트

ace-music

무료

Generate AI music using ACE-Step 1.5 via ACE Music's free API. Use when the user asks to create, generate, or compose music, songs, beats, instrumentals, or audio tracks. Supports lyrics, style prompts, covers, and repainting. Free API, no cost.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ProjectZeroDays/FreeAI_AI_Inference_Workstation52026년 9월 4일 업데이트

A continuously adaptive skill suite that empowers Clawdbot to act as a versatile coder, business analyst, project manager, web developer, data analyst, and NAS metadata scraper. It intelligently discovers free resources, adapts to user context, and ensures reliable, proven guidance across multiple domains.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ProjectZeroDays/FreeAI_AI_Inference_Workstation52026년 9월 4일 업데이트

High-fidelity intelligence gathering and data assimilation. Focuses on synthesizing fragmented data into a comprehensive target operational picture.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ProjectZeroDays/FreeAI_AI_Inference_Workstation52026년 9월 4일 업데이트

Use when Codex needs proactive task queues, heartbeat routines, scheduled follow-up, or continuous work loops instead of waiting for prompts.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ProjectZeroDays/FreeAI_AI_Inference_Workstation52026년 9월 4일 업데이트

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ProjectZeroDays/FreeAI_AI_Inference_Workstation52026년 9월 4일 업데이트

ProjectZeroDays의 스킬 모두 보기

이 스킬의 문제 신고