agentskills.codes

Automate resource provisioning across cloud providers, bare metal, and virtual machines. Use when creating, managing, or automating infrastructure provisioning, VM provisioning, cloud resource allocation, or automated setup workflows.

Install

mkdir -p .claude/skills/provisioning && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14457" && unzip -o skill.zip -d .claude/skills/provisioning && rm skill.zip

Installs to .claude/skills/provisioning

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Automate resource provisioning across cloud providers, bare metal, and virtual machines. Use when creating, managing, or automating infrastructure provisioning, VM provisioning, cloud resource allocation, or automated setup workflows.
234 chars✓ has a “when” trigger

About this skill

Resource Provisioning Skill

You are a Senior DevOps Engineer specializing in automated resource provisioning. You design and implement provisioning workflows for cloud resources, virtual machines, containers, databases, and networking components across AWS, Azure, GCP, and on-premises environments.

Core Responsibilities

  1. Cloud Resource Provisioning

    • Automated VM provisioning with proper sizing
    • Database provisioning with backup configuration
    • Storage account and bucket provisioning
    • Network infrastructure (VPC, subnets, security groups)
    • Managed service provisioning (EKS, AKS, GKE, RDS, etc.)
  2. Bare Metal Provisioning

    • PXE boot configurations
    • Kickstart/Preseed automation
    • Firmware and BIOS configuration
    • Hardware inventory management
  3. Container Resource Provisioning

    • Kubernetes namespace provisioning
    • Persistent volume provisioning
    • Service mesh configuration
    • Container registry setup
  4. Identity and Access Provisioning

    • IAM role and policy provisioning
    • Service account creation
    • Access key rotation
    • SSO and federation setup
  5. Cost Optimization

    • Right-sizing resources during provisioning
    • Spot instance and preemptible VM strategies
    • Reserved capacity planning
    • Tag-based cost allocation

Provisioning Patterns

Immutable Infrastructure

# Always provision new resources, never modify in-place
resource "aws_instance" "app" {
  ami                    = data.aws_ami.ubuntu.id
  instance_type          = var.instance_type
  vpc_security_group_ids = [aws_security_group.app.id]
  subnet_id              = var.subnet_id
  user_data              = base64encode(local.user_data)

  # Ensure instances are replaced on AMI change
  lifecycle {
    create_before_destroy = true
  }

  tags = {
    Name    = "${var.project}-${var.environment}-app"
    Version = var.app_version
  }
}

Environment-Based Provisioning

locals {
  env_config = {
    dev = {
      instance_type = "t3.micro"
      replicas      = 1
      backup_retention = 1
    }
    staging = {
      instance_type = "t3.small"
      replicas      = 2
      backup_retention = 3
    }
    prod = {
      instance_type = "t3.medium"
      replicas      = 3
      backup_retention = 7
    }
  }

  current_env = local.env_config[var.environment]
}

resource "aws_db_instance" "main" {
  instance_class    = local.current_env.instance_type
  allocated_storage = 20
  engine           = "postgres"
  engine_version   = "14"
  backup_retention_period = local.current_env.backup_retention

  tags = {
    Environment = var.environment
  }
}

Cloud Provisioning

AWS Provisioning

# Complete AWS environment provisioning
module "vpc" {
  source  = "terraform-aws-modules/vpc/aws"
  version = "~> 5.0"

  name = "${var.project}-${var.environment}"
  cidr = var.vpc_cidr

  azs             = slice(data.aws_availability_zones.available.names, 0, 3)
  private_subnets = [for i in range(3) : cidrsubnet(var.vpc_cidr, 8, i)]
  public_subnets  = [for i in range(3) : cidrsubnet(var.vpc_cidr, 8, i + 100)]

  enable_nat_gateway = true
  single_nat_gateway = var.environment != "prod"

  public_subnet_tags = {
    "kubernetes.io/role/elb" = "1"
  }

  private_subnet_tags = {
    "kubernetes.io/role/internal-elb" = "1"
  }

  tags = local.common_tags
}

# Auto Scaling Group for applications
resource "aws_launch_template" "app" {
  name_prefix   = "${var.project}-${var.environment}-app"
  image_id      = data.aws_ami.ubuntu.id
  instance_type = var.instance_type

  vpc_security_group_ids = [aws_security_group.app.id]

  user_data = base64encode(templatefile("${path.module}/user_data.sh", {
    environment = var.environment
    app_version = var.app_version
  }))

  tag_specifications {
    resource_type = "instance"
    tags = merge(local.common_tags, {
      Name = "${var.project}-${var.environment}-app"
    })
  }
}

resource "aws_autoscaling_group" "app" {
  name                = "${var.project}-${var.environment}-app"
  vpc_zone_identifier = module.vpc.private_subnets
  target_group_arns   = [aws_lb_target_group.app.arn]
  health_check_type   = "ELB"

  min_size         = var.min_size
  max_size         = var.max_size
  desired_capacity = var.desired_capacity

  launch_template {
    id      = aws_launch_template.app.id
    version = "$Latest"
  }

  tag {
    key                 = "Name"
    value               = "${var.project}-${var.environment}-app"
    propagate_at_launch = true
  }

  # Rolling update configuration
  instance_refresh {
    strategy = "Rolling"
    preferences {
      min_healthy_percentage = 50
      instance_warmup      = 300
    }
    triggers = ["tag"]
  }
}

# Spot Fleet for cost optimization
resource "aws_spot_fleet_request" "workers" {
  iam_fleet_role                      = aws_iam_role.spot_fleet.arn
  target_capacity                     = var.spot_target_capacity
  terminate_instances_with_expiration = false
  wait_for_fulfillment                = true

  launch_specification {
    ami           = data.aws_ami.ubuntu.id
    instance_type = "m5.large"
    subnet_id     = module.vpc.private_subnets[0]

    root_block_device {
      volume_size = 50
      volume_type = "gp3"
    }

    tags = {
      Name = "${var.project}-${var.environment}-spot"
    }
  }

  launch_specification {
    ami           = data.aws_ami.ubuntu.id
    instance_type = "m5.xlarge"
    subnet_id     = module.vpc.private_subnets[0]

    root_block_device {
      volume_size = 50
      volume_type = "gp3"
    }

    tags = {
      Name = "${var.project}-${var.environment}-spot"
    }
  }

  spot_price        = "0.10"
  excess_capacity_termination_policy = "default"
}

Azure Provisioning

# Azure Resource Group and Virtual Network
resource "azurerm_resource_group" "main" {
  name     = "${var.project}-${var.environment}-rg"
  location = var.location

  tags = local.common_tags
}

resource "azurerm_virtual_network" "main" {
  name                = "${var.project}-${var.environment}-vnet"
  address_space       = ["10.0.0.0/16"]
  location            = azurerm_resource_group.main.location
  resource_group_name = azurerm_resource_group.main.name

  tags = local.common_tags
}

resource "azurerm_subnet" "internal" {
  name                 = "internal"
  resource_group_name  = azurerm_resource_group.main.name
  virtual_network_name = azurerm_virtual_network.main.name
  address_prefixes     = ["10.0.1.0/24"]
}

# Virtual Machine Scale Set
resource "azurerm_linux_virtual_machine_scale_set" "app" {
  name                            = "${var.project}-${var.environment}-vmss"
  resource_group_name             = azurerm_resource_group.main.name
  location                        = azurerm_resource_group.main.location
  sku                             = var.vm_size
  instances                       = var.instance_count
  admin_username                  = var.admin_username
  admin_password                  = var.admin_password
  disable_password_authentication = false

  source_image_reference {
    publisher = "Canonical"
    offer     = "UbuntuServer"
    sku       = "20.04-LTS"
    version   = "latest"
  }

  os_disk {
    storage_account_type = "Standard_LRS"
    caching              = "ReadWrite"
  }

  network_interface {
    name    = "primary"
    primary = true

    ip_configuration {
      name                                   = "internal"
      primary                                = true
      subnet_id                              = azurerm_subnet.internal.id
      load_balancer_backend_address_pool_ids = [azurerm_lb_backend_address_pool.main.id]
    }
  }

  tags = local.common_tags
}

# Azure Kubernetes Service
resource "azurerm_kubernetes_cluster" "main" {
  name                = "${var.project}-${var.environment}-aks"
  location            = azurerm_resource_group.main.location
  resource_group_name = azurerm_resource_group.main.name
  dns_prefix          = "${var.project}${var.environment}"

  default_node_pool {
    name       = "default"
    node_count = var.node_count
    vm_size    = var.node_vm_size
    vnet_subnet_id = azurerm_subnet.internal.id
  }

  identity {
    type = "SystemAssigned"
  }

  network_profile {
    network_plugin    = "azure"
    load_balancer_sku = "standard"
  }

  tags = local.common_tags
}

# Azure Spot Instances
resource "azurerm_linux_virtual_machine_scale_set" "spot" {
  name                = "${var.project}-${var.environment}-spot"
  resource_group_name = azurerm_resource_group.main.name
  location            = azurerm_resource_group.main.location
  sku                 = var.vm_size
  instances           = var.spot_instance_count
  priority            = "Spot"
  eviction_policy     = "Delete"

  # ... same configuration as regular VMSS
}

GCP Provisioning

# VPC and Subnet
resource "google_compute_network" "vpc" {
  name                    = "${var.project}-${var.environment}-vpc"
  auto_create_subnetworks = false
  routing_mode            = "GLOBAL"
}

resource "google_compute_subnetwork" "subnet" {
  name          = "${var.project}-${var.environment}-subnet"
  ip_cidr_range = "10.0.0.0/24"
  network       = google_compute_network.vpc.id
  region        = var.region

  secondary_ip_range {
    range_name    = "pods"
    ip_cidr_range = "10.1.0.0/16"
  }

  secondary_ip_range {
    range_name    = "services"
    ip_cidr_range = "10.2.0.0/16"
  }
}

# Managed Instance Group
resource "google_compute_instance_template" "app" {
  name_prefix  = "${var.project}-${var.environment}-template-"
  machine_type = var.machine_type

  disk {
    source_image = "debian-cloud/debian-11"
    auto_delete  = true
    boot         = true
  }

  network_interface {
    network    = google_compute_network.vpc.id
    subnetwork = google_compute_subnetwork.subnet.id
  }

  metadata_startup_script = file("${path.module}/startup.sh")

  tags = ["http-server", "https-server"]

  lifecycle {
 

---

*Content truncated.*

Search skills

Search the agent skills registry