和官方环境进行对齐 #2
+104
-11
@@ -1,5 +1,19 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { defineConfig, type DefaultTheme } from 'vitepress';
|
||||
import sidebar from './sidebar.json' with { type: 'json' };
|
||||
import sidebarJson from './sidebar.json' with { type: 'json' };
|
||||
import sidebarEnJson from './sidebar.en.json' with { type: 'json' };
|
||||
|
||||
const rootDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||||
const srcDir = path.join(rootDir, 'docs');
|
||||
|
||||
// 中文侧边栏:迁移时由 Hugo 的菜单和权重生成,之后手工维护。
|
||||
const sidebar = sidebarJson as DefaultTheme.SidebarMulti;
|
||||
// 英文侧边栏:由 scripts/sync_en_from_upstream.py 根据 Pulumi 官方文档生成,不要手工修改。
|
||||
const sidebarEn = sidebarEnJson as DefaultTheme.SidebarMulti;
|
||||
|
||||
const EN_PREFIX = '/en';
|
||||
|
||||
const SITE_URL = 'https://pulumi.isharkfly.com/';
|
||||
const FORUM_URL = 'https://www.isharkfly.com';
|
||||
@@ -58,12 +72,75 @@ const zhSearchText = {
|
||||
},
|
||||
};
|
||||
|
||||
const enThemeText: DefaultTheme.Config = {
|
||||
outline: { level: [2, 3], label: 'On this page' },
|
||||
footer: {
|
||||
message: 'Content from the official Pulumi documentation (github.com/pulumi/docs).',
|
||||
copyright: `Copyright © 2021-${new Date().getFullYear()} iSharkFly.com`,
|
||||
},
|
||||
};
|
||||
|
||||
// 列出某个目录下的 .md 页面(相对路径);根目录下跳过 en、public。
|
||||
function listPages(dir: string, rel = ''): string[] {
|
||||
if (!fs.existsSync(dir))
|
||||
return [];
|
||||
return fs.readdirSync(dir, { withFileTypes: true }).flatMap(entry => {
|
||||
const entryRel = rel + entry.name;
|
||||
if (entry.isDirectory()) {
|
||||
if (!rel && ['en', 'public'].includes(entry.name))
|
||||
return [];
|
||||
return listPages(path.join(dir, entry.name), `${entryRel}/`);
|
||||
}
|
||||
return entry.name.endsWith('.md') ? [entryRel] : [];
|
||||
});
|
||||
}
|
||||
|
||||
const pagesByLanguage = {
|
||||
zh: listPages(srcDir),
|
||||
en: listPages(path.join(srcDir, 'en')),
|
||||
};
|
||||
|
||||
// https://vitepress.dev/reference/site-config
|
||||
export default defineConfig({
|
||||
srcDir: 'docs',
|
||||
lang: 'zh-CN',
|
||||
title: 'Pulumi 中文文档',
|
||||
description: 'Pulumi 基础设施即代码(IaC)中文文档和博客',
|
||||
locales: {
|
||||
root: {
|
||||
label: '简体中文',
|
||||
lang: 'zh-CN',
|
||||
title: 'Pulumi 中文文档',
|
||||
description: 'Pulumi 基础设施即代码(IaC)中文文档和博客',
|
||||
themeConfig: {
|
||||
...zhThemeText,
|
||||
nav: [
|
||||
{ text: '主页', link: '/' },
|
||||
{ text: '文档', link: '/docs/', activeMatch: '^/docs/' },
|
||||
{ text: '博客', link: '/blog/', activeMatch: '^/blog/' },
|
||||
isharkflyNav(true),
|
||||
],
|
||||
sidebar,
|
||||
},
|
||||
},
|
||||
en: {
|
||||
label: 'English',
|
||||
lang: 'en-US',
|
||||
link: `${EN_PREFIX}/`,
|
||||
title: 'Pulumi Docs',
|
||||
description: 'Pulumi Infrastructure as Code (IaC) docs and blog',
|
||||
themeConfig: {
|
||||
...enThemeText,
|
||||
nav: [
|
||||
{ text: 'Home', link: `${EN_PREFIX}/` },
|
||||
{ text: 'Docs', link: `${EN_PREFIX}/docs/`, activeMatch: '^/en/docs/' },
|
||||
{ text: 'Blog', link: `${EN_PREFIX}/blog/`, activeMatch: '^/en/blog/' },
|
||||
isharkflyNav(false),
|
||||
],
|
||||
sidebar: sidebarEn,
|
||||
},
|
||||
},
|
||||
},
|
||||
cleanUrls: true,
|
||||
lastUpdated: false,
|
||||
ignoreDeadLinks: true,
|
||||
@@ -106,29 +183,45 @@ export default defineConfig({
|
||||
theme: { light: 'github-light', dark: 'github-dark' },
|
||||
},
|
||||
themeConfig: {
|
||||
...zhThemeText,
|
||||
// https://vitepress.dev/reference/default-theme-config
|
||||
logo: '/logos/brand/pulumi-mark-purple.svg',
|
||||
nav: [
|
||||
{ text: '主页', link: '/' },
|
||||
{ text: '文档', link: '/docs/', activeMatch: '^/docs/' },
|
||||
{ text: '博客', link: '/blog/', activeMatch: '^/blog/' },
|
||||
isharkflyNav(true),
|
||||
],
|
||||
search: {
|
||||
provider: 'local',
|
||||
options: {
|
||||
translations: zhSearchText,
|
||||
locales: {
|
||||
root: { translations: zhSearchText },
|
||||
},
|
||||
},
|
||||
},
|
||||
// Generated from the Hugo menus / weights when the site was migrated; edit by hand from now on.
|
||||
sidebar: sidebar as DefaultTheme.SidebarMulti,
|
||||
socialLinks: [
|
||||
{ icon: 'git', link: `${REPO_URL}.git` },
|
||||
],
|
||||
editLink: undefined,
|
||||
languageSwitcher: {
|
||||
enPrefix: EN_PREFIX,
|
||||
pages: pagesByLanguage,
|
||||
},
|
||||
} as DefaultTheme.Config,
|
||||
vite: {
|
||||
build: { chunkSizeWarningLimit: 4096 },
|
||||
resolve: {
|
||||
// 用自定义的语言切换组件替换默认主题的翻译菜单(与 Docs-iSharkFly-Com 一致):
|
||||
// 对应语言没有当前页面时跳到该语言首页,而不是 404。
|
||||
// VitePress 2.0.0-alpha.21 起两个组件合并为 VPNavTranslations;旧的两条保留,兼容 alpha.17。
|
||||
alias: [
|
||||
{
|
||||
find: /^.*\/VPNavTranslations\.vue$/,
|
||||
replacement: fileURLToPath(new URL('./theme/components/NavTranslationsLanguageSwitcher.vue', import.meta.url)),
|
||||
},
|
||||
{
|
||||
find: /^.*\/VPNavBarTranslations\.vue$/,
|
||||
replacement: fileURLToPath(new URL('./theme/components/NavBarLanguageSwitcher.vue', import.meta.url)),
|
||||
},
|
||||
{
|
||||
find: /^.*\/VPNavScreenTranslations\.vue$/,
|
||||
replacement: fileURLToPath(new URL('./theme/components/NavScreenLanguageSwitcher.vue', import.meta.url)),
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -10,6 +10,8 @@ export const DEFAULTS: Record<string, string> = {
|
||||
'k8s-language': 'typescript',
|
||||
os: 'macos',
|
||||
cloud: 'aws',
|
||||
'tf-tool': 'terraform',
|
||||
pythontoolchain: 'pip',
|
||||
}
|
||||
|
||||
export const LABELS: Record<string, string> = {
|
||||
@@ -21,6 +23,16 @@ export const LABELS: Record<string, string> = {
|
||||
fsharp: 'F#',
|
||||
visualbasic: 'VB',
|
||||
yaml: 'YAML',
|
||||
java: 'Java',
|
||||
hcl: 'HCL',
|
||||
opa: 'OPA',
|
||||
terraform: 'Terraform',
|
||||
opentofu: 'OpenTofu',
|
||||
pip: 'pip',
|
||||
uv: 'uv',
|
||||
poetry: 'Poetry',
|
||||
docker: 'Docker',
|
||||
digitalocean: 'DigitalOcean',
|
||||
macos: 'macOS',
|
||||
linux: 'Linux',
|
||||
windows: 'Windows',
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
<script setup lang="ts">
|
||||
import VPFlyout from 'vitepress/dist/client/theme-default/components/VPFlyout.vue';
|
||||
import { VPLink } from 'vitepress/theme';
|
||||
import { useLanguageSwitcher } from '../languageSwitcher';
|
||||
|
||||
const { readingLanguages, labels } = useLanguageSwitcher();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VPFlyout class="NavBarLanguageSwitcher" icon="vpi-languages" :label="labels.menu">
|
||||
<div class="items">
|
||||
<p class="title">{{ labels.reading }}</p>
|
||||
<VPLink
|
||||
v-for="item in readingLanguages"
|
||||
:key="item.text"
|
||||
class="link"
|
||||
:class="{ active: item.active }"
|
||||
:href="item.link"
|
||||
:lang="item.lang"
|
||||
:hreflang="item.lang"
|
||||
rel="alternate"
|
||||
>{{ item.text }}</VPLink>
|
||||
</div>
|
||||
</VPFlyout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.NavBarLanguageSwitcher {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* 从 768px 起显示:默认主题“…”菜单里的翻译分组已在 style.css 中隐藏,由本组件代替。 */
|
||||
@media (min-width: 768px) {
|
||||
.NavBarLanguageSwitcher {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.items {
|
||||
min-width: 180px;
|
||||
}
|
||||
|
||||
.title {
|
||||
padding: 0 12px;
|
||||
line-height: 32px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--vp-c-text-2);
|
||||
}
|
||||
|
||||
.link {
|
||||
display: block;
|
||||
border-radius: 6px;
|
||||
padding: 0 12px;
|
||||
line-height: 32px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: var(--vp-c-text-1);
|
||||
white-space: nowrap;
|
||||
transition: background-color 0.25s, color 0.25s;
|
||||
}
|
||||
|
||||
.link:hover {
|
||||
color: var(--vp-c-brand-1);
|
||||
background-color: var(--vp-c-default-soft);
|
||||
}
|
||||
|
||||
.link.active {
|
||||
color: var(--vp-c-brand-1);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,85 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { VPLink } from 'vitepress/theme';
|
||||
import { useLanguageSwitcher } from '../languageSwitcher';
|
||||
|
||||
const { readingLanguages, labels, currentLabel } = useLanguageSwitcher();
|
||||
const isOpen = ref(false);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="NavScreenLanguageSwitcher" :class="{ open: isOpen }">
|
||||
<button class="toggle" :aria-expanded="isOpen" @click="isOpen = !isOpen">
|
||||
<span class="vpi-languages icon lang" />
|
||||
{{ currentLabel }}
|
||||
<span class="vpi-chevron-down icon chevron" />
|
||||
</button>
|
||||
|
||||
<div class="groups">
|
||||
<p class="title">{{ labels.reading }}</p>
|
||||
<ul class="list">
|
||||
<li v-for="item in readingLanguages" :key="item.text">
|
||||
<VPLink class="link" :class="{ active: item.active }" :href="item.link" :lang="item.lang">
|
||||
{{ item.text }}
|
||||
</VPLink>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.NavScreenLanguageSwitcher {
|
||||
height: 24px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.NavScreenLanguageSwitcher.open {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.toggle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: var(--vp-c-text-1);
|
||||
}
|
||||
|
||||
.icon {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.icon.lang {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.icon.chevron {
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.groups {
|
||||
padding: 4px 0 0 24px;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin-top: 8px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--vp-c-text-2);
|
||||
}
|
||||
|
||||
.list {
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
.link {
|
||||
line-height: 32px;
|
||||
font-size: 13px;
|
||||
color: var(--vp-c-text-1);
|
||||
}
|
||||
|
||||
.link.active {
|
||||
color: var(--vp-c-brand-1);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
// VitePress 2.0.0-alpha.21 起把 VPNavBarTranslations / VPNavScreenTranslations 合并成了 VPNavTranslations,
|
||||
// 用 screen / menu 属性区分位置。这里按同样的属性分发到自定义的语言切换组件。
|
||||
import NavBarLanguageSwitcher from './NavBarLanguageSwitcher.vue';
|
||||
import NavScreenLanguageSwitcher from './NavScreenLanguageSwitcher.vue';
|
||||
|
||||
defineProps<{ screen?: boolean; menu?: boolean }>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NavScreenLanguageSwitcher v-if="screen" />
|
||||
<!-- “…”菜单里不再重复显示:导航栏上的切换器从 768px 起一直可见。 -->
|
||||
<NavBarLanguageSwitcher v-else-if="!menu" />
|
||||
</template>
|
||||
@@ -0,0 +1,67 @@
|
||||
import { computed } from 'vue';
|
||||
import { useData, useRoute } from 'vitepress';
|
||||
|
||||
type Reading = 'zh' | 'en';
|
||||
|
||||
type SwitcherConfig = {
|
||||
enPrefix: string;
|
||||
// 每种语言已有的页面(相对该语言根目录的 .md 路径),用来判断切换后对应页面是否存在。
|
||||
pages: Record<Reading, string[]>;
|
||||
};
|
||||
|
||||
export type SwitcherLink = { text: string; link: string; lang?: string; active: boolean };
|
||||
|
||||
const READING_LANGUAGES = [
|
||||
{ key: 'zh', text: '简体中文', lang: 'zh-CN' },
|
||||
{ key: 'en', text: 'English', lang: 'en-US' },
|
||||
] as const;
|
||||
|
||||
function pageUrl(base: string, page: string) {
|
||||
return base + page.replace(/(^|\/)index\.md$/, '$1').replace(/\.md$/, '');
|
||||
}
|
||||
|
||||
export function useLanguageSwitcher() {
|
||||
const data = useData();
|
||||
const { page, theme } = data;
|
||||
const route = useRoute();
|
||||
// alpha.17 的 hash 在 useData() 里;alpha.21 起移到 useRoute().hash。
|
||||
const currentHash = () =>
|
||||
((data as { hash?: { value: string } }).hash?.value ?? (route as { hash?: string }).hash ?? '');
|
||||
const config = computed(() => theme.value.languageSwitcher as SwitcherConfig);
|
||||
|
||||
const current = computed(() => {
|
||||
let rest = page.value.relativePath;
|
||||
const enDir = config.value.enPrefix.replace(/^\//, '') + '/';
|
||||
const reading: Reading = rest.startsWith(enDir) ? 'en' : 'zh';
|
||||
if (reading === 'en')
|
||||
rest = rest.slice(enDir.length);
|
||||
return { reading, page: rest };
|
||||
});
|
||||
|
||||
// 对应语言有同一页面就跳到该页面,否则跳到该语言的首页。
|
||||
function linkFor(reading: Reading, keepHash: boolean) {
|
||||
const base = reading === 'en' ? config.value.enPrefix + '/' : '/';
|
||||
const pages = config.value.pages[reading] ?? [];
|
||||
if (!pages.includes(current.value.page))
|
||||
return base;
|
||||
return pageUrl(base, current.value.page) + (keepHash ? currentHash() : '');
|
||||
}
|
||||
|
||||
const isZh = computed(() => current.value.reading === 'zh');
|
||||
|
||||
const readingLanguages = computed<SwitcherLink[]>(() => READING_LANGUAGES.map(reading => ({
|
||||
text: reading.text,
|
||||
lang: reading.lang,
|
||||
link: linkFor(reading.key, true),
|
||||
active: reading.key === current.value.reading,
|
||||
})));
|
||||
|
||||
const labels = computed(() => isZh.value
|
||||
? { menu: '切换语言', reading: '阅读语言' }
|
||||
: { menu: 'Change language', reading: 'Language' });
|
||||
|
||||
const currentLabel = computed(() =>
|
||||
READING_LANGUAGES.find(reading => reading.key === current.value.reading)!.text);
|
||||
|
||||
return { readingLanguages, labels, currentLabel, isZh };
|
||||
}
|
||||
@@ -355,3 +355,14 @@
|
||||
.vp-doc .md\:w-1\/3 { flex: 1 1 0%; min-width: 0; }
|
||||
.vp-doc .w-3\/4 { width: 75%; }
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Language switcher
|
||||
* 默认主题“…”菜单里的翻译分组会直接链接到另一语言的同名页面(英文页面多数还没有,会 404),
|
||||
* 这里把它隐藏,改由 NavBarLanguageSwitcher 显示。
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
.VPNavBarExtra .group.translations {
|
||||
display: none;
|
||||
}
|
||||
|
||||
Vendored
+7
-4
@@ -4,7 +4,8 @@ pipeline {
|
||||
options {
|
||||
ansiColor('xterm')
|
||||
disableConcurrentBuilds()
|
||||
timeout(time: 30, unit: 'MINUTES')
|
||||
// 加入英文页面(docs/en/)后,本地完整构建约 24 分钟
|
||||
timeout(time: 60, unit: 'MINUTES')
|
||||
}
|
||||
|
||||
tools {
|
||||
@@ -18,7 +19,7 @@ pipeline {
|
||||
// 发布到线上的分支
|
||||
RELEASE_BRANCH = 'main'
|
||||
// Worker Preview 的自定义预览域名
|
||||
PREVIEW_DOMAIN = 'docs.sharkdat.com'
|
||||
PREVIEW_DOMAIN = 'pulumi.sharkdat.com'
|
||||
// Cloudflare API Token(Jenkins Secret text 凭据,需要 Workers Scripts:Edit 权限)
|
||||
CLOUDFLARE_API_TOKEN = credentials('sharkdat-cloudflare-api-token')
|
||||
// Cloudflare Account ID(Secret text 凭据)。设置后 wrangler 不再调用 /memberships 查询账号,
|
||||
@@ -27,6 +28,8 @@ pipeline {
|
||||
// 不让 wrangler 发送使用统计、不弹交互提示
|
||||
WRANGLER_SEND_METRICS = 'false'
|
||||
CI = 'true'
|
||||
// 中英文共 3000 多个页面,VitePress 构建会超出 Node 默认约 4 GB 的堆上限(JavaScript heap out of memory)
|
||||
NODE_OPTIONS = '--max-old-space-size=8192'
|
||||
}
|
||||
|
||||
stages {
|
||||
@@ -89,7 +92,7 @@ pipeline {
|
||||
}
|
||||
|
||||
// PR 或其他分支:创建/更新 Worker Preview,不影响线上流量
|
||||
// 访问地址:https://<previewName>.docs.sharkdat.com
|
||||
// 访问地址:https://<previewName>.pulumi.sharkdat.com
|
||||
// https://<previewName>-pulumi-isharkfly-com.huyuchengus.workers.dev
|
||||
def branchArg = env.CHANGE_ID
|
||||
? "pr-${env.CHANGE_ID}"
|
||||
@@ -119,7 +122,7 @@ pipeline {
|
||||
"""
|
||||
}
|
||||
|
||||
// 用新版 Previews(需要 wrangler >= 4.135.0),才会出现在自定义预览域名 docs.sharkdat.com 下。
|
||||
// 用新版 Previews(需要 wrangler >= 4.135.0),才会出现在自定义预览域名 pulumi.sharkdat.com 下。
|
||||
// Jenkins 检出的是 detached HEAD,无法自动识别分支,所以必须显式传 --name。
|
||||
sh """
|
||||
pnpm exec wrangler preview --config ${env.WRANGLER_CONFIG} --env="" \
|
||||
|
||||
@@ -62,6 +62,26 @@ pnpm run docs:preview # 预览编译结果
|
||||
* CLI 命令参考和 API 参考(`/docs/reference/cli`、`/docs/reference/pkg`)由 Pulumi 官方从源代码生成,不在本仓库中,链接直接指向 [pulumi.com](https://www.pulumi.com/docs/reference/)。
|
||||
* 旧地址(Hugo 的 `aliases` 和 `redirect_to`)的跳转规则在 `docs/public/_redirects` 中维护。
|
||||
|
||||
## 英文页面(/en/)
|
||||
|
||||
英文页面是 Pulumi 官方文档 [pulumi/docs](https://github.com/pulumi/docs) 的英文原文,不做翻译,由脚本同步生成:
|
||||
|
||||
```bash
|
||||
git clone --depth 1 --filter=blob:none --sparse https://github.com/pulumi/docs.git ../pulumi-docs
|
||||
git -C ../pulumi-docs sparse-checkout set content/docs content/blog static layouts/shortcodes
|
||||
python scripts/sync_en_from_upstream.py ../pulumi-docs # 需要 PyYAML
|
||||
```
|
||||
|
||||
脚本会重新生成下面这些文件,不要手工修改(`docs/en/index.md` 英文首页是手写的,不受影响):
|
||||
|
||||
| 路径 | 说明 |
|
||||
|---|---|
|
||||
| `docs/en/docs/`、`docs/en/blog/` | 文档和博客页面,Hugo 短代码已转换成 VitePress 写法 |
|
||||
| `docs/public/en/` | 页面引用的图片、视频等静态文件 |
|
||||
| `.vitepress/sidebar.en.json` | 英文侧边栏(按官方文档的目录结构和菜单权重生成) |
|
||||
|
||||
站内链接指向本站已有的英文页面;本站没有的页面(Registry、`/up/`、产品页等)指向 [pulumi.com](https://www.pulumi.com/)。
|
||||
|
||||
## 部署
|
||||
|
||||
Jenkins(见 `Jenkinsfile`)使用 corepack + pnpm 编译站点,并通过 wrangler 部署到 Cloudflare Workers 静态资源(见 `wrangler.jsonc`):
|
||||
|
||||
@@ -0,0 +1,236 @@
|
||||
---
|
||||
title: "Ten More Things You Can Do With Pulumi Neo"
|
||||
description: "Ten more platform-engineering workflows you can hand to Pulumi Neo: deployments, tickets, incident triage, IAM, migration, and continuous ops."
|
||||
date: 2026-05-19
|
||||
authors: ["adam-gordon-bell"]
|
||||
tags: ["ai", "platform-engineering", "pulumi-neo", "aws"]
|
||||
---
|
||||
# Ten More Things You Can Do With Pulumi Neo
|
||||
|
||||
<p class="blog-meta">2026-05-19 · adam-gordon-bell</p>
|
||||
|
||||
Last fall, after launching [Pulumi Neo](https://www.pulumi.com/neo/), we wrote up [10 things you could do with it](/en/blog/10-things-you-can-do-with-neo/). In the months that followed, as platform teams handed Neo more real work, we watched and listened, shipping a steady stream of features like [plan mode](/en/blog/neo-plan-mode/), [read-only mode](/en/blog/neo-read-only-mode/), [AGENTS.md](/en/blog/pulumi-neo-now-supports-agentsmd/), an [integration catalog](/en/blog/neo-integrations/), [cross-cloud migration](/en/blog/neo-migration/), and [task sharing](/en/blog/neo-task-sharing/). With [today's release](https://www.pulumi.com/releases/agentic-infrastructure-era/), Neo extends beyond the Pulumi Cloud console into the Pulumi CLI, GitHub, and Slack.
|
||||
|
||||
So here are **10 more** things you can do with Neo.
|
||||
|
||||
|
||||
## 1. Deploy your app to AWS without writing IaC
|
||||
|
||||
*Hand Neo a repo. Neo picks the right services — ECS, AWS Fargate, ALB — writes the Pulumi, and opens a PR.*
|
||||
|
||||
The cloud infrastructure part of getting a new service running, especially one in a new language, is always a few hours of boilerplate: a VPC and subnets, an IAM role, security groups, a load balancer, DNS, and a TLS cert.
|
||||
|
||||
With Neo, that work collapses into a prompt. Point Neo at a repo and ask:
|
||||
|
||||
> Deploy this app to AWS as a publicly accessible service.
|
||||
|
||||
[Plan mode](/en/blog/neo-plan-mode/) comes back with the resources Neo will create, named and sized: ECS running on AWS Fargate, an ALB, and the VPC wiring. Approve, and Neo writes the Pulumi program, runs a preview, and opens a PR. You, the human in the loop, merge it after review.
|
||||
|
||||
<video controls src="https://www.pulumi.com/en/blog/10-more-things-you-can-do-with-neo/deploy-to-aws2.mp4"></video>
|
||||
Neo planning a PR and deploying an app to AWS.
|
||||
|
||||
|
||||
## 2. Diagnose a slow API from metrics, logs, and code
|
||||
|
||||
*Slow endpoints live at the seam between runtime metrics and the stack that runs them. Neo reads both and proposes a fix with the metric evidence as the rationale.*
|
||||
|
||||
Production incidents often involve multiple tools. When the `checkout` endpoint's p95 latency climbs from 200ms to 1.2s, the metric is in Datadog, but the cause might be somewhere in your AWS account: maybe RDS is out of IOPS, maybe the connection pool is too small, maybe the autoscaler isn't keeping up. Connecting "this metric looks bad" to a recent backend change and then to a one-line fix in your Pulumi program is an exercise in detective work.
|
||||
|
||||
Neo's [integration catalog](/en/blog/neo-integrations/) bridges this gap. With built-in Datadog APM, PagerDuty, and Honeycomb integrations sitting alongside your Pulumi state, Neo can read traces and metrics from the tools your team already uses and take action.
|
||||
|
||||
Ask Neo:
|
||||
|
||||
> Find the scaling bottleneck on `/checkout` from the last 7 days of metrics and propose a fix.
|
||||
|
||||
Neo pulls the metric history, matches the Datadog tag `db.cluster=checkout-rds` to the RDS instance in your `prod-checkout` Pulumi stack, and opens a PR with a Pulumi diff that bumps the storage IOPS and raises the connection-pool ceiling. You review and roll out the fix.
|
||||
|
||||
<video controls src="https://www.pulumi.com/en/blog/10-more-things-you-can-do-with-neo/honey-comb.mp4"></video>
|
||||
Toggle on the Honeycomb integration so Neo can read traces and metrics alongside your Pulumi stacks.
|
||||
|
||||
## 3. Automate PagerDuty incident response from Slack
|
||||
|
||||
*A page comes in. You paste it into your on-call channel and tag Neo, and Neo replies with the cross-system view you'd otherwise spend the first 20 minutes assembling.*
|
||||
|
||||
On-call triage is often about getting up to speed quickly. You get paged because something is in the red, and you don't know why.
|
||||
|
||||
You mention Neo in the on-call Slack channel:
|
||||
|
||||
> @neo, what's going on with this alert?
|
||||
|
||||
Neo starts querying metrics and traces. With PagerDuty and Datadog in the integration catalog, it correlates the alert with every deploy and stack change tagged with the alert's service in the last hour, and finds the change that lines up:
|
||||
|
||||
> Two deploys in the last hour touched services tagged `service:checkout`: `checkout-api@a3f9c2` (12 min ago, app-layer deploy) and Pulumi stack `prod-checkout-rds` (45 min ago, decreased `max_connections` from 200 → 100). p99 latency inflection at 14:03 lines up with the stack change. Likely cause: the connection-pool reduction is starving the API under current load.
|
||||
|
||||
You ask a couple of clarifying questions in-thread, then ask Neo to open a rollback PR against the Pulumi stack.
|
||||
|
||||

|
||||
Authorize PagerDuty and Datadog in Neo's settings. Neo can then read alerts in your on-call Slack channel, find the change that correlates, and open a PR when you ask.
|
||||
|
||||
## 4. Implement a Jira or Linear ticket end-to-end
|
||||
|
||||
*Hand Neo a ticket number from Linear, Jira, or GitHub Issues. Neo reads the description and acceptance criteria, plans against your stack, and opens a PR.*
|
||||
|
||||
Tickets often pile up not because they're unimportant, but because they're not urgent. Ongoing maintenance quietly accumulates. Bumping a provider version, centralizing secret management, working through small policy violations: each one matters, but none of them ever moves to the top of the queue. Explaining each one to an agent is its own overhead.
|
||||
|
||||
The fix is letting Neo read the ticket itself. Connect Linear integration or Jira automation through the integration catalog (GitHub Issues works too), and Neo pulls the ticket the same way an engineer would: title, description, acceptance criteria.
|
||||
|
||||
Ask Neo:
|
||||
|
||||
> Implement CAD-1234 in our payments stack.
|
||||
|
||||
Neo reads the ticket, plans against your existing stack, opens a PR, and drops a comment back on the ticket. The ticket and the PR end up linked, and your backlog shrinks.
|
||||
|
||||
<video controls src="https://www.pulumi.com/en/blog/10-more-things-you-can-do-with-neo/neo-linear.mp4"></video>
|
||||
Neo running locally in the Pulumi CLI: fielding a Linear issue, analyzing the codebase, and producing a PR that upgrades multiple projects to the latest Pulumi and AWS provider versions.
|
||||
|
||||
|
||||
## 5. Audit and tighten over-privileged IAM roles
|
||||
|
||||
*Neo audits each role against what your stack code actually does, and proposes scoped policies that improve your security posture.*
|
||||
|
||||
IAM cleanup is the kind of work nobody has the time to prioritize. Production has 40 roles. Half of them started with `s3:*` because nobody had time to scope them, and the cleanup slips quarter to quarter.
|
||||
|
||||
Ask Neo:
|
||||
|
||||
> Audit IAM permissions across my accounts and propose narrower policies for over-privileged stack-managed roles.
|
||||
|
||||
Neo cross-references each role's policy against what the stack code actually calls, and opens a PR per role. The PR body lists the API calls Neo found in the stack code, like `s3:GetObject` on `audit-logs-*` and `s3:PutObject` on `audit-logs-staging`, as the justification for the scoped policy. The evidence sits next to the diff.
|
||||
|
||||
If you're unclear about which roles count as in-scope or what your team considers over-privileged, start in [plan mode](/en/blog/neo-plan-mode/) and agree on that with Neo first.
|
||||
|
||||
<video controls src="https://www.pulumi.com/en/blog/10-more-things-you-can-do-with-neo/iam-narrow.mp4"></video>
|
||||
Neo auditing an over-privileged IAM role and proposing a narrower policy, with the actually-used permissions as evidence.
|
||||
|
||||
|
||||
## 6. Migrate from AWS CDK onto your platform's golden paths
|
||||
|
||||
*Neo reads your existing AWS CDK app and lands a PR that swaps AWS's defaults for your team's published components.*
|
||||
|
||||
CDK's L2 constructs encode AWS's defaults. `s3.Bucket` with `encryption: BucketEncryption.S3_MANAGED` is a sane choice, but it's AWS's idea of sane, not yours. A platform team that's published its own components to the [Pulumi Private Registry](/en/docs/idp/concepts/private-registry/) has already decided what *your* bucket defaults look like: encryption with the right KMS key, tagging by cost center.
|
||||
|
||||
Ask Neo:
|
||||
|
||||
> Migrate the `payments-vpc` CDK stack to Pulumi using our published components.[^6-original]
|
||||
|
||||
Neo reads the source CDK app and your registry side by side. It maps each CDK construct to its closest team-published equivalent, clarifying with you where the mapping is ambiguous.
|
||||
|
||||
```typescript
|
||||
// Before (AWS CDK, AWS's defaults)
|
||||
const bucket = new s3.Bucket(this, "Assets", {
|
||||
bucketName: "payments-assets",
|
||||
encryption: s3.BucketEncryption.S3_MANAGED,
|
||||
versioned: true,
|
||||
});
|
||||
```
|
||||
|
||||
```typescript
|
||||
// After (Pulumi, your team's published component)
|
||||
import * as platform from "@payments/platform";
|
||||
|
||||
const bucket = new platform.Bucket("assets", {
|
||||
bucketName: "payments-assets",
|
||||
classification: "internal",
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
Neo handles [Terraform and Azure ARM migrations](/en/blog/neo-migration/) the same way.
|
||||
|
||||
## 7. Containerize a service and migrate it to Kubernetes from a runbook
|
||||
|
||||
*Write the containerization pattern down once. Every service after that is a prompt away.*
|
||||
|
||||
Containerizing an application and moving it to Kubernetes involves several small decisions: which Docker image, what labels go on deployments, how ingress is wired, and how secrets reach the pod. But after a team has moved two or three services, the pattern is set. The decisions get written down in a runbook, and every subsequent migration is mostly the same shape.
|
||||
|
||||
Ask Neo:
|
||||
|
||||
> Containerize the `billing-api` service and write its Kubernetes manifests, following our K8s migration runbook in Confluence.
|
||||
|
||||
Neo reads the source repo and the runbook in Confluence via the [integration catalog](/en/blog/neo-integrations/) and starts working on your request.
|
||||
|
||||
You can save this as a Neo skill that splits the work into multiple PRs — Dockerfile first, ECR config next, Deployment/Service/Ingress manifests after — and link back to each runbook convention for ease of review. The output reflects your conventions: the labels you actually use, the ingress class you've standardized on, and the External Secrets Operator config your team prefers.
|
||||
|
||||
You're still the one reviewing the PRs and deciding what the cutover looks like in production. Neo follows your internal standards, so the new service ends up shaped like the last one you migrated.
|
||||
|
||||

|
||||
Neo migrating a VM-based service to Kubernetes step by step, following the team's Confluence runbook.
|
||||
|
||||
Once you've delegated something a few times, the next move is to automate it. The remaining three tasks are the kind Neo doesn't need to be asked for. Drift, deps, compliance: they're the operations you put on a schedule via [Neo Automations](/en/blog/neo-automations/).
|
||||
|
||||
## 8. Schedule daily configuration drift detection across your cloud infrastructure
|
||||
|
||||
*Schedule a daily drift check across your cloud. Wake up to PRs that fix what changed overnight.*
|
||||
|
||||
Configuration drift is an ongoing challenge. The security team rotated an IAM role at 04:47 UTC. Someone changed a security group in the AWS console three weeks ago. Left alone, drift turns into security gaps, into compliance issues, and into the kind of "wait, who changed that?" confusion nobody wants to chase down.
|
||||
|
||||
Pulumi Cloud is already good at configuration drift detection. Neo takes it a step further.
|
||||
|
||||
Ask Neo:
|
||||
|
||||
> Every morning at 6 AM, check all production infrastructure for drift and create PRs to fix any issues you find.
|
||||
|
||||
From then on, the task runs on its own, and you wake up to a PR per drifted resource. The description spells out what happened (`iam_role.audit-reader` had inline policy `AllowReadAuditLogs` added at 04:47 UTC) and cites the section of `infra/runbooks/drift.md` Neo followed.
|
||||
|
||||
Some drift gets encoded into the Pulumi program, like the IAM rotation above. Some gets reverted, like the security group rule added from the console. Some gets ignored entirely, like autoscaler-managed Lambda concurrency reservations the runbook tells Neo to skip. You write the runbook once; Neo follows it every morning to decide what to do.
|
||||
|
||||

|
||||
Neo's morning drift PR. The body names the resource, the change, when it happened, and the section of the runbook Neo followed to decide what to do.
|
||||
|
||||
|
||||
## 9. Schedule weekly upgrades for outdated Lambda runtimes and providers
|
||||
|
||||
*Lambda runtimes and container base images age out. Schedule the upgrade pass; review the PRs Neo opens.*
|
||||
|
||||
AWS Lambda end-of-life notices come out months ahead. Node 20 stopped receiving updates as an AWS Lambda runtime at the end of April. Python 3.9 reached end-of-support last December. After the deadline, AWS blocks new deploys and eventually stops invoking the function. Each one needs to move to a supported runtime before the cutoff.[^9-original]
|
||||
|
||||
Schedule it:
|
||||
|
||||
> Every Sunday night at 10 PM, check our Lambda functions for runtimes nearing end-of-support and open PRs to upgrade them.
|
||||
|
||||
Neo reads the AWS Lambda runtime deprecation page, matches the end-of-support runtimes against every Lambda function in your stacks, and opens one PR per stack.
|
||||
|
||||
If Python 3.9 is reaching end-of-support, the upgrade is to Python 3.12, and `datetime.utcnow()` calls need to move to `datetime.now(datetime.UTC)`. Neo can make all of those replacements in the same PR.
|
||||
|
||||
The same task can catch container base images with critical CVEs and bump them too.
|
||||
|
||||
<video controls src="https://www.pulumi.com/en/blog/10-more-things-you-can-do-with-neo/neo-schedule-setup.mp4"></video>
|
||||
Setting up a weekly task in the Scheduled Tasks UI. Once saved, Neo runs the prompt every Sunday night and opens PRs you review on Monday.
|
||||
|
||||
|
||||
## 10. Fix AWS CIS Benchmark failures with daily PRs
|
||||
|
||||
*Run the AWS CIS Benchmark on a schedule. Wake up to PRs that fix every failure.*
|
||||
|
||||
The [CIS AWS Foundations Benchmark](https://docs.aws.amazon.com/securityhub/latest/userguide/cis-aws-foundations-benchmark.html), available through AWS Security Hub, is something every team should be keeping an eye on. The benchmark finds issues like S3 buckets that allow public read access (`S3.1`), root user access keys that shouldn't exist (`IAM.4`), or CloudTrail not being enabled (`CloudTrail.1`). Scanning for these issues is a solved problem, but closing and addressing them is not. They pile up between audits because each one is a code change in a different stack, and nobody owns the cross-stack cleanup.[^10-original]
|
||||
|
||||
Schedule the cleanup:
|
||||
|
||||
> Every morning, read CIS Benchmark failures from Security Hub. For every failure on an IaC-managed resource, open a PR with the fix.
|
||||
|
||||
Neo opens one PR per failure. A bucket failing `S3.1` arrives as a Pulumi diff that adds `blockPublicAccess` to the bucket in your `prod-checkout` stack. The PR body lists the CIS rule number, the resource ID, the diff, and a clean `pulumi preview` against the live infrastructure.
|
||||
|
||||
The runbook is where your security team writes down what each control means for your stacks. Block public S3 buckets, except the ones tagged `public-content=true` for CloudFront origins. Don't auto-touch the break-glass IAM roles; page a human instead. Multi-region CloudTrail stays on, no exceptions. Neo reads that file, checks each Security Hub finding against it, and only opens a PR for the ones you've said are safe to fix. The rest get routed or ignored, the way your team already handles them.
|
||||
|
||||
<video controls src="https://www.pulumi.com/en/blog/10-more-things-you-can-do-with-neo/neo-cis-pr.mp4"></video>
|
||||
A PR raised by Neo to fix a CIS Benchmark failure, with the failing rule, the resource, and the runbook decision laid out in the body.
|
||||
|
||||
|
||||
## Neo: your newest platform engineer
|
||||
|
||||
Over the past year, many product teams have stopped treating AI as a request-by-request assistant and started delegating to it outright.[^compostable] Agents open pull requests, investigate issues, and iterate on review feedback.
|
||||
|
||||
But platform engineers have held back because a bad infrastructure change doesn't just fail, it can take production down. Coding agents benefit from fast, forgiving feedback loops, but infrastructure recovery is rarely as simple as reverting a commit.
|
||||
|
||||
What was missing wasn't the appetite. It was an agent with enough organizational context and [grounding](/en/blog/grounded-ai-why-neo-knows-your-infrastructure/) to plan reliably, enough guardrails to feel safe and contain mistakes, and enough discipline to keep working without being asked.
|
||||
|
||||
The theme across these tasks is clear. A thing platform engineers used to keep in their heads becomes a task you delegate, then becomes work that runs without you. Neo isn't generating infrastructure from a template. It's a teammate who knows your code, your providers, your conventions, your production metrics, and can raise PRs for you to review.
|
||||
|
||||
Neo now lives in your terminal, in your pull requests, in your Slack workspace, and in Pulumi Cloud. Pick one of these workflows and [give it a try](/en/docs/ai/agents/).
|
||||
|
||||
[^compostable]: For a concrete example, see [Seven Rules for Building an AI-Native Software Factory](/en/blog/seven-rules-ai-native-software-factory/): Ewan Dawson, CTO of Compostable AI, runs nineteen client deployments with five engineers, using Pulumi Neo to handle most of the infrastructure work.
|
||||
|
||||
[^6-original]: The observant reader will notice Terraform-to-Pulumi was covered [in the original post](/en/blog/10-things-you-can-do-with-neo/).
|
||||
|
||||
[^9-original]: Also covered in the [original post](/en/blog/10-things-you-can-do-with-neo/). Last year you could ask Neo to do it once. This year you can put it on a schedule.
|
||||
|
||||
[^10-original]: Also covered in the [original post](/en/blog/10-things-you-can-do-with-neo/). Last year Neo could remediate violations on demand. This year Security Hub feeds findings to a scheduled task that knows your runbook's interpretation of each control.
|
||||
@@ -0,0 +1,185 @@
|
||||
---
|
||||
title: "10 Things You Can Do With Our Infrastructure Agent, Neo"
|
||||
description: "Discover 10 concrete ways Pulumi Neo helps automate infrastructure tasks while keeping humans in control."
|
||||
date: 2025-10-06
|
||||
authors: ["meagan-cojocar"]
|
||||
tags: ["ai", "platform-engineering", "pulumi-neo", "aws"]
|
||||
---
|
||||
# 10 Things You Can Do With Our Infrastructure Agent, Neo
|
||||
|
||||
<p class="blog-meta">2025-10-06 · meagan-cojocar</p>
|
||||
|
||||
Since launching [Pulumi Neo](/en/blog/pulumi-neo/) two weeks ago, we've seen platform teams discover creative ways to put their newest AI teammate to work. We have also been using Neo internally for a handful of use cases. Neo shifts the conversation from "what could AI do for infrastructure?" to "what can I actually accomplish with Neo today?"
|
||||
|
||||
The answer is quite a bit. Here are 10 concrete workflows that platform teams can use Neo for right now, each one designed to save hours of manual work while keeping humans in the driver seat.
|
||||
|
||||
|
||||
## 1. Explain infrastructure in plain English or diagrams
|
||||
|
||||
Neo answers questions about your infrastructure instantly, turning complex resource relationships into conversational insights (and diagrams!).
|
||||
|
||||
No more digging through AWS consoles or parsing state files to understand what you have deployed. Neo speaks your language about your infrastructure. Ask questions like *"What databases do we have?"*, *"Which S3 buckets aren't encrypted?"*, *"Show me all resources in us-east-1"* or "draw an architecture diagram of our service" and get immediate, accurate answers.
|
||||
|
||||

|
||||
|
||||
## 2. Generate infrastructure code from natural language
|
||||
|
||||
Neo turns plain English descriptions into production-ready Pulumi code, eliminating the blank-page problem that slows down new projects.
|
||||
|
||||
Instead of starting from scratch or hunting through documentation, describe what you need and Neo generates the complete infrastructure. Ask Neo: *"Create a serverless API with PostgreSQL database and Redis cache on AWS"* and it produces fully configured resources with proper networking, security groups, and IAM policies.
|
||||
|
||||

|
||||
|
||||
## 3. Assist with Terraform to Pulumi migration
|
||||
|
||||
Neo analyzes existing Terraform code (and/or state files) and generates equivalent Pulumi programs, accelerating migration without starting from scratch.
|
||||
|
||||
Migrating from Terraform to Pulumi traditionally means rewriting everything. Neo understands both languages and can convert HCL to TypeScript, Python, or Go while preserving your infrastructure patterns. You can also use the Terraform state file. Ask Neo: *"Analyze the provided terraform state. Based on it, generate a python pulumi program that imports the resources without requiring updates."* and it generates equivalent code with proper typing and best practices.
|
||||
|
||||
Using this prompt with a Terraform state file containing EC2 instances and supporting resources, Neo generated a complete Pulumi program that imported everything without requiring updates:
|
||||
|
||||

|
||||
|
||||
## 4. Automate CI/CD pipeline generation
|
||||
|
||||
Neo creates complete GitHub Actions workflows configured specifically for Pulumi deployments, with proper preview stages.
|
||||
|
||||
Setting up CI/CD for infrastructure projects usually involves copying workflows from other repos and adapting them. Neo generates purpose-built pipelines that understand your stack structure and deployment patterns. Ask Neo: *"Create a GitHub Actions pipeline for this Pulumi project with preview and production stages"* and it produces workflows with proper secrets management, approval gates, and deployment strategies.
|
||||
|
||||
Here is what Neo gives us using that prompt on a very basic Pulumi project:
|
||||
|
||||
```yaml
|
||||
name: Simple Pulumi Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Pulumi
|
||||
uses: pulumi/actions@v4
|
||||
with:
|
||||
pulumi-version: latest
|
||||
|
||||
- name: Configure AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v4
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: us-west-2
|
||||
|
||||
- name: Deploy infrastructure
|
||||
run: |
|
||||
pulumi stack select production
|
||||
pulumi up --yes
|
||||
working-directory: ./infrastructure
|
||||
```
|
||||
|
||||
## 5. Identify inefficient infrastructure patterns
|
||||
|
||||
Neo analyzes your infrastructure and spots patterns that create unnecessary management overhead, helping you consolidate and optimize.
|
||||
|
||||
When you have 10 identical EC2 instances that should be an auto-scaling group, or multiple Lambda functions doing the same job, Neo spots these patterns. Ask Neo: *"Analyze our infrastructure for inefficient patterns"* and it can identify consolidation opportunities.
|
||||
|
||||
**Example analysis:**
|
||||
|
||||
```text
|
||||
Neo identified these optimization opportunities:
|
||||
|
||||
1. Duplicate EC2 Instances (High Priority)
|
||||
• Found 8 identical t3.medium instances running the same application
|
||||
• Recommendation: Consolidate into an Auto Scaling Group
|
||||
• Benefits: Simplified management, automatic scaling, reduced configuration drift
|
||||
|
||||
2. Scattered Lambda Functions (Medium Priority)
|
||||
• Found 12 Lambda functions with identical runtime and dependencies
|
||||
• Recommendation: Combine into a single function with routing logic
|
||||
• Benefits: Reduced cold starts, simplified monitoring, easier updates
|
||||
|
||||
3. Redundant Security Groups (Low Priority)
|
||||
• Found 15 security groups with identical rules
|
||||
• Recommendation: Create shared security groups for common patterns
|
||||
• Benefits: Easier rule management, reduced complexity
|
||||
```
|
||||
|
||||
## 6. Upgrade EKS/Kubernetes clusters
|
||||
|
||||
Neo manages Kubernetes version upgrades across multiple clusters, planning upgrade paths and validating compatibility.
|
||||
|
||||
Kubernetes upgrades are complex, especially across multiple clusters with different workloads. Neo analyzes your cluster configurations, identifies upgrade blockers, and creates systematic upgrade plans. Ask Neo: *"Plan an upgrade path for our EKS clusters from 1.27 to 1.28"* and it maps dependencies, checks add-on compatibility, and sequences the upgrades.
|
||||
|
||||
## 7. Respond to security vulnerabilities
|
||||
|
||||
When CVEs are announced, Neo can help security teams move at machine speed addressing them.
|
||||
|
||||
Security vulnerabilities require immediate response across your entire infrastructure. Neo understands your resource inventory and can quickly identify what's affected by new CVEs. When you ask Neo: *"Identify all resources affected by CVE-2025-XXXXX and create remediation PRs"*, it scans your infrastructure, maps vulnerable components, and generates targeted fixes.
|
||||
|
||||

|
||||
|
||||
## 8. Remediate policy violations
|
||||
|
||||
Neo detects non-compliant resources and generates pull requests to fix them, turning compliance headaches into automated workflows.
|
||||
|
||||
When your policy violations detect unencrypted EBS volumes, overly permissive security groups, or missing resource tags, Neo identifies the issues and proposes specific fixes. Ask Neo: *"Fix all policy violations in our production account"* and it analyzes your compliance dashboard, identifies the problematic resources, and creates PRs with the exact changes needed.
|
||||
|
||||

|
||||
|
||||
## 9. Update Lambda runtimes across multiple accounts
|
||||
|
||||
Neo identifies outdated Lambda runtimes, stages updates, and manages the rollout across your entire AWS organization.
|
||||
|
||||
When AWS announces runtime deprecations, Neo scans all your accounts, identifies functions running outdated versions, and creates a systematic upgrade plan. Ask Neo: *"Upgrade all Lambda functions to Python 3.11"* and it maps your functions, checks compatibility, and generates account-by-account PRs.
|
||||
|
||||
**Before (outdated runtime):**
|
||||
|
||||
```typescript
|
||||
// Create the process email Lambda function
|
||||
const lambdaFunction = new aws.lambda.Function("emailProcessor", {
|
||||
runtime: aws.lambda.Runtime.Python3d8, // ❌ Deprecated
|
||||
code: new pulumi.asset.AssetArchive({
|
||||
".": new pulumi.asset.FileArchive("./lambda"),
|
||||
}),
|
||||
// ... other configuration
|
||||
});
|
||||
```
|
||||
|
||||
**After (Neo's upgrade):**
|
||||
|
||||
```typescript
|
||||
// Create the process email Lambda function
|
||||
const lambdaFunction = new aws.lambda.Function("emailProcessor", {
|
||||
runtime: aws.lambda.Runtime.Python3d11, // ✅ Upgraded
|
||||
code: new pulumi.asset.AssetArchive({
|
||||
".": new pulumi.asset.FileArchive("./lambda"),
|
||||
}),
|
||||
// ... other configuration
|
||||
});
|
||||
```
|
||||
|
||||
## 10. Enforce multi-account policy compliance
|
||||
|
||||
Neo applies organizational policies across your entire AWS Organizations structure, ensuring governance at scale without creating bottlenecks.
|
||||
|
||||
Large organizations struggle to maintain consistent policies across dozens of AWS accounts. Neo understands your organizational structure and can enforce tagging standards, encryption requirements, and security policies uniformly. Ask Neo: *"Ensure all accounts follow our tagging and encryption policies"* and it audits compliance across your organization.
|
||||
|
||||
## Your newest platform engineer
|
||||
|
||||
These workflows represent just the beginning of what's possible when an AI agent deeply understands infrastructure context.
|
||||
|
||||
The outcome is simple: spend less time on operational toil and more time on the architecture and policies that make your organizations successful.
|
||||
|
||||
[Get started with Neo](/en/docs/ai/agents/) and discover what becomes possible when AI truly understands infrastructure.
|
||||
|
||||
The future of platform engineering isn't about choosing between speed and safety. It's about having tools that help you with both simultaneously.
|
||||
@@ -0,0 +1,147 @@
|
||||
---
|
||||
title: "10 tips to improve your coding agent game"
|
||||
description: "Ten coding agent habits checked against the research behind them, from AGENTS.md drift and /compact to model switching, subagents, and review."
|
||||
date: 2026-09-21
|
||||
authors: ["engin-diri"]
|
||||
tags: ["ai", "ai-agents", "claude-code", "codex"]
|
||||
---
|
||||
# 10 tips to improve your coding agent game
|
||||
|
||||
<p class="blog-meta">2026-09-21 · engin-diri</p>
|
||||
|
||||
In May I told you to [trim the root instruction file until it fits on one screen](/en/blog/stop-tuning-prompts-build-a-harness/). I also said anything that needs a hard guarantee belongs in a hook. In June I argued that [the model that wrote the code shouldn't be the one grading it](/en/blog/stop-prompting-design-the-loop/). Several papers published this summer tested related questions.
|
||||
|
||||
Most of the findings support that advice, while the research on subagent costs calls for more caution. Below are ten tips for working with any coding agent. Each one is checked against what the research measured, which is sometimes narrower than the abstract suggests.
|
||||
|
||||
|
||||
Instructions kept only in chat can disappear during summarization. Nearly every fix below moves something out of the chat and into a file, a hook, a test, or a fresh session. That's what I meant in June by "the agent forgets, the repo does not."
|
||||
|
||||
## Agent instructions
|
||||
|
||||
### 1. Write for the agent, not for a new hire
|
||||
|
||||
A new hire can ask a teammate what a vague convention means. An agent may proceed with an interpretation you never intended. Anthropic's [docs on project instructions](https://code.claude.com/docs/en/memory) ask for instructions "concrete enough to verify," like "API handlers live in `src/api/handlers/`" instead of "Keep files organized."
|
||||
|
||||
One line in my own Go instructions says to wrap errors with `fmt.Errorf("...: %w", err)` and never discard one silently. An agent can follow that, and a reviewer can check it. Try doing either with "handle errors properly."
|
||||
|
||||
The instruction file is also where agents look first. A Peking University study by Zhijun Gao and Jing Chen [traced 557 real agent sessions](https://arxiv.org/abs/2608.20195) and sorted every documentation touch. Instruction files and the agents' own working notes made up 60.5% of them, and API references only 1.3%. The authors couldn't show that any particular writing style changes behavior. Most of their sessions also came from Claude Code, so the style question is still open.
|
||||
|
||||
### 2. Treat agent instructions like code, because they rot
|
||||
|
||||
Specific instructions go stale. Rename a folder or swap a database, and the file keeps describing a codebase that no longer exists. The agent then has two options: burn turns reconciling the two, or believe the file.
|
||||
|
||||
How often does that happen? Christoph Treude and Sebastian Baltes [ran an existing documentation checker](https://arxiv.org/abs/2606.09090), DOCER, unchanged over 612 agent config files from 356 randomly sampled GitHub repositories. In close to one in four of those repositories, a file named a function, path, or script that had since vanished from the code.
|
||||
|
||||
The authors call the number a feasibility signal rather than a precise rate. That's fair, since only 32 of the 50 flags they checked by hand were real. A second paper explains why rot piles up. Across 441 repositories, [73.8% of AI configuration files](https://arxiv.org/abs/2608.25241) were committed once and never touched again.
|
||||
|
||||
A crude version of the check ran in September against the AGENTS.md of the repository this blog is built from. It flagged 37 of 124 path-like references. Nearly all were noise, mostly relative paths and files that live in other repositories. One wasn't. Since a dark mode change in June, the file had been pointing agents at a `docs-logo.html` partial that was never added to the repository.
|
||||
|
||||
The authors suggest running the check in CI, and DOCER already has a [GitHub Actions version](https://github.com/wesleytanws/DOCER_tool). In May I described [a `Stop` hook that drafts instruction-file updates](/blog/stop-tuning-prompts-build-a-harness/) at the end of every session. It catches drift while the diff is still small. Either works if a human reads what it flags.
|
||||
|
||||
### 3. Keep AGENTS.md short, but don't delete it
|
||||
|
||||
The mistake I see most often is a root AGENTS.md that has grown into a small book loaded into every session. Anthropic's docs for Claude Code set a target of [under 200 lines per file](https://code.claude.com/docs/en/memory), because "longer files consume more context and reduce adherence." Codex [stops reading AGENTS.md files](https://learn.chatgpt.com/docs/agent-configuration/agents-md) once they add up to 32 KiB by default. Since v2.1.277, Claude Code [reads AGENTS.md directly](https://code.claude.com/docs/en/memory#agents-md) as well, so one short file can now brief both agents.
|
||||
|
||||
The cleanest measurement of that cost comes from outside coding. Lodha and colleagues at Microsoft [followed a GPT-5 agent](https://arxiv.org/abs/2606.10209) that itemizes hotel expenses. They trimmed the tool-call history it carried from step to step down to the last five calls. Completion went up from 71.0% to 79.0%, and the agent used 63.9% fewer tokens doing it.
|
||||
|
||||
Closer to home, a team from ETH Zurich and LogicStar.ai [tested context files](https://arxiv.org/abs/2602.11988) with Claude Code, Codex, and Qwen Code. The files didn't measurably help. Neither the generated nor the developer-written ones produced a statistically significant gain in task success. The generated ones also raised inference cost by 20% or more.
|
||||
|
||||
Don't delete the file, though. [Denisov-Blanch and colleagues](https://arxiv.org/abs/2608.25241) followed 509 open-source repositories after they adopted coding agents. Among the agent-first ones, those with no committed AI configuration saw cognitive complexity grow 53%. The ones with at least an instruction file grew 27%. The authors call that hypothesis-generating rather than causal.
|
||||
|
||||
It's still a good reason to keep the file and prune it instead. Anthropic's [best practices](https://code.claude.com/docs/en/best-practices) suggest one question for every line: "Would removing this cause Claude to make mistakes? If not, cut it." Whatever survives the cut but only matters for some tasks belongs in skills or subdirectory files that load when the work gets there.
|
||||
|
||||
## Long sessions
|
||||
|
||||
### 4. Don't let /compact carry your instructions
|
||||
|
||||
When a session gets long, `/compact` is the obvious move: summarize, free up the window, keep going. The research says to watch what you let it summarize.
|
||||
|
||||
A University of Passau team [ran real agent config files through several compactors](https://arxiv.org/abs/2608.22752), including Claude Code's `/compact` on Sonnet 4.6. The prompt asked them to keep every safety instruction verbatim. After five rounds in a row, each halving the text, 10% of the safety instructions were left. After just one round, 53% survived, despite the prompt asking to preserve them all.
|
||||
|
||||
Shiyang Chen [measured what agents do afterwards](https://arxiv.org/abs/2606.22528). Across seven models, one compaction raised policy violations from 0% to 30%, and to 59% for the worst two.
|
||||
|
||||
Where the policy lived decided most of it. Policies in a preserved system message held. The same policies given as a standing user instruction, a memory entry, or tool output decayed by 33 to 50 points. For DeepSeek-V4, a compacted policy did worse than no policy at all. The summary kept the pending task and dropped the policy that constrained it.
|
||||
|
||||
Claude Code handles part of this for you. After `/compact`, it [re-injects its project-root instruction file from disk](https://code.claude.com/docs/en/context-window#what-survives-compaction). Anything you only typed into the chat gets summarized with the rest. AGENTS.md isn't on that list, so if your instructions live there, a [`SessionStart` hook that matches `compact`](https://code.claude.com/docs/en/hooks-guide#re-inject-context-after-compaction) is the documented way to put them back.
|
||||
|
||||
Summaries aren't useless. The expense agent from tip 3 did best, at 91.6%, when a summary replaced the tool calls it dropped. Summaries are fine for the trail of what happened.
|
||||
|
||||
The better habit is to keep each task small enough that the session never needs compacting. Anthropic's best practices already say to run `/clear` between unrelated tasks. When a task runs long anyway, a handoff note you write yourself beats a summary you can't inspect. In August I wrote that [prompt guardrails degrade with context length](/en/blog/sandboxing-coding-agents-yolo-mode/), and compaction is one way that happens.
|
||||
|
||||
### 5. Use hooks for what must always happen
|
||||
|
||||
An instruction in a markdown file is a request. The model honors it most of the time. That's fine for naming conventions, and not fine for anything that has to happen every time. Ask an agent to run the tests before it finishes and it usually will. A `Stop` hook runs them every time and hands the failures back. Claude Code's [hooks guide](https://code.claude.com/docs/en/hooks-guide) calls that "deterministic control: certain actions always happen rather than relying on the LLM to choose to run them."
|
||||
|
||||
Chen's fix points the same way: pinning the policy outside the summary took about 47 tokens and brought violations back to 0%. A hook goes further still. It never enters the context, so compaction has nothing to drop. For infrastructure, [Pulumi Policies](/en/docs/discovery-governance/concepts/policy-as-code/) plays that role at deploy time: a mandatory policy blocks a noncompliant deployment, whatever the agent was told.
|
||||
|
||||
My own setup has two small guardrail hooks. One blocks destructive shell commands, and the other scans every edited file for secrets. While I was working on this post, [rtk](https://github.com/rtk-ai/rtk), a `PreToolUse` hook I use to compress command output, collided with Claude Code's worktree isolation check. Every git command in the session was refused until I called git by its full path. That's the behavior you want for the checks that matter, and a good reason to keep the list of hooks short.
|
||||
|
||||
### 6. Don't switch to a bigger model mid-task
|
||||
|
||||
When a session goes sideways, it's tempting to type `/model`, pick the bigger one, and keep going. Keeping the same transcript can carry earlier mistakes into the stronger model's attempt. Drew Breunig describes this as [context poisoning](https://www.dbreunig.com/2025/06/22/how-contexts-fail-and-how-to-fix-them.html): an error "makes it into the context, where it is repeatedly referenced."
|
||||
|
||||
This tip has the strongest paper on the list. A group at AWS [ran all 500 SWE-bench Verified tasks](https://arxiv.org/abs/2608.24358) with a cheap model that hands over to a strong one partway through. They tested Claude Haiku 4.5 to Opus 4.7 plus a GPT pair, across 58,000 runs. Handing over the full transcript recovered 47% of the gap between the two Claude models and 36% for GPT. It also cost more: $1.61 a task, against $0.72 for starting with Opus. Restarting Opus from scratch, even after paying for Haiku's wasted attempt, came to $0.90 and solved more.
|
||||
|
||||
When they dropped the transcript and kept only the file edits on disk, recovery climbed to 64% for Claude and 84% for GPT. If the task needs the big model, start with it. If you're already halfway in, write down what's done and where it's stuck. Then open a new session on the stronger model, and point it at that note and the working tree.
|
||||
|
||||
## Parallel agents
|
||||
|
||||
### 7. Count the tokens your subagents burn
|
||||
|
||||
Parallel agents burn tokens fast. Anthropic's write-up of [its multi-agent research system](https://www.anthropic.com/engineering/multi-agent-research-system) puts rough numbers on it. Agents use about 4× the tokens of a chat. Multi-agent systems use about 15×. The same post notes that most coding tasks parallelize less well than research does. Claude Code's [cost docs](https://code.claude.com/docs/en/costs) put agent teams at roughly 7× the tokens of a standard session when teammates run in plan mode.
|
||||
|
||||
The newer multi-agent features cost more too. Claude Code's docs say a [dynamic workflow](https://code.claude.com/docs/en/workflows) "can use meaningfully more tokens than working through the same task in conversation." Claude Code warns when a run schedules more than 25 agents or its projected token total passes 1.5 million. Even a message sent through [cross-session messaging](https://code.claude.com/docs/en/cross-session-messaging) "counts toward usage like a prompt you type."
|
||||
|
||||
The cost figures qualify my earlier advice. In May I told you to [use the Explore subagent liberally](/en/blog/stop-tuning-prompts-build-a-harness/), and for exploration I still would. A subagent that reads forty files to find the three that matter keeps all forty out of your main session.
|
||||
|
||||
On Claude subscription plans, `/usage` now breaks recent usage down by subagents, skills, plugins, and MCP servers, so you can see where it went. I prefer to decide which tasks get delegated before the agent starts spawning helpers. In [the parallel coding playbook](/en/blog/parallel-coding-playbook-for-pulumi/), the parallelism came from issues a human wrote, and that's how I'd keep it.
|
||||
|
||||
### 8. Skip the coordinator agent
|
||||
|
||||
The team-lead pattern is tempting. One agent assigns the work, the others report back and message each other, and you get to watch it all happen. Claude Code's own [agent teams](https://code.claude.com/docs/en/agent-teams) are still "experimental and disabled by default," and the research gives a reason not to rush. Dynamic workflows sit alongside agent teams rather than replacing them. Cross-session messaging is for your separate sessions, not a supervised team.
|
||||
|
||||
Giuseppe Destefanis and Tomaso Aste at UCL [tested the cheapest kind of coordinator](https://arxiv.org/abs/2608.16801): a prompt that names one agent the lead. Their sample covered 1,902 graded Claude Code runs, with teams of one to sixteen agents. The coordinator created no communication hub and no reliable improvement.
|
||||
|
||||
The failure worth remembering came from an eight-step invoice pipeline, which worked in nine of ten runs with two or four agents. With eight, one agent per step, it failed all ten. Every failure sat on the same seam: whether to round at each step or once at the end. The agents discussed rounding in all ten runs. It didn't help. As the authors put it, "Talking more did not close an interface that nobody owned."
|
||||
|
||||
The tasks were synthetic Python, and the coordinator was only a prompt label. Still, Walden Yan at Cognition [described the mechanism in 2025](https://cognition.com/blog/dont-build-multi-agents): "Actions carry implicit decisions, and conflicting decisions carry bad results." The rounding failure is a clean example of that.
|
||||
|
||||
A main agent that hands out self-contained tasks and collects the results is enough. Give every interface between those tasks an owner, and write the contract into a file. That's what stood out in GSD when I [compared orchestration frameworks in April](/en/blog/claude-code-orchestration-frameworks/): its orchestrator never touches source files. Dynamic workflows push the same idea further. In the docs' words, "a workflow moves the plan into code," so no lead agent has to hold it in its context.
|
||||
|
||||
## Checking the work
|
||||
|
||||
### 9. Plan the checks first, and keep the writer out of them
|
||||
|
||||
Two habits belong together here. Decide before the first line of code how the work gets checked. Pick the tools the agent uses to test itself, the tests it writes, and the command that proves the build. Know what you'll look at when it says it's done.
|
||||
|
||||
The second habit is to never let the model that wrote the code approve it. Anthropic's [best practices](https://code.claude.com/docs/en/best-practices) call this a writer/reviewer pattern. Their reason: "a fresh context improves code review since Claude won't be biased toward code it just wrote."
|
||||
|
||||
The best measurement comes from an unusual source: [an evaluation of Leni](https://arxiv.org/abs/2607.17044), an AI business analyst. The company that builds Leni wrote it, and the results come from single runs, so read it with that in mind. Of the agent's 11-point gain on SpreadsheetBench Verified, scaffolding and prompting account for 9.5. The verification loop added the last 1.5 by rescuing six tasks, but only two when the model that produced the output did the checking.
|
||||
|
||||
The code repair study in the next tip saw the same thing from the other side. Left to decide on its own when to stop, the model accepted 99.8% of its answers, and 29.5% of what it accepted was wrong. A gate on the visible tests cut that to 2.4%.
|
||||
|
||||
Run the tests and build before review, then [review the change in a fresh session](/en/blog/stop-prompting-design-the-loop/).
|
||||
|
||||
### 10. Stop revising once it passes
|
||||
|
||||
An Alibaba Cloud team [tested repeated revision](https://arxiv.org/abs/2607.24604) by forcing three revisions on each of 30 HumanEval repair tasks with a 7-billion-parameter open model. With test traces as feedback, 82.0% of runs were correct after the first revision. The second revision knocked that down to 67.3%, and the third only brought it back to 69.3%. About 85% found a correct patch at some point along the way, while about one in six found one and then lost it. With plain pass-or-fail feedback, 8.0% found a correct patch and then lost it.
|
||||
|
||||
Test output from an older version of the code was one source of mistakes. In one task, the model read a stale report from a version with a Caesar shift of 12. It then changed the correct shift of 4 back to 12, in every seed.
|
||||
|
||||
The study used a small model, but the precautions are straightforward. Commit the moment the tests pass, so there's a last-known-good version to go back to. Rerun the tests on the current code before each revision instead of feeding back output from three edits ago. Set a retry limit for fixes that keep failing.
|
||||
|
||||
## Where to start
|
||||
|
||||
If you have one afternoon, go in this order:
|
||||
|
||||
1. **Run a drift check on every AGENTS.md you have.** Read what it flags yourself.
|
||||
1. **Cut the root file to what's specific and true.** Move the rest into skills or subdirectory files.
|
||||
1. **Move one must-run step into a hook.** For most teams, that's running the tests.
|
||||
1. **Restart instead of compacting or escalating.** Write the handoff note yourself.
|
||||
1. **Commit on green, and review in a separate session.**
|
||||
|
||||
|
||||
For infrastructure code, `pulumi preview` gives an agent a deterministic diff to check, and a mandatory policy blocks a noncompliant deployment. Wire those checks into Claude Code, Codex, Cursor, or Pulumi Neo with Agent Skills and the Pulumi MCP server.
|
||||
|
||||
|
||||
Start by checking the paths and commands in your root AGENTS.md. Fix anything stale, then remove instructions the agent doesn't need.
|
||||
@@ -0,0 +1,74 @@
|
||||
---
|
||||
title: "2018 Year at a Glance"
|
||||
description: "As we close out 2018, here are some of the exciting things at Pulumi. We've launched our open source community, with support for many major clouds."
|
||||
date: 2018-12-31
|
||||
authors: ["joe-duffy"]
|
||||
tags: ["announcements"]
|
||||
---
|
||||
# 2018 Year at a Glance
|
||||
|
||||
<p class="blog-meta">2018-12-31 · joe-duffy</p>
|
||||
|
||||
As we close out 2018, and enter into
|
||||
a New Year, I was reflecting on our progress here at Pulumi this past year and wanted to share some thoughts.
|
||||
It’s been an incredible year and we are hugely thankful to our passionate community, customers, and
|
||||
partners.
|
||||
|
||||
Here are some of the exciting things that happened:
|
||||
|
||||
**Launching our open source
|
||||
community.** After being hard at work for a little over a year,
|
||||
[we launched our open source project](/en/blog/introducing-pulumi-a-cloud-development-platform/),
|
||||
with the aim of making it considerably easier and more enjoyable to create and operate
|
||||
cloud software. This was a major moment for us. We had previously only shown Pulumi to a few select friends,
|
||||
family, and private beta users, and the reception was beyond our wildest expectations. We got passionate +1’s
|
||||
from cloud engineers of all roles and responsibilities -- developers, infrastructure engineers, operators, and
|
||||
managers alike. The Pulumi community has since grown to thousands of users across hundreds of companies of all
|
||||
sizes spread across the globe. The community is now a warm, welcoming, and collaborative place with significant
|
||||
open source contributions and passionate community leaders emerging who are helping one another while also
|
||||
helping us to make Pulumi even better.
|
||||
|
||||
**Support for major public, private, and hybrid clouds.** We launched with support for the three major public
|
||||
clouds, [AWS](/en/docs/integrations/clouds/aws/), [Azure](/en/docs/integrations/clouds/azure/), and
|
||||
[Google Cloud](/en/docs/integrations/clouds/gcp/), and have since added capabilities across all
|
||||
of them, including adding [serverless](https://www.pulumi.com/registry/packages/aws/how-to-guides/rest-api/),
|
||||
[containers](https://github.com/pulumi/examples/blob/master/aws-ts-containers/index.ts), and
|
||||
[infrastructure](https://github.com/pulumi/examples/blob/master/aws-js-webserver/index.js)
|
||||
productivity libraries -- it is here where we believe Pulumi’s unique approach of using general purpose languages truly
|
||||
shines. We immediately had a wave of inbound interest in applying the Pulumi approach to infrastructure as code in other
|
||||
areas, and quickly added other providers including OpenStack, VMWare vSphere, Alibaba Cloud, F5 BigIP, and more. In
|
||||
September, we unveiled [a native Kubernetes provider](https://www.pulumi.com/registry/packages/kubernetes/) with support for the
|
||||
entire API surface area across all versions, plus an operations tool, [KubeSpy](https://github.com/pulumi/kubespy) --
|
||||
both of which continue to lead to significant community growth. Many customers are loving that they can achieve a
|
||||
consistent engineering workflow across multi-cloud environments -- often spanning public, private, and/or hybrid clouds.
|
||||
|
||||
**Launching our commercial SaaS product.** In October, [we launched our commercial SaaS
|
||||
product](/blog/building-a-future-of-cloud-engineering), with reasonable
|
||||
[pricing](https://www.pulumi.com/pricing/) so that teams of all sizes are able to get their code to the cloud
|
||||
productively, securely, and collaboratively. If Pulumi is like Git -- a local CLI and SDK -- then the Pulumi SaaS is
|
||||
like GitHub -- a hosted service to ensure you can use Pulumi in a team setting. In addition to the Team Edition, which
|
||||
is meant for the “Fortune 500,000,” we also launched the Enterprise Edition, for the Fortune 500. We already have
|
||||
multiple Fortune 500 customers moving into production with Pulumi, and expect this to be a significant area of future
|
||||
growth. Since launching, we’ve added support for more identity providers -- including GitHub, GitLab, and SSO/SAML (for
|
||||
Okta, ADFs, and others) -- as well as team management capabilities, such as RBAC, our GitHub App, GitHub Actions
|
||||
partnership, and more.
|
||||
|
||||
**Closing our Series A funding.** Also in October, [we secured $15MM in additional
|
||||
funds](https://www.geekwire.com/2018/pulumi-raises-15m-series-funding-round-launches-multicloud-app-deployment-service/),
|
||||
which will enable us to scale to meet the incredible opportunity in front of us. The funds will ensure that our open
|
||||
source projects are constantly improving and achieving production quality; that our commercial product can meet the most
|
||||
rigorous business requirements, small or large; and that we can grow our organization in areas necessary to meet our
|
||||
customers’ needs. When we set out to make it 10x easier for teams to do cloud engineering, we saw many facets in need of
|
||||
attention, and these funds will help us take concrete steps towards realizing the vision.
|
||||
|
||||
What an incredible year! It can still hardly believe it’s been just six months since launching.
|
||||
|
||||
As we look to 2019, we plan to continue engaging with and growing our open source community, built on the same tenets of openness and collaboration -- the best part of
|
||||
my job. We have heard loud and clear that what customers need today are solutions, not just raw technologies, and we
|
||||
will continue to deliver commercial value in our Team and Enterprise Edition SaaS products that cloud engineering
|
||||
easier, more secure, and more collaborative.
|
||||
|
||||
We are just getting started and we can’t wait to continue on the journey of
|
||||
reimagining cloud engineering together. Thank you for your passionate support -- and here’s to a wonderful 2019!
|
||||
|
||||
— Joe
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,31 @@
|
||||
---
|
||||
title: "2021 December Hackathon: Introduction"
|
||||
description: "Learn a bit about how Pulumi works as an engineering team in this introduction to our regular hackathon process."
|
||||
date: 2022-01-07
|
||||
authors: ["laura-santamaria"]
|
||||
tags: ["hackathon", "pulumi-culture"]
|
||||
---
|
||||
# 2021 December Hackathon: Introduction
|
||||
|
||||
<p class="blog-meta">2022-01-07 · laura-santamaria</p>
|
||||
|
||||
Pulumi's [hackathon tradition](/en/blog/multi-lang-hackathon/) continued in the last weeks of 2021 with our 2021 December hackathon. For one solid week, we had teams from across the company focus on improvements across the Pulumi ecosystem, and we brought in people from outside the engineering org to get perspectives on different needs. While there were some projects that were focused on internal work, there were still quite a few open-source projects that we can talk about publicly. We'll get more details from some of those teams over a few more posts. In this post, however, we're going to explore a bit about how we worked.
|
||||
|
||||
## Setting up for success
|
||||
|
||||
We set up the teams for success before the hackathon began by starting discussions around project ideas in a Slack channel asynchronously. In in-person hackathons, teams often decide on projects the day of the start of the hackathon. By starting discussions early, we let folks decide on projects they'd be interested in contributing to and drove early architectural discussions so teams could hit the ground running. People also started to get excited about working on the various projects, and they were able to start connecting with folks outside of the engineering team to find time on their calendars early.
|
||||
|
||||
Using a survey, we gathered what sorts of projects or areas of the ecosystem people were interested in working on, their timezone, and how they would like to collaborate. By using this data to sort people into teams, we ensured that people who were interested in learning about new areas of the ecosystem could find the right projects, that people who needed to work in a more synchronous environment could be paired with others in their timezone, and that people who worked similarly could find people who worked like them. It was an interesting experiment.
|
||||
|
||||
## Working remotely
|
||||
|
||||
One cool thing that we tracked this round is all of the different ways we collaborated across the different projects. In general, Pulumi is a remote workplace, and none of the teams were co-located for this hackathon. As a result, we had to consider how teams might work across timezones and outside of the classic physical co-located team dynamic. Each team got to pick the best ways for them to collaborate. Our teams' preferences ranged from daily standups over Zoom to collaboration solely on Slack to extensive pair programming and Zoom hangouts. In all, each team used multiple ways to communicate and engage depending on which parts of their projects they were working on. Teams working on explorations of possible solutions often found that pair programming remotely was a great way to brainstorm, for example. Once teams had a solid sense of what needed to be done to get to the next part of a project, many still attended a hackathon-wide Zoom hangout session daily to have someone to hang out with and discuss any issues that arose. The whole org also had the opportunity to get to know one another a little better, and it did not have the feeling of lost time or forced socialization that weekly virtual watercoolers can have after a couple of meetings as many have found during this period of forced virtual interactions.
|
||||
|
||||
## Showing off what we did
|
||||
|
||||
During the demo at the end of the hackathon, we asked teams to self-report which strategies they found the most helpful, what they learned, and obviously what the results of their hackathon project were. We found that everyone level-set to how their team chose to work, and the pairing of people based on location and work preferences helped a lot to have teams succeed.
|
||||
|
||||
---
|
||||
We'll have more from each team soon! Keep watch on this space for new posts about hackathon projects.
|
||||
|
||||
If you like our way of working and are interested in a new position, we have a lot of positions open right now and will have more in the future! Please head over to our [careers page](https://www.pulumi.com/careers/) to find out how to apply.
|
||||
@@ -0,0 +1,110 @@
|
||||
---
|
||||
title: "2021 End of Year Review"
|
||||
description: "Review the biggest news and information from Pulumi for 2021."
|
||||
date: 2021-12-31
|
||||
authors: ["laura-santamaria"]
|
||||
tags: ["announcements"]
|
||||
---
|
||||
# 2021 End of Year Review
|
||||
|
||||
<p class="blog-meta">2021-12-31 · laura-santamaria</p>
|
||||
|
||||
It’s the end of the 2021 calendar year here at Pulumi, and like everyone, we’re counting down until 2022 while looking back at our year. We’ve had a very exciting year! In case you missed anything from our past year, here’s a rundown of the top stories from Pulumi:
|
||||
|
||||
### January
|
||||
|
||||
Pulumi became [SOC2 certified](/en/blog/pulumis-soc-2-milestone/) in early January 2021.
|
||||
|
||||
### February
|
||||
|
||||
We brought support for all four official Pulumi languages to [EKS](/en/blog/create-eks-clusters-in-your-favorite-language/).
|
||||
|
||||
We released [Python support](/en/blog/automation-api-python/) for our powerful Automation API.
|
||||
|
||||
### March
|
||||
|
||||
We immediately followed up with releasing [C# support](/en/blog/automation-api-dotnet/) for the Automation API.
|
||||
|
||||
The Azure Native provider, which communicates directly with the Azure resource model, [went GA](/en/blog/full-coverage-of-azure-resources-with-azure-native/) (general availability) after a period of being in beta.
|
||||
|
||||
### April
|
||||
|
||||
We had a bit of fun on April Fool’s Day with [Pulumi Interstellar](/en/blog/pulumi-interstellar/) (if you don’t understand April Fool’s Day because it’s not something you have in your country, please know this is a joke for fun).
|
||||
|
||||
The biggest news for April, though, was our PulumiUP event, where we showcased new releases for the Pulumi platform. Here are the big announcements:
|
||||
|
||||
* [Pulumi 3.0](/en/blog/pulumi-3-0/): Automation API, native Providers, Packages and Components, improved SDKs for Python and Go, and new integrations and features.
|
||||
* [Pulumi Packages and multi-language Components](/en/blog/pulumiup-pulumi-packages-multi-language-components/)
|
||||
* The [Google Cloud Native Provider](/en/blog/pulumiup-google-native-provider/)
|
||||
|
||||
### May
|
||||
|
||||
We took a bit of a break in May from the blog to be heads down working on the next features after the excitement of PulumiUP. We did talk a bit about [integration with App Runner](/en/blog/deploy-applications-with-aws-app-runner/), though!
|
||||
|
||||
### June
|
||||
|
||||
We started posting our [release notes as regular updates](/en/blog/pulumi-release-notes-m57/) to the blog.
|
||||
|
||||
We took some time to [dive into testing infrastructure](/en/blog/infrastructure-testing-concepts/) in one of our many educational articles.
|
||||
|
||||
We worked with the community for a [hackathon on multi-language components](/en/blog/multi-lang-hackathon/).
|
||||
|
||||
We announced Pulumi Team Edition with usage-based pricing and a free tier to get you started and Pulumi Enterprise Edition with access control and more on the same [usage-based pricing system](/en/blog/announcing-new-usage-based-pricing-for-your-whole-team/).
|
||||
|
||||
### July
|
||||
|
||||
July was a month of education, with articles on Cloud Engineering as a concept, more on testing, and a new series on Kubernetes:
|
||||
|
||||
* [Cloud Enginering](/en/blog/what-exactly-is-cloud-engineering/)
|
||||
* [Testing](/en/blog/testing-in-practice/)
|
||||
* [Kubernetes](/en/blog/kubernetes-fundamentals-part-one/)
|
||||
|
||||
### August
|
||||
|
||||
We kicked off an entire series on Azure developers for this month. [Start here](/en/blog/top-5-things-for-azure-devs-intro/).
|
||||
|
||||
### September
|
||||
|
||||
September saw preparations for Cloud Engineering Summit, with blog posts talking about the upcoming event. Still, we had time for more features!
|
||||
|
||||
We announced a public preview of a [Helm Release resource](/en/blog/full-access-to-helm-features-through-new-helm-release-resource-for-kubernetes/).
|
||||
|
||||
We launched a [Provider for Snowflake](/en/blog/snowflake-provider-launch/).
|
||||
|
||||
We shipped the [public release of the Pulumi REST API](/en/blog/pulumi-rest-api/), which had been a behind-the-scenes powerhouse.
|
||||
|
||||
We started supporting AWS Lambdas on [Gravitron2 processors](/en/blog/aws-lambda-functions-powered-by-graviton2/).
|
||||
|
||||
We opened up our [roadmap to the public](https://www.pulumi.com/blog/relaunching-pulumis-public-roadmap/) to vote on and discuss upcoming projects.
|
||||
|
||||
And finally, just squeezing into the end of September, we launched the [public preview of the AWS Native Provider](/en/blog/announcing-aws-native/), powered by AWS's Cloud Control API, so you can use Pulumi to work directly with the AWS resource model.
|
||||
|
||||
### October
|
||||
|
||||
Cloud Engineering Summit was our biggest event of the year, and you can enjoy all of the sessions over on [PulumiTV](https://youtube.com/playlist?list=PLyy8Vx2ZoWlodkVaCTO3Y-3vya68J2c6y). That being said, we still had a lot to share on the blog.
|
||||
|
||||
We introduced [resource methods for Pulumi Packages](/en/blog/resource-methods-for-pulumi-packages/).
|
||||
|
||||
We shipped the [1.0 release of the Kubernetes Operator](/en/blog/pulumi-kubernetes-operator-1-0/).
|
||||
|
||||
We delivered the [Pulumi Registry](/en/blog/introducing-pulumi-registry/).
|
||||
|
||||
### November
|
||||
|
||||
We started providing same-day support for [Azure Container Apps](/en/blog/azure-container-apps/).
|
||||
|
||||
We reworked [functions to accept outputs](/en/blog/functions-accept-outputs/).
|
||||
|
||||
### December
|
||||
|
||||
We started some more educational series:
|
||||
|
||||
* [Cloud Systems](/en/blog/cloud-systems-part-one/)
|
||||
* [Organizational Patterns](/en/blog/organizational-patterns-infra-repo/)
|
||||
* [GitOps with the Pulumi Operator](/en/blog/improving-gitops-with-pulumi-operator/)
|
||||
|
||||
### … and Beyond
|
||||
|
||||
As we look forward to 2022, we’re not done yet! We’ve done a lot of things in 2021, and we’re on course to do a lot more in the next year. I’m excited that we’re all along for the ride, and we can’t wait to share more features and launches with you. Thanks for being with us, and here’s to 2022.
|
||||
|
||||
By the way, did you know [we’re hiring](https://www.pulumi.com/careers)?
|
||||
@@ -0,0 +1,213 @@
|
||||
---
|
||||
title: "Hierarchical Config: The Interim Solution"
|
||||
description: "In this article, Rawkode takes a look at how he'd manage project and organizational configuration for Pulumi programs."
|
||||
date: 2022-03-15
|
||||
authors: ["david-flanagan"]
|
||||
tags: ["configuration"]
|
||||
---
|
||||
# Hierarchical Config: The Interim Solution
|
||||
|
||||
<p class="blog-meta">2022-03-15 · david-flanagan</p>
|
||||
|
||||
> [!INFO]
|
||||
> This blog post discusses hierarchical config before Pulumi ESC was released. ESC makes hierarchical config [easy](/en/blog/environments-secrets-configurations-management/).
|
||||
|
||||
A really common question that we receive on the Pulumi team is, "How can we set config at a project level, that can be used across all stacks?".
|
||||
|
||||
When I say "really common" ... I mean really, really common.
|
||||
|
||||
This [issue](https://github.com/pulumi/pulumi/issues/2307) was first open in 2018 and has received 52 votes from the community. Not only that, we've had plenty of similar issues created over the years too.
|
||||
|
||||
- [Feature-Request: project-wide secrets #2445](https://github.com/pulumi/pulumi/issues/2445)
|
||||
- [Feature Request: Global Config Values](https://github.com/pulumi/pulumi-aws/issues/1052)
|
||||
- [How to share a config between projects](https://github.com/pulumi/pulumi/issues/5473)
|
||||
- [Project-wide variables (not stack specific) #6719](https://github.com/pulumi/pulumi/issues/6719)
|
||||
|
||||
This is clearly a feature that our community has asked for! We're happy to say that we delivered the first part of our plans to support [hierarchical config](/en/blog/project-config-mvp/) in early November 2022. While we believe this new functionality satisfies most customer requests, below are some other approaches you can also use.
|
||||
|
||||
## Project Level Config
|
||||
|
||||
Typically, when you need to access the stack configuration in a Pulumi program, you use the `config` package.
|
||||
|
||||
<Chooser type="language" options="typescript,go,python,csharp" />
|
||||
|
||||
<Choosable type="language" values="typescript">
|
||||
|
||||
|
||||
```typescript
|
||||
import { Config } from "@pulumi/pulumi";
|
||||
|
||||
const config = new Config();
|
||||
const region = config.require("region");
|
||||
```
|
||||
|
||||
|
||||
</Choosable>
|
||||
|
||||
<Choosable type="language" values="go">
|
||||
|
||||
|
||||
```go
|
||||
import (
|
||||
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
|
||||
)
|
||||
|
||||
conf := config.New(ctx, "")
|
||||
region := conf.Require("region")
|
||||
```
|
||||
|
||||
|
||||
</Choosable>
|
||||
|
||||
<Choosable type="language" values="python">
|
||||
|
||||
|
||||
```python
|
||||
import pulumi
|
||||
|
||||
config = pulumi.Config();
|
||||
region = config.require('region');
|
||||
```
|
||||
|
||||
|
||||
</Choosable>
|
||||
|
||||
<Choosable type="language" values="csharp">
|
||||
|
||||
|
||||
```csharp
|
||||
using Pulumi;
|
||||
|
||||
var config = new Config();
|
||||
var region = config.Require("region");
|
||||
```
|
||||
|
||||
|
||||
</Choosable>
|
||||
|
||||
|
||||
This code will reach from the <code v-pre>Pulumi.<stack-name>.yaml</code> file and give you access to the configuration values for the prefix you want to load.
|
||||
|
||||
So if you want project level config that works across all stacks, you can "hard code" the configuration. It sounds too simple, right?
|
||||
|
||||
<Chooser type="language" options="typescript,go,python,csharp" />
|
||||
|
||||
<Choosable type="language" values="typescript">
|
||||
|
||||
|
||||
```typescript
|
||||
export const projectLevelConfig = {
|
||||
region: "us-west-2",
|
||||
encryptionKmsKey: "arn:aws:kms:us-west-2:...",
|
||||
issueEmail: "[email protected]"
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
</Choosable>
|
||||
|
||||
<Choosable type="language" values="go">
|
||||
|
||||
|
||||
```go
|
||||
type ProjectLevelConfig struct {
|
||||
Region string
|
||||
EncryptionKmsKey string
|
||||
IssueEmail string
|
||||
}
|
||||
|
||||
const projectLevelConfig = ProjectLevelConfig{
|
||||
Region: "us-west-2",
|
||||
EncryptionKmsKey: "arn:aws:kms:us-west-2:...",
|
||||
IssueEmail: "[email protected]"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
</Choosable>
|
||||
|
||||
<Choosable type="language" values="python">
|
||||
|
||||
|
||||
```python
|
||||
projectLevelConfig = {
|
||||
"region": "us-west-2",
|
||||
"encryptionKmsKey": "arn:aws:kms:us-west-2:...",
|
||||
"issueEmail": "[email protected]"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
</Choosable>
|
||||
|
||||
<Choosable type="language" values="csharp">
|
||||
|
||||
|
||||
```csharp
|
||||
var projectLevelConfig = new Dictionary<string, string>
|
||||
{
|
||||
{ "region", "us-west-2" },
|
||||
{ "encryptionKmsKey", "arn:aws:kms:us-west-2:..." },
|
||||
{ "issueEmail", "[email protected]"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
</Choosable>
|
||||
|
||||
|
||||
These objects/structs/dictionaries can all be consumed and imported across the various components and files within your Pulumi program, but they cannot be used at an organizational level across multiple Pulumi programs ... unless you've got a mono-repo. Do you? 😅
|
||||
|
||||
## Organization Level Config
|
||||
|
||||
So if you want to provide organizational level config, you need to fall deeper into the programming language ecosystem that you're using to build your infrastructure. Every programming language has a way to parse and consume JSON and YAML files. Better yet, every programming language has a way to fetch a remote JSON/YAML file and give you a object/struct/dictionary.
|
||||
|
||||
So really, there's no reason you can't use a remote JSON file to provide a common configuration object across all your Pulumi programs. That being said, there are definitely reasons you _shouldn't_ use a remote JSON file. Maintaining a remote JSON file is much more of a burden than it will initially seem. As you add more values to your JSON file and more teams/projects begin to rely on it, you'll start to feel the pain of schema management. How do I know that the JSON I'm pulling down has the values I need and that fields haven't been changed or replaced? 😬
|
||||
|
||||
So while I 💯 feel like you shouldn't do this, you _can_ if you really need to. Just make sure you understand the tradeoffs and enforce a schema.
|
||||
|
||||
A common way to manage schema is to use a [JSON Schema](https://json-schema.org/) or [CUE](https://cuelang.org) to define the structure of your JSON file.
|
||||
|
||||
By using one of these methods, you can publish a schema that is available within your organization and people can have confidence that the value they pull remotely can be deserialized to a strict type. Using CI/CD you can also ensure the value itself conforms to the schema before updating the public document.
|
||||
|
||||
With JSON Schema, you'd define something like:
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"region": {
|
||||
"type": "string",
|
||||
"default": "us-west-2"
|
||||
},
|
||||
"encryptionKmsKey": {
|
||||
"type": "string",
|
||||
"default": "arn:aws:kms:us-west-2:..."
|
||||
},
|
||||
"issueEmail": {
|
||||
"type": "string",
|
||||
"default": "[email protected]"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
With CUE, this is much more concise. [CUE is really awesome and I encourage you to check it out](https://cuelang.org).
|
||||
|
||||
```yaml
|
||||
region: string | *"eu-west-2"
|
||||
encryptionKmsKey: string | *"arn:aws:kms:eu-west-2:..."
|
||||
issueEmail: string | *"[email protected]"
|
||||
```
|
||||
|
||||
## Pulumi Native Hierarchical Configuration
|
||||
|
||||
So we've worked out that project level configuration is a data structure within our Pulumi programs and it works pretty darn well.
|
||||
|
||||
However, the organization level config is prone and rife with pain, confusion, and delusion. It requires non-trivial tooling and process to ensure that a global document is valid and consistent with downstream consumers. What I've shown you is a "if you must" approach that I would use myself. We've also not even handled the "merge" of organization level with project level overrides, and then stack level overrides. Of course, with code it's all possible, but it's more and more code that you need to write that we don't want you to need to write, right? Right!
|
||||
|
||||
Pulumi wants to make this better for you, which is why we [added project-level config support](/en/blog/project-config-mvp/) and why we are actively exploring additional enhancements. If you want to follow along with our progress on improving the configuration experience, I suggest you watch/subscribe to [this issue](https://github.com/pulumi/pulumi/issues/4604).
|
||||
|
||||
If you want to share your opinions on how **YOU** would like this feature to be implemented, jump into the comments. We'd love to hear from you!
|
||||
|
||||
Speak soon.
|
||||
@@ -0,0 +1,78 @@
|
||||
---
|
||||
title: "Introducing the Pulumiverse"
|
||||
description: "The Pulumiverse is a community organized project to help people contribute and use Pulumi more effectively"
|
||||
date: 2022-03-30
|
||||
authors: ["david-flanagan"]
|
||||
tags: ["community"]
|
||||
---
|
||||
# Introducing the Pulumiverse
|
||||
|
||||
<p class="blog-meta">2022-03-30 · david-flanagan</p>
|
||||
|
||||
Today, we're excited to announce that we're working with the Pulumi community to provide a place to interact and collaborate on Pulumi-based libraries, projects, and educational materials: the [Pulumiverse](https://github.com/pulumiverse).
|
||||
|
||||
|
||||
This project is especially important to me, because it's an idea that I've tried in the past, 2018 😯, and failed to commit to and give it the attention it deserves.
|
||||
|
||||
Fortunately, two other wonderful Pulumi community members stepped up and started to put together their own programme and with me now being at Pulumi, the timing was amazingly serendipitous.
|
||||
|
||||
I spoke with [Ringo De Smet](https://twitter.com/ringods) and [Simen A. W. Olsen](https://twitter.com/cobrazo), the founding members of the Pulumiverse.
|
||||
|
||||
Ringo, Head of CI/CD at Napoleon Games, had this to say about why he's excited to create the Pulumiverse:
|
||||
|
||||
> For infrastructure automation, we had other great tools which preceded Pulumi: Chef, Puppet, Ansible. Any of these tools have a vibrant community of people preventing that all of us need to re-invent the wheel. We had [Sous-Chefs](https://sous-chefs.org) for Chef & [Vox Pupuli](https://voxpupuli.org) for Puppet. But I see a lot of Pulumi users implementing the same stuff over and over again. That's why I think Pulumi needs it's own community. So I started it: [Pulumiverse](https://github.com/pulumiverse)
|
||||
|
||||
Simon, a Developer at [Bjerk AS](https://github.com/bjerkio), shared:
|
||||
|
||||
> I imagine a community filled with like-minded people who build and support Pulumi providers, opinionated components, configurations and share ideas on how we can utilize the power of Pulumi in new ways. So I created Pulumiverse to share my enthusiasm, give back to Pulumi and support developers by building a platform where we can work together!
|
||||
|
||||
## What is the Pulumiverse?
|
||||
|
||||
Pulumiverse, in the simplest form, is a GitHub organization. It provides a community-operated place for anyone to communicate, contribute, and collaborate with other members of the Pulumi community and build abstractions and SDKs that can be shared and used by anyone.
|
||||
|
||||
There are many libraries or collections of components for Pulumi out there. Most of them are made based on requirements of individual companies and developers. Pulumiverse aims to make a community where these libraries can be created and where opinionated configurations for Pulumi resources can be stored and discussed.
|
||||
|
||||
## Current Projects
|
||||
|
||||
The Pulumiverse launches with just a few projects, but we know that, with the support of such an amazing community, the Pulumiverse will grow and grow and provide invaluable resources for anyone who wants to build or use Pulumi for a library or project.
|
||||
|
||||
### Awesome Pulumi
|
||||
|
||||
🐙 [Awesome Pulumi](https://github.com/pulumiverse/awesome-pulumi)
|
||||
|
||||
Everybody loves an awesome list, and this one delivers to you a list of awesome Pulumi resources, books, tutorials, talks, and much more.
|
||||
|
||||
Want your project listed? Open a PR. We can't wait to share it with everyone.
|
||||
|
||||
### Kubernetes SDKs
|
||||
|
||||
🐙 [Kubernetes SDKs](https://github.com/pulumiverse/kubernetes-sdks)
|
||||
|
||||
The Kubernetes SDKs project aims to provide multi-language SDKs for interacting with Kubernetes Custom Resource Definitions (CRDs). Currently, it automatically builds SDKs for:
|
||||
|
||||
- ArgoCD
|
||||
- CertManager
|
||||
- Contour
|
||||
- Crossplane
|
||||
- Istio
|
||||
- Kong Ingress
|
||||
- Knative
|
||||
- RedPanda
|
||||
- Tyk
|
||||
|
||||
This is just the beginning, and we want to expand this collection quickly. So if you're working with Kubernetes and want a rich developer experience for authoring custom resources, open an issue and let us know what you need.
|
||||
|
||||
### Pulumi Concourse & Unifi
|
||||
|
||||
- [Concourse Provider](https://github.com/pulumiverse/pulumi-concourse)
|
||||
- [Unifi Provider](https://github.com/pulumiverse/pulumi-unifi)
|
||||
|
||||
These are community-maintained providers and are examples of how you can share your providers with the world as part of the Pulumiverse.
|
||||
|
||||
### Your Project?
|
||||
|
||||
Got your own library that you think would be beneficial to the community?
|
||||
|
||||
Join us in the #pulumiverse channel on the [Pulumi Slack](https://pulumi.slack.com), and we'll be happy to help you get it over to the Pulumiverse.
|
||||
|
||||
We'll see you soon! 👋
|
||||
@@ -0,0 +1,135 @@
|
||||
---
|
||||
title: "Using Go Generics with Pulumi"
|
||||
description: "In this article, @rawkode shows you how to take advantage of Go's latest feature, Generics, in your Pulumi programs"
|
||||
date: 2022-03-31
|
||||
authors: ["david-flanagan"]
|
||||
tags: ["community"]
|
||||
---
|
||||
# Using Go Generics with Pulumi
|
||||
|
||||
<p class="blog-meta">2022-03-31 · david-flanagan</p>
|
||||
|
||||
::: warning
|
||||
This post is outdated. For the latest on Go Generics, [visit this blog post](/en/blog/go-generics-preview/).
|
||||
:::
|
||||
|
||||
|
||||
March 15th, 2022... just two weeks ago. The Go team [released Go 1.18](https://go.dev/blog/go1.18) to the world. What seems like a trivial point release actually brings a huge new feature to the Go language: Generics.
|
||||
|
||||
In this article, I want to show you how you can use this new feature to build a great developer experience with your abstractions for your Pulumi programs.
|
||||
|
||||
|
||||
## Using Go 1.18
|
||||
|
||||
The first thing you need to do is ensure you have Go 1.18 installed. You can run `go version` to check. If you see anything less than 1.18, you'll need to go upgrade first. The second thing you need to do is update the `go.mod` in your Pulumi program to specify 1.18 as the minimum version.
|
||||
|
||||
```go
|
||||
go 1.18
|
||||
```
|
||||
|
||||
Once you've done these two steps, you're ready to start using generics in your Pulumi programs.
|
||||
|
||||
## Using Generics
|
||||
|
||||
Let's start by asking a question. What is a good use-case for generics? In my experience, generics work really well for allowing us to provide a common interface to our consumers (developers using our APIs) that allows them to use that same interface to accomplish a collection of similar tasks that require different implementations.
|
||||
|
||||
For example, let's assume we want to provide a platform to our developers and allow them to install **ANY** Kubernetes resource. Our goal is to provide an `AddComponent` method that they can call to install either pre-supported components, components created by the platform team, or their own custom components. The glue and important aspect here is that all these components conform to the same interface.
|
||||
|
||||
### Defining The Interface
|
||||
|
||||
In the simplest form, we just need an `Install` function to call that returns either an error or an array of Pulumi resources.
|
||||
|
||||
```go
|
||||
type Component interface {
|
||||
Install(ctx *pulumi.Context, name string) ([]pulumi.Resource, error)
|
||||
}
|
||||
```
|
||||
|
||||
### Creating our Components
|
||||
|
||||
Now we need to provide a component that satisfies this interface. So let's assume that we want to install nginx. First, we create a struct that contains fields for any points of configuration. For today's example, we'll just request the version to be installed and a name; the name being used to ensure if the component is installed more than once, it can be uniquely identified.
|
||||
|
||||
```go
|
||||
type Nginx struct {
|
||||
Version string
|
||||
}
|
||||
|
||||
func (c *Nginx) Install(ctx *pulumi.Context, name string) ([]pulumi.Resource, error) {
|
||||
return []
|
||||
}
|
||||
```
|
||||
|
||||
From there, we can begin to flesh out the `Install` implementation for nginx.
|
||||
|
||||
```go
|
||||
func (c *Nginx) Install(ctx *pulumi.Context) ([]pulumi.Resource, error) {
|
||||
deployment, err := appsv1.NewDeployment(ctx, name, &appsv1.DeploymentArgs{
|
||||
Metadata: &metav1.ObjectMetaArgs{
|
||||
Labels: pulumi.StringMap{
|
||||
"app": pulumi.String(name),
|
||||
},
|
||||
},
|
||||
Spec: &appsv1.DeploymentSpecArgs{
|
||||
Replicas: pulumi.Int(3),
|
||||
Selector: &metav1.LabelSelectorArgs{
|
||||
MatchLabels: pulumi.StringMap{
|
||||
"app": pulumi.String(name),
|
||||
},
|
||||
},
|
||||
Template: &corev1.PodTemplateSpecArgs{
|
||||
Metadata: &metav1.ObjectMetaArgs{
|
||||
Labels: pulumi.StringMap{
|
||||
"app": pulumi.String(name),
|
||||
},
|
||||
},
|
||||
Spec: &corev1.PodSpecArgs{
|
||||
Containers: corev1.ContainerArray{
|
||||
&corev1.ContainerArgs{
|
||||
Name: pulumi.String("nginx"),
|
||||
Image: pulumi.String(fmt.Sprintf("nginx:%s", c.Version)),
|
||||
Ports: corev1.ContainerPortArray{
|
||||
&corev1.ContainerPortArgs{
|
||||
ContainerPort: pulumi.Int(80),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return []pulumi.Resource{
|
||||
deployment,
|
||||
}, nil
|
||||
}
|
||||
```
|
||||
|
||||
This is rather contrived, but hopefully you can see the power of using generics as an interface for platform engineering. Our `AddComponent` implementation for nginx could return a deployment, a service, an ingress with horizontal pod auto-scalers, or any other resource that you want.
|
||||
|
||||
## Using the Components
|
||||
|
||||
Finally, we create our generic function, `AddComponent`, and start having some fun.
|
||||
|
||||
```go
|
||||
func AddComponent[C Component](ctx *pulumi.Context, name string, component C) ([]pulumi.Resource, error) {
|
||||
return component.Install(ctx, name)
|
||||
}
|
||||
|
||||
func main() {
|
||||
pulumi.Run(func(ctx *pulumi.Context) error {
|
||||
AddComponent(ctx, "my-nginx", &Nginx{Version: "1.14.2"})
|
||||
|
||||
return nil
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
Now you and your organization can provide a repository of these components for your developers to consume with their platforms.
|
||||
|
||||
The possibilities are endless.
|
||||
|
||||
Have fun and see you soon! 👋
|
||||
@@ -0,0 +1,151 @@
|
||||
---
|
||||
title: "Pulumi 2025: Neo, Next-Gen Policies, and Platform Engineering at Scale"
|
||||
description: "Pulumi 2025 launches: Neo AI agent for platform engineers, next-gen policy management, IDP, ESC integrations, and IaC enhancements."
|
||||
date: 2025-12-22
|
||||
authors: ["arun-loganathan"]
|
||||
tags: ["features", "product-launches", "pulumi-cloud"]
|
||||
---
|
||||
# Pulumi 2025: Neo, Next-Gen Policies, and Platform Engineering at Scale
|
||||
|
||||
<p class="blog-meta">2025-12-22 · arun-loganathan</p>
|
||||
|
||||
The era of AI-accelerated development has arrived, creating both unprecedented opportunity and unprecedented challenge. Developers ship code faster than ever, but platform teams struggle to keep pace. The velocity gap threatens to become a bottleneck.
|
||||
|
||||
As 2025 comes to a close, let's look back at how we addressed this challenge.
|
||||
|
||||
This year, we took a giant leap forward to close that gap with several major innovations, including purpose-built AI for platform engineers, next-generation policy management that transforms governance into an accelerator, and the foundation for building Internal Developer Platforms that enable self-service without sacrificing control.
|
||||
|
||||
|
||||
- [Pulumi Neo: Your Newest Platform Engineer](#pulumi-neo-your-newest-platform-engineer)
|
||||
- [AI-Assisted Development Everywhere](#ai-assisted-development-everywhere)
|
||||
- [Next-Generation Policy Management: AI-Powered Governance at Scale](#next-generation-policy-management-ai-powered-governance-at-scale)
|
||||
- [Internal Developer Platform: Self-Service Infrastructure at Scale](#internal-developer-platform-self-service-infrastructure-at-scale)
|
||||
- [Secrets Management: Taming Sprawl at Scale](#secrets-management-taming-sprawl-at-scale)
|
||||
- [Identity and Access Management](#identity-and-access-management)
|
||||
- [Pulumi IaC](#pulumi-iac)
|
||||
- [Cloud Provider Support](#cloud-provider-support)
|
||||
- [Language Support](#language-support)
|
||||
- [Infrastructure Operations](#infrastructure-operations)
|
||||
- [Kubernetes Operator](#kubernetes-operator)
|
||||
- [The Year Ahead](#the-year-ahead)
|
||||
|
||||
## Pulumi Neo: Your Newest Platform Engineer
|
||||
|
||||
We launched [Pulumi Neo](/en/blog/pulumi-neo/), purpose-built AI specifically designed for platform engineering challenges. Neo fundamentally changed how platform engineers work.
|
||||
|
||||
<div class="video-container"><iframe src="https://www.youtube.com/embed/9GB9M2l1OgY" title="YouTube video" frameborder="0" allowfullscreen></iframe></div>
|
||||
|
||||
The problem Neo solves is critical: while AI coding assistants have accelerated developers substantially, platform teams have struggled to keep pace. Every line of code that ships faster creates new platform needs - monitoring, secrets, pipelines, compliance checks. The velocity gap between development and platform teams was widening, threatening to become a bottleneck that would slow down entire organizations.
|
||||
|
||||
Neo levels the playing field by giving platform engineers their own dedicated AI tool. Unlike generic AI coding assistants that lack infrastructure context, Neo deeply understands cloud environments, infrastructure as code, secrets management, and the unique challenges platform teams face. It speaks their language and works within their constraints.
|
||||
|
||||
What makes Neo different is how it's built. Neo operates on top of Pulumi's existing platform capabilities - the same IaC, ESC, and policy features you already use for governance become Neo's operational guardrails. It automatically respects your security and policy rules, works within your governance frameworks, and maintains the audit trails and compliance controls your organization requires. This isn't experimental AI retrofitted with infrastructure plugins - it's enterprise-ready intelligence built from the ground up on proven foundations.
|
||||
|
||||
Throughout the year, we enhanced Neo with capabilities that scale your team's expertise. [Custom Instructions and Slash Commands](/en/blog/slash-commands-custom-instructions/) let you encode organizational standards once and Neo applies them automatically, while turning proven prompts into reusable shortcuts anyone can use. [Operating Modes](/en/blog/neo-levels-up/) give you flexible control - from full review to autonomous execution. And [full Pulumi CLI integration](/en/blog/neo-levels-up/) means Neo can handle complete infrastructure workflows, from stack operations to cloud CLI commands.
|
||||
|
||||
### AI-Assisted Development Everywhere
|
||||
|
||||
Beyond Neo, we brought AI assistance directly into development workflows throughout the year. The [Pulumi Model Context Protocol (MCP) Server](/en/blog/mcp-server-ai-assistants/) connects AI-powered code assistants with Pulumi's CLI and registry, enabling real-time resource information without leaving your editor. Use it with GitHub Copilot, Anthropic's Claude Code, and Cursor to accelerate resource discovery and write infrastructure code faster. We enhanced this with [remote MCP server](/en/blog/remote-mcp-server/) support for centralized management and [CLI AI extensions](/en/blog/cli-ai-extensions/) for intelligent command-line assistance.
|
||||
|
||||
## Next-Generation Policy Management: AI-Powered Governance at Scale
|
||||
|
||||
With Neo giving platform teams AI superpowers, we needed to ensure AI-accelerated development remained safe and compliant. The challenge isn't detecting security issues - it's fixing them at scale. Most policy tools stop at detection, leaving teams with overwhelming backlogs and no scalable way to remediate violations.
|
||||
|
||||
We ended that compromise with the [next generation of Pulumi Policies](/en/blog/policy-next-gen/). This comprehensive governance solution moves beyond detection to deliver AI-powered remediation through a two-step lifecycle:
|
||||
|
||||
<div class="video-container"><iframe src="https://www.youtube.com/embed/mwcrOTEf1EQ" title="YouTube video" frameborder="0" allowfullscreen></iframe></div>
|
||||
|
||||
**Get Clean:** We introduced the [Policy Findings Hub](/en/blog/policy-issue-management/) that gives every stakeholder their needed view - leadership sees compliance scores, auditors get control-centric compliance views, and platform teams get a collaborative workspace to triage and track remediation. Combined with [audit scans](/en/blog/policy-audit-scans-for-stacks/), you get instant compliance baselines without blocking developers. Neo integrates directly into the Policy Findings hub to automate the fix itself, generating pull requests with exact code changes needed. For unmanaged resources, Neo even generates code to import the resource into a Pulumi stack and apply the fix.
|
||||
|
||||
**Stay Clean:** We launched [pre-built compliance packs](/en/blog/policy-packs-cis-nist-pci/) for **CIS, NIST, PCI, and HITRUST** across AWS, Azure, and Google Cloud. These out-of-the-box policy packs let you enforce industry-standard compliance frameworks immediately without writing custom policies. They act as universal guardrails by blocking non-compliant changes during deployment. Neo can even author new custom policies - ask Neo to "create a policy that prevents overly permissive IAM roles," and it generates the code. This is how we make AI safe to go fast.
|
||||
|
||||
## Internal Developer Platform: Self-Service Infrastructure at Scale
|
||||
|
||||
<div class="video-container"><iframe src="https://www.youtube.com/embed/3gZmKaAeppc" title="YouTube video" frameborder="0" allowfullscreen></iframe></div>
|
||||
|
||||
Platform engineering teams face a persistent challenge: they're constantly responding to infrastructure requests instead of building the systems that enable self-service at scale. This reactive cycle prevents platform teams from doing their most valuable work - establishing patterns, codifying standards, and creating golden paths that empower developers without sacrificing control.
|
||||
|
||||
We delivered the foundation to break this cycle with [Pulumi IDP](/en/blog/announcing-pulumi-idp/). Pulumi IDP provides everything platform teams need to build world-class internal developer platforms. Codify organizational standards into reusable building blocks. Give developers simple, approachable interfaces that enforce best practices automatically. Transform platform engineering from reactive ticket-taking to strategic enablement.
|
||||
|
||||
The key is [Pulumi Private Registry](/en/blog/announcing-pulumi-private-registry/), your organization's source of truth for golden paths and platform building blocks. Private Registry provides streamlined publishing workflows and simplified discovery, making it easy to share infrastructure abstractions across your organization. Combined with our expanded [public registry](/en/blog/registry-wave-2/) (now hundreds of providers and 7,500 resource types), you have comprehensive options for managing infrastructure across your entire cloud estate.
|
||||
|
||||
What makes this powerful is [next-generation Pulumi Components](/en/blog/pulumi-components/) with true cross-language support. Author infrastructure abstractions once in your preferred language, then consume them in any supported Pulumi language - including YAML for non-programmers, and soon, [HCL](/en/blog/all-iac-including-terraform-and-hcl/). Components include built-in input validation, detailed documentation, and improved error messages. This means platform teams can reach every developer in their organization regardless of language preference, scaling their expertise without scaling their team.
|
||||
|
||||
## Secrets Management: Taming Sprawl at Scale
|
||||
|
||||
The proliferation of secrets across modern cloud environments creates massive security risks. Long-lived credentials pose significant vulnerabilities. Secrets scattered across systems make it nearly impossible to track usage or enforce consistent policies. And manual rotation processes are error-prone and rarely done.
|
||||
|
||||
2025 saw significant expansion of Pulumi ESC to address these challenges across your entire secrets ecosystem:
|
||||
|
||||
**Automated Rotation:** We launched [ESC Rotated Secrets](/en/blog/esc-rotated-secrets-launch/), automatically rotating credentials like AWS IAM access keys on flexible schedules. This eliminates manual rotation effort and significantly reduces vulnerability windows. We expanded this with [database credential rotation](/en/blog/esc-db-secrets-rotation-launch/) for PostgreSQL and MySQL, including support for databases in private VPCs via AWS VPC Lambda connectors.
|
||||
|
||||
**Universal Integration:** We integrated ESC with the secrets management platforms you're already using:
|
||||
|
||||
- [Snowflake](/en/blog/esc-snowflake-providers-launch/) - Dynamic OIDC tokens for temporary authentication plus automated RSA keypair rotation
|
||||
- [Infisical](/en/blog/esc-infisical-providers-launch/) - Dynamic OIDC login and secret fetching from the open-source secrets platform
|
||||
- [Doppler](/en/blog/esc-doppler-providers-launch/) - OIDC access tokens and centralized secret fetching
|
||||
|
||||
For systems without native support, we launched [ESC Connect](/en/blog/esc-connect/), enabling you to build simple HTTPS adapters that integrate any custom or proprietary secret source with ESC.
|
||||
|
||||
These integrations let you maintain existing secrets infrastructure while gaining ESC's centralized management, audit capabilities, and governance controls. You don't have to rip and replace - ESC works with what you have.
|
||||
|
||||
**Better Experience:** We improved ESC usability throughout the year with [streamlined onboarding](/en/blog/esc-new-onboarding/), [approval workflows](/en/blog/esc-open-approvals/) for sensitive environments, and [deletion protection](/en/blog/esc-deletion-protection/) to prevent accidents.
|
||||
|
||||
**Security & Trust:** For organizations with strict compliance needs like HIPAA or GDPR, we launched [Customer-Managed Keys (BYOK)](/en/blog/bring-your-own-keys-with-pulumi-esc/). This allows you to bring your own encryption keys (via AWS KMS) to encrypt secrets stored in ESC, giving you full control over key lifecycles and revocation.
|
||||
|
||||
## Identity and Access Management
|
||||
|
||||
Modern security demands unwavering trust in your security posture. How do you empower teams to deploy rapidly without opening doors to risk or violating compliance mandates?
|
||||
|
||||
We launched [Pulumi IAM](/en/blog/pulumi-cloud-iam-launch/), embedding robust, granular security directly into your cloud development lifecycle. Pulumi IAM provides the unified framework for fine-grained authorization needed to confidently manage modern cloud infrastructure:
|
||||
|
||||
- **Custom Roles**: Define reusable permissions with fine-grained scopes tailored to your organization's specific needs
|
||||
- **Least Privilege Enforcement**: Control precisely who can do what on which specific resources, minimizing the impact if credentials are compromised
|
||||
- **Secure Automation**: Generate scoped access tokens for CI/CD pipelines with only the necessary permissions, eliminating over-privileged service accounts
|
||||
- **Zero Trust Foundation**: Verify every access request and grant minimum necessary access, implementing true Zero Trust principles
|
||||
|
||||
This foundational capability enables true least-privilege for CI/CD pipelines, reduces blast radius if tokens are compromised, and provides the compliance evidence auditors require. Platform and security teams finally have the fine-grained control needed to scale Pulumi usage securely across enterprise organizations without sacrificing velocity.
|
||||
|
||||
## Pulumi IaC
|
||||
|
||||
Platform teams need IaC tools that keep pace with rapidly evolving cloud platforms while providing operational flexibility and reliability. This year we shipped hundreds of enhancements to Pulumi's core IaC capabilities, from major cloud provider updates to new operational primitives that give teams more control over infrastructure lifecycles.
|
||||
|
||||
### Cloud Provider Support
|
||||
|
||||
Managing multi-cloud infrastructure requires comprehensive provider support that keeps pace with rapidly evolving cloud platforms. This year we shipped major provider updates:
|
||||
|
||||
**[AWS Provider 7.0](/en/blog/announcing-7-0-of-the-pulumi-aws-provider/)** brought game-changing improvements: manage resources across multiple AWS regions with a single provider instance, enhanced IAM role chaining with better error handling, and simplified S3 resource management.
|
||||
|
||||
**[Azure Native V3](/en/blog/azure-native-v3/)** delivered a 75% reduction in SDK size while maintaining 100% Azure ARM API coverage. Faster downloads, more manageable package sizes, and improved reliability.
|
||||
|
||||
**[Google Cloud Provider 9.0](/en/blog/gcp-v9-release/)** brought updated API versions, new modules for AI and Google Gemini, and expanded resource support for the latest GCP services.
|
||||
|
||||
**[Direct Terraform Module Support](/en/blog/announcing-direct-tf-modules/)** was one of our most requested features. Execute Terraform modules directly in Pulumi without conversion, providing a seamless migration path for module-heavy projects.
|
||||
|
||||
### Language Support
|
||||
|
||||
**[Java SDK 1.0 GA](/en/blog/java-1-0/)** provides first-class Java support with feature parity to other Pulumi languages, support for all current LTS Java versions, and complete Automation API support.
|
||||
|
||||
### Infrastructure Operations
|
||||
|
||||
**[Resource Hooks](/en/blog/resource-hooks/)** was one of our most requested features. Run custom code at any point in a resource's lifecycle - before creation, after updates, before deletion. This unlocks scenarios like validation checks before deployment, triggering external systems when infrastructure changes, and custom logging and auditing.
|
||||
|
||||
We also shipped [dependent resource replacements](/en/blog/dependent-resource-replacements/), [excluding specific targets from stack operations](/en/blog/excluding-targets-from-stack-operations/), [state taint capabilities](/en/blog/pulumi-state-taint/), [improved refresh and destroy experience](/en/blog/improved-refresh-destroy-experience/) for short-lived credentials, and [CLI control through environment variables](/en/blog/controlling-the-cli-through-environment-variables/).
|
||||
|
||||
### Kubernetes Operator
|
||||
|
||||
The [Pulumi Kubernetes Operator 2.0 reached GA](/en/blog/pko-2-0-ga/) with a completely rewritten, faster codebase featuring enhanced reconciliation logic, better error handling, and automatic retry for temporary failures. We continued enhancing it with [version 2.3.0](/en/blog/pulumi-kubernetes-operator-2-3/) adding preview mode for validating infrastructure changes and structured configuration support for GitOps workflows.
|
||||
|
||||
## The Year Ahead
|
||||
|
||||
2025 was the year we gave platform engineers the tools to thrive in the age of AI-accelerated development. We ended the impossible choice between velocity and control. We transformed governance from a blocker into an accelerator. We enabled self-service without sacrificing governance.
|
||||
|
||||
But this is just the beginning. The foundation we built this year sets the stage for even bigger innovations ahead. Neo will get smarter as it learns from infrastructure patterns across the community. Policy management will expand to more compliance frameworks. IDP will enable more sophisticated self-service workflows. ESC will integrate with more platforms.
|
||||
|
||||
The future of platform engineering is strategic, proactive, and AI-enabled. Platform teams won't be bottlenecks - they'll be the strategic enablers who make sustainable velocity possible.
|
||||
|
||||
Thank you for being part of the Pulumi community. Your feedback drives everything we build. We can't wait to show you what comes next.
|
||||
|
||||
Want to try these features? Check out our [documentation](/en/docs/), join our [community Slack](https://slack.pulumi.com/), or [contact us](https://www.pulumi.com/contact/) to discuss how Pulumi can transform your platform engineering practice.
|
||||
|
||||
Here's to an incredible 2025, and an even better 2026!
|
||||
@@ -0,0 +1,298 @@
|
||||
---
|
||||
title: "7 Ways to Deal with Application Secrets in Azure"
|
||||
description: "Learn secure ways to manage application secrets in Azure. From Key Vault to environment variables, discover best practices to safeguard sensitive data."
|
||||
date: 2019-07-26
|
||||
authors: ["mikhail-shilkov"]
|
||||
tags: ["azure", "security"]
|
||||
---
|
||||
# 7 Ways to Deal with Application Secrets in Azure
|
||||
|
||||
<p class="blog-meta">2019-07-26 · mikhail-shilkov</p>
|
||||
|
||||
Every non-trivial application relies on configuration values that may depend on the current execution environment. Some of these values contain sensitive information that shouldn't be shared publicly. In general, the fewer parties that have access to those secret values, the safer the application will be—in fact, in an ideal world, no one would be granted direct access to those secrets.
|
||||
|
||||
Examples of secret configuration values include:
|
||||
|
||||
- A connection string to a message bus or a database
|
||||
- A SAS Token to an Azure Storage account
|
||||
- An access key for a third-party service
|
||||
|
||||
There's no one universal way to manage secrets, as a lot depends on the context in which they are used. In this article, I go through seven ways to use secret values in a .NET Core application running in Azure. I start with naively hard-coded strings and build up from there to more secure options.
|
||||
|
||||
While the concepts are universally applicable, my code samples focus on a .NET application running in **Azure App Service** and configured with Pulumi. Consider them best practices for managing client secrets in Azure.
|
||||
|
||||
1. [Hard-Coded Application Secrets](/en/blog/7-ways-to-deal-with-application-secrets-in-azure/#1-hard-coded-application-secrets)
|
||||
2. [Configuration Files](/en/blog/7-ways-to-deal-with-application-secrets-in-azure/#2-configuration-files)
|
||||
3. [Environment Variables](/en/blog/7-ways-to-deal-with-application-secrets-in-azure/#3-environment-variables)
|
||||
4. [Azure Key Vault](/en/blog/7-ways-to-deal-with-application-secrets-in-azure/#4-azure-key-vault)
|
||||
5. [Accessing Key Vault with Managed Identities](/en/blog/7-ways-to-deal-with-application-secrets-in-azure/#5-accessing-key-vault-with-managed-identities)
|
||||
6. [Accessing Key Vault from Application Settings](/en/blog/7-ways-to-deal-with-application-secrets-in-azure/#6-accessing-key-vault-from-application-settings)
|
||||
7. [Role-Based Access Control (RBAC)](/en/blog/7-ways-to-deal-with-application-secrets-in-azure/#5-role-based-access-control-(rbac))
|
||||
|
||||
## 1. Hard-Coded Application Secrets
|
||||
|
||||
Whenever you want to try a new API requiring a secret access token, it's natural to copy-paste that secret into your code and run it—simply to make sure that the setup works.
|
||||
|
||||
For example, you are testing integration with a payment service:
|
||||
|
||||
``` cs
|
||||
var apiKey = "payment-service-key";
|
||||
var paymentService = new PaymentService(apiKey);
|
||||
```
|
||||
|
||||
or you want to start sending messages to an **Azure Storage Queue**:
|
||||
|
||||
``` cs
|
||||
var connectionString = "DefaultEndpointsProtocol=https;AccountName=account-name;AccountKey=account-key";
|
||||
var storageAccount = CloudStorageAccount.Parse(connectionString);
|
||||
var queueClient = storageAccount.CreateCloudQueueClient();
|
||||
```
|
||||
|
||||
Both snippets are fine for a Hello-World application with a lifespan of two hours. However, I would strongly discourage doing so in any code that can potentially be checked into a source control system, even for a 10-minute experiment. Don't copy-paste secrets into files which are part of a git repository. One accidental `git commit & git push`—and the secrets are compromised.
|
||||
|
||||
Avoid the "Secrets as Code" practice: there are bots scanning your GitHub repository for those.
|
||||
|
||||
## 2. Configuration Files
|
||||
|
||||
Traditionally, putting secrets in a configuration file is considered more secure. For classic .NET applications, this would be an `app.config` or a `web.config` file. The idea is that the values on a developer machine are different from the values in the production environment. Non-sensitive development settings are kept on disk and maybe in [source control](/en/docs/iac/concepts/secrets/), while the real secrets are only injected by a deployment script or a CI/CD system, so they are not exposed publicly.
|
||||
|
||||
In the .NET Core world, a configuration is usually stored in an `appsettings.json` file:
|
||||
|
||||
``` json
|
||||
{
|
||||
"MyConfig": {
|
||||
"PaymentApiKey": "payment-service-key",
|
||||
"StorageConnectionString": "DefaultEndpointsProtocol=https;AccountName=account-name;AccountKey=account-key"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
which is then mapped to a plain C# object in code:
|
||||
|
||||
``` cs
|
||||
public class MyConfig
|
||||
{
|
||||
public string PaymentApiKey { get; set; }
|
||||
public string StorageConnectionString { get; set; }
|
||||
}
|
||||
```
|
||||
|
||||
With some configuration not shown here, the properties are filled at startup time and can be used in the code as a plain object:
|
||||
|
||||
``` cs
|
||||
var apiKey = config.PaymentApiKey;
|
||||
var paymentService = new PaymentService(apiKey);
|
||||
// ...
|
||||
|
||||
var connectionString = config.StorageConnectionString;
|
||||
var storageAccount = CloudStorageAccount.Parse(connectionString);
|
||||
var queueClient = storageAccount.CreateCloudQueueClient();
|
||||
```
|
||||
|
||||
In my experience, such setup still poses substantial risks. `appsettings.production.json` may still be accidentally checked into the source control. Developers tend to use real cloud resources for their local and test environments, which do contain sensitive information that can be exploited when leaked.
|
||||
|
||||
On top of that, it doesn't feel right to mix configuration—how many threads to run, or how big the message batches should be—with secret connection strings and API keys in the same file. These are separate kinds of configuration, and they warrant different workflows.
|
||||
|
||||
## 3. Environment Variables and Application Settings
|
||||
|
||||
One alternative approach is to read the secret values from environment variables. .NET Core configuration system can parse environment variables instead of, or in addition to the settings files. Likewise, one could read such values with a one-liner in C#:
|
||||
|
||||
``` cs
|
||||
var apiKey = Environment.GetEnvironmentVariable("PAYMENT_API_KEY");
|
||||
// ...
|
||||
|
||||
var connectionString = Environment.GetEnvironmentVariable("STORAGE_CONNECTION_STRING");
|
||||
// ...
|
||||
```
|
||||
|
||||
Your CI/CD system should inject those values as part of the deployment pipeline.
|
||||
|
||||
The App Service gives you the ability to set environment variables via **Application Settings**. Here is a snippet of a Pulumi program that passes both secret values to `appSettings`:
|
||||
|
||||
``` ts
|
||||
const cfg = new pulumi.Config();
|
||||
const paymentApiKey = cfg.requireSecret("paymentApiKey");
|
||||
|
||||
const storageAccount = new azure.storage.Account("storage", {
|
||||
resourceGroupName: resourceGroup.name,
|
||||
accountReplicationType: "LRS",
|
||||
accountTier: "Standard",
|
||||
});
|
||||
|
||||
const app = new azure.appservice.AppService("app", {
|
||||
resourceGroupName: resourceGroup.name,
|
||||
appServicePlanId: appServicePlan.id,
|
||||
appSettings: {
|
||||
"PAYMENT_API_KEY": paymentApiKey,
|
||||
"STORAGE_CONNECTION_STRING": storageAccount.primaryConnectionString,
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
The Storage connection string is produced by the Pulumi program directly, so it doesn't have to be placed anywhere outside the program itself.
|
||||
|
||||
The payment service key is provided by a third party, so its encrypted value is stored in Pulumi configuration. Read [Managing Secrets with Pulumi](/en/blog/managing-secrets-with-pulumi/) to learn about security options available for secrets in Pulumi config.
|
||||
|
||||
## 4. Azure Key Vault
|
||||
|
||||
In the previous example, both secrets end up in Application Settings. Every person with sufficient permissions may go to the App Service and see them in clear text. While this can be restricted, it's a good idea to grant full read access to the application developers and operators of the App Service to give them the full picture when troubleshooting issues.
|
||||
|
||||
In some cases, compliance to a certain standard may *require* the use of a certified key management service offering enhanced security for sensitive secrets.
|
||||
|
||||
Azure has a dedicated service for storing secrets, [**Azure Key Vault**](https://learn.microsoft.com/en-us/azure/key-vault/). You can create and populate a Key Vault with all the secrets from the same Pulumi program:
|
||||
|
||||
``` ts
|
||||
const vault = new azure.keyvault.KeyVault("vault", {
|
||||
resourceGroupName: resourceGroup.name,
|
||||
sku: {
|
||||
name: "standard",
|
||||
},
|
||||
tenantId: tenantId,
|
||||
accessPolicies: [{
|
||||
tenantId,
|
||||
// The current principal has to be granted permissions to Key Vault so that it can actually add and then remove
|
||||
// secrets to/from the Key Vault. Otherwise, 'pulumi up' and 'pulumi destroy' operations will fail.
|
||||
objectId: currentPrincipal,
|
||||
secretPermissions: ["delete", "get", "list", "set"],
|
||||
}],
|
||||
});
|
||||
|
||||
const secret = new azure.keyvault.Secret("paymentApiKey", {
|
||||
keyVaultId: vault.id,
|
||||
value: paymentApiKey,
|
||||
});
|
||||
```
|
||||
|
||||
Additionally, one or many **Service Principals** (SP) should be configured to access the Key Vault. One SP which has been granted secret management access deploys the infrastructure by running the Pulumi program. That's why the snippet above assigns an access policy to `currentPrincipal`.
|
||||
|
||||
Another SP is used by the application itself to read the secret values. The Client ID and Client Secret parameters are placed in the application configuration. Finally, .NET Core configuration gets hooked to the Key Vault at startup:
|
||||
|
||||
``` cs
|
||||
builder.AddAzureKeyVault(
|
||||
$"https://{config["azureKeyVault:vault"]}.vault.azure.net/",
|
||||
config["azureKeyVault:clientId"],
|
||||
config["azureKeyVault:clientSecret"]
|
||||
);
|
||||
```
|
||||
|
||||
This solution is not entirely satisfying though, since we've traded storing the secrets for storing SP credentials. Is that a big enough win? Luckily, it's easy to get rid of those credentials with Managed identities.
|
||||
|
||||
## 5. Accessing Key Vault with Managed Identities
|
||||
|
||||
With **Managed identities**, Azure takes care of creating a Service Principal, passing the credentials, rotating secrets, and so on. Enabling a managed identity on App Service is just an extra option:
|
||||
|
||||
``` ts
|
||||
const app = new azure.appservice.AppService("app", {
|
||||
resourceGroupName: resourceGroup.name,
|
||||
appServicePlanId: appServicePlan.id,
|
||||
// A system-assigned managed identity
|
||||
identity: {
|
||||
type: "SystemAssigned",
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
On top of that, the managed principal must be granted access to the Key Vault:
|
||||
|
||||
``` ts
|
||||
const principalId = app.identity.apply(id => id.principalId);
|
||||
|
||||
// Grant App Service access to KV secrets
|
||||
new azure.keyvault.AccessPolicy("app-policy", {
|
||||
keyVaultId: vault.id,
|
||||
tenantId: tenantId,
|
||||
objectId: principalId,
|
||||
secretPermissions: ["get"],
|
||||
});
|
||||
```
|
||||
|
||||
Now, the configuration block in the .NET Core app doesn't need to retrieve any secrets. `AzureServiceTokenProvider` helps with the authentication process:
|
||||
|
||||
``` cs
|
||||
var azureServiceTokenProvider = new AzureServiceTokenProvider();
|
||||
var keyVaultClient = new KeyVaultClient(
|
||||
new KeyVaultClient.AuthenticationCallback(
|
||||
azureServiceTokenProvider.KeyVaultTokenCallback));
|
||||
builder.AddAzureKeyVault(
|
||||
keyVaultEndpoint, keyVaultClient, new DefaultKeyVaultSecretManager());
|
||||
```
|
||||
|
||||
That's quite a bit of a boilerplate, but there is a way to get rid of it.
|
||||
|
||||
## 6. Accessing Key Vault from Application Settings
|
||||
|
||||
App Service has a neat feature of integrating its Application Settings with Key Vault. It allows us to combine #3 and #5's approaches and get the best of both:
|
||||
|
||||
``` ts
|
||||
// Produce a URI of the KV secret defined above
|
||||
const secretUri = pulumi.interpolate`${secret.vaultUri}secrets/${secret.name}/${secret.version}`;
|
||||
|
||||
const app = new azure.appservice.AppService("app", {
|
||||
resourceGroupName: resourceGroup.name,
|
||||
appServicePlanId: appServicePlan.id,
|
||||
// A system-assigned managed identity
|
||||
identity: {
|
||||
type: "SystemAssigned",
|
||||
},
|
||||
appSettings: {
|
||||
// The setting points directly to the KV setting
|
||||
"PAYMENT_API_KEY": pulumi.interpolate`@Microsoft.KeyVault(SecretUri=${secretUri})`,
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
With that, the API key is loaded into the App Service environment variable without its value being publicly exposed anywhere!
|
||||
|
||||
## 7. Role-Based Access Control
|
||||
|
||||
What is the most secure way to deal with secrets? *Have no secrets*. The Storage Account connection string is a great example when it's possible to avoid storing and reading the sensitive value altogether.
|
||||
|
||||
**Role-Based Access Control** (RBAC) of **Azure Active Directory** (AAD) is a great tool to manage permissions in a declarative way. Let's assume our application only needs to send messages to one Storage Queue. Instead of storing a full connection string with an access token, the connection string should point to the account, and the identity behind the App Service should be granted write permissions to the required Storage Queue:
|
||||
|
||||
``` ts
|
||||
const permission = new azure.role.Assignment("send", {
|
||||
principalId,
|
||||
scope: pulumi.interpolate`${storageAccount.id}/queueServices/default/queues/${queue.name}`,
|
||||
roleDefinitionName: "Storage Queue Data Message Sender",
|
||||
});
|
||||
```
|
||||
|
||||
We can put the queue URL into Application Settings because there's nothing secret in it:
|
||||
|
||||
``` ts
|
||||
const queueUri = pulumi.interpolate`${storageAccount.primaryQueueEndpoint}${queue.name}`;
|
||||
|
||||
const app = new azure.appservice.AppService("app", {
|
||||
resourceGroupName: resourceGroup.name,
|
||||
appServicePlanId: appServicePlan.id,
|
||||
identity: {
|
||||
type: "SystemAssigned"
|
||||
},
|
||||
appSettings: {
|
||||
"STORAGE_QUEUE_URL": queueUri,
|
||||
},
|
||||
```
|
||||
|
||||
It takes a bit of C# boilerplate to send a message with role-based authorization:
|
||||
|
||||
``` cs
|
||||
var provider = new AzureServiceTokenProvider();
|
||||
string accessToken = await provider.GetAccessTokenAsync("https://storage.azure.com/");
|
||||
var tokenCredential = new TokenCredential(accessToken);
|
||||
var storageCredentials = new StorageCredentials(tokenCredential);
|
||||
var url = Environment.GetEnvironmentVariable("StorageBlobUrl");
|
||||
var queue = new CloudQueue(new Uri(url), storageCredentials);
|
||||
queue.AddMessage(new CloudQueueMessage("Hello"));
|
||||
```
|
||||
|
||||
Let's hope another quality-of-life improvement is on the way.
|
||||
|
||||
## Role of infrastructure as code
|
||||
|
||||
While security practices may vary depending on application requirements, Pulumi plays an essential role in the appropriate setup of service configuration and environment:
|
||||
|
||||
- It links an output of one resource to another one's input, avoiding the need to store the values.
|
||||
- It provides a built-in mechanism to manage external secrets.
|
||||
- It is a great way to take advantage of Azure features like Managed identities and RBAC in a cohesive way.
|
||||
|
||||
Infrastructure as Code helps make your applications secure and reliable. Refer to the [full example of using Key Vault, Managed identities, RBAC with App Service and Pulumi](https://github.com/pulumi/examples/tree/master/classic-azure-ts-msi-keyvault-rbac).
|
||||
@@ -0,0 +1,57 @@
|
||||
---
|
||||
title: "Accelerate Revenue Growth and Time to Market with Platform Engineering"
|
||||
description: "When organizations build faster and more streamlined release cycles, they gain TTM advantage and a profound business edge over competitors."
|
||||
date: 2024-09-04
|
||||
authors: ["marlowe-fenne"]
|
||||
tags: ["platform-engineering"]
|
||||
---
|
||||
# Accelerate Revenue Growth and Time to Market with Platform Engineering
|
||||
|
||||
<p class="blog-meta">2024-09-04 · marlowe-fenne</p>
|
||||
|
||||
With 62% of large organizations already using multi-cloud (Cloud Computing News), business leaders are looking for their next competitive advantage. Finding these next-gen business edges can be a real challenge, but some innovative organizations are discovering that time to market can be a big competitive lever. They are accelerating their development cycles by up to 70% and seizing opportunities to build new markets, establish new brands and capture market share. This Time To Market (TTM) advantage can apply to entire markets as well as any aspect of your product or service connected to the cloud.
|
||||
|
||||
|
||||
Gaining these big advantages means solving some big challenges. In most cases, development cycles are expanding as software gets more complex. “It’s a study in entropy, and it is not getting any more simple,” said “DevOps for Dummies” author Emily Freeman ([SiliconAngle](https://siliconangle.com/2021/09/29/devops-dummies-author-emily-freeman-introduces-revolutionary-model-modern-software-development-awsq3/)). Factor in multi-cloud infrastructure factors such as different programming languages (C#, Python, Java, .NET, GO, YAML), policies and authentication, and the magnitude of these challenges becomes very real.
|
||||
|
||||
Underpinning these challenges are how organizations approach their software development lifecycle (SDLC), multi-cloud infrastructure, security policies and more. Collectively, these factors dramatically affect time to market and how companies handle all of the preceding laundry list of challenges around the complexity of cloud deployments. When organizations evolve their processes and business models toward faster, smarter, more streamlined release cycles, they gain TTM advantage and that profound business edge over competitors.
|
||||
|
||||
So, how are these organizations getting there?
|
||||
|
||||
## More speed and scale with Platform Engineering
|
||||
|
||||
Platform Engineering is becoming a business essential for cloud-first companies: “The Platform engineering team typically sits between operations and more IT-centric folks and developers, and their goals are to be a center of excellence, establish best practices, put in place the systems that enable the organization to scale, and ultimately empower the rest of the organization to ship faster with confidence, compliance, cost control - all the things necessary for a modern enterprise to go to the cloud,” said Joe Duffy, CEO and Founder of Pulumi.
|
||||
|
||||
Good platform engineering is a method of handling all platform deployments, rollbacks, load balancing and operations in a consistent, centralized manner that is programmatic and can be controlled and directed by the engineering organization. A robust platform engineering solution helps the organization to solve its complex cloud issues, including those around deployment, testing, policy and security. Great platform engineering becomes a secret weapon that some cloud-first organizations are using to outmaneuver and disrupt their competitors.
|
||||
|
||||
When DevOps, infrastructure and product delivery teams are working together in one seamless platform - using their favorite languages across all their stacks, they’re faster, happier, and more productive, which means faster development cycles and faster TTM. They deliver new features, new services and new products more quickly than competitors, and adjust and make needed changes faster, adapting to market changes and conditions more quickly.
|
||||
|
||||
[Aptos Labs](https://www.pulumi.com/customers/aptos/) is a blockchain and Web3 technology leader that’s leveraged this approach very well. “Switching to Pulumi for our IaC needs helped us massively accelerate development velocity, while upgrading the security, compliance, and cost control policies,” said Christian Thielemann, Software Engineer.
|
||||
|
||||
As more organizations recognize its business transformation value, platform engineering is becoming a strategic differentiator. For example [4IR](https://www.pulumi.com/customers/4ir/), a technology provider for manufacturing and IOT industries, said, “[platform engineering] has emerged as a key element in our strategy, creating tangible value for us by reducing infrastructure deployment time, up-skilling our team, and accelerating our time to market.”
|
||||
|
||||
## How Platform Engineering delivers business value
|
||||
|
||||
Platform engineering allows organizations to improve productivity by removing bottlenecks around configuring cloud architectures, provisioning, testing and deployment. It improves security and compliance by setting up guardrails to enforce policy and security, preventing costly issues that can significantly delay or stop product deployment. By automating these necessary parts of cloud deployment, and enabling control and the ability to deliver consistency and repeatability, platform engineering makes your platform team and development teams faster, more efficient and improves their ability to work together.
|
||||
|
||||
Platform engineering tools deliver the ability for your platform team to program and control all aspects of the platform on which your software will run. You can manage deployment, scaling, provisioning, testing and more using code that you control and can manage and improve. That means predictability and the ability to fine control all of your platforms. The better platform engineering tools work with a range of cloud platforms and can be integrated into your existing toolset very easily.
|
||||
|
||||
All of these specific advantages mean that platform engineering delivers profound improvements in deployment times, testing times and provisioning leading to reductions of 70% or more in time to market. Snowflake, one of the largest cloud data warehouses, used by a large percentage of the Fortune 500, saw an improvement in deployment time from one and a half weeks to less than a day.
|
||||
|
||||
Effectively, platform engineering does the following things to deliver faster time to market and faster revenue growth:
|
||||
|
||||
- Solves a whole set of TTM issues and problems
|
||||
- Simultaneous benefits to DevOps, engineering and the business
|
||||
- Faster development cycles
|
||||
- Reduces cloud complexity and cost and inefficiency
|
||||
- Better adherence to policy and security
|
||||
|
||||
Platform engineering results also vary widely by company due to multiple factors. While 75% of participants in a [recent Gartner survey](https://www.gartner.com/en/infrastructure-and-it-operations-leaders/topics/platform-engineering) said their organizations had adopted platform engineering, only 44% had formalized their approach. Plus, some solutions are more agile and flexible than others. "When we did it with Terraform, it took two weeks to do [infrastructure deployments]. Now we do it in about three hours a day. So that's how much of an improvement Pulumi gave us on our deployment time," said Matt Stephenson, Senior Principal Software Engineer at [Starburst Data](https://www.pulumi.com/customers/starburst/).
|
||||
|
||||
To find out more about how platform engineering can help you, take a look at these case studies:
|
||||
|
||||
- [Aptos Labs](https://www.pulumi.com/customers/aptos/) uses Pulumi to transform development, increasing velocity by up to 10x while improving security, compliance, and cost control.
|
||||
- [4IR](https://www.pulumi.com/customers/aptos/) uses Pulumi to reduce infrastructure deployment times, up-skill its team, and accelerate time to market.
|
||||
- [Starburst Data](https://www.pulumi.com/customers/starburst/) uses Pulumi to reduce infrastructure deployments from 2 weeks to just 3 hours.
|
||||
|
||||
If you are ready to talk to an expert about how platform engineering can help your organization, [click here](https://www.pulumi.com/contact/?form=sales).
|
||||
@@ -0,0 +1,73 @@
|
||||
---
|
||||
title: "Enforce Access Token Expiry Policies in Pulumi Cloud"
|
||||
description: "Organization admins can now cap the maximum expiry of personal, organization, and team access tokens, so no credential outlives your rotation policy."
|
||||
date: 2026-07-27
|
||||
authors: ["devon-grove"]
|
||||
tags: ["features", "security"]
|
||||
---
|
||||
# Enforce Access Token Expiry Policies in Pulumi Cloud
|
||||
|
||||
<p class="blog-meta">2026-07-27 · devon-grove</p>
|
||||
|
||||
Pulumi Cloud organizations can now enforce a maximum expiry on the access tokens used against them. Organization admins can set a cap in days, and from that point on, personal, organization, and team tokens operating on resources in the org must carry an expiration within the cap for requests to succeed. Tokens that never expire, or that have too much lifetime remaining, get rejected with an error that tells the user exactly how to regain access.
|
||||
|
||||
|
||||
## Why cap token lifetimes
|
||||
|
||||
Many organizations already have a credential rotation policy that says tokens must expire, but until now, Pulumi Cloud could only *recommend* an expiry at creation time. Nothing stopped a member from creating a never-expiring personal token, and nothing aged out the long-lived tokens created before your policy existed.
|
||||
|
||||
That gap matters because a leaked token is only as dangerous as its remaining lifetime. A token that never expires is a standing liability.
|
||||
|
||||
By adding support for access token expiry policies, Pulumi Cloud now closes the gap at the platform level. Once you've set the cap, Pulumi Cloud enforces it immediately for your organization, including for tokens that already exist.
|
||||
|
||||
## How it works
|
||||
|
||||
In your organization's settings, navigate to **Settings** > **Access Management** > **Other** and scroll to **Access token expiry policy**:
|
||||
|
||||

|
||||
|
||||
You can also get there from the **Access Tokens** tab, where a banner shows whether a policy is in effect — select **Edit policy**:
|
||||
|
||||

|
||||
|
||||
The policy is a single number: the maximum expiry, in days, for tokens used against your organization. Compliance is checked on every request, and a token complies when both of these are true:
|
||||
|
||||
1. It has an expiration date. Never-expiring tokens violate any policy.
|
||||
1. Its *remaining lifetime* — the time between now and its expiration — is within the cap.
|
||||
|
||||
Because compliance is based on remaining lifetime rather than the expiry chosen at creation, the policy is pragmatic about existing credentials: a token created a year ago with a two-year expiry becomes compliant once it has less than the cap remaining. You're enforcing exposure going forward, not retroactively punishing old tokens that are already near the end of their life.
|
||||
|
||||
Enforcement is tailored to each token type:
|
||||
|
||||
- **Organization and team tokens** can't be created out of compliance: the creation dialog caps the expiry picker at your policy maximum, and the API rejects requests that exceed it. Existing machine tokens that violate the policy stop authenticating and need to be recreated with a compliant expiry.
|
||||
- **Personal tokens** span all of a user's organizations, so they can't be blocked at creation. Instead, a non-compliant personal token is rejected when it's used against your organization, and the member sees an error explaining the policy and how to fix it. The personal token creation dialog also warns members when a chosen expiry doesn't meet a policy in one of their organizations, steering them toward a compliant choice up front.
|
||||
- **Web console sessions are unaffected**, as are the short-lived tokens issued through [OIDC token exchange](/en/docs/administration/guides/oidc-issuers/) — those are already bounded by their issuer.
|
||||
|
||||
Once a policy is active, the creation dialog does the steering for you — the expiry picker tops out at the policy maximum:
|
||||
|
||||

|
||||
|
||||
## Rolling it out without breaking CI
|
||||
|
||||
The riskiest moment for any new enforcement policy is the moment you turn it on. Two things make that safe here.
|
||||
|
||||
First, **Preview affected tokens** shows you the blast radius before you save: the organization and team tokens that would stop authenticating under the proposed cap, by name and creator. Recreate those credentials with compliant expiries first, then save the policy.
|
||||
|
||||

|
||||
|
||||
Second, rejections are designed to be self-explanatory. A blocked request fails with a `403 Forbidden` that names your organization and its policy maximum, so a member whose personal token no longer complies knows immediately what happened and what to do: generate a new token that meets the policy. Policy changes are also recorded in your organization's [audit logs](/en/docs/administration/concepts/audit-logs/).
|
||||
|
||||

|
||||
|
||||
A reasonable rollout looks like:
|
||||
|
||||
1. Decide on a cap that matches your rotation policy. 90 days is a common choice for CI credentials.
|
||||
1. Use **Preview affected tokens** and recreate any non-compliant machine tokens.
|
||||
1. Socialize the change in your organization: personal tokens without a compliant expiry will stop working against the organization.
|
||||
1. Save the policy. From here on, the platform enforces it for you.
|
||||
|
||||
## Get started
|
||||
|
||||
The access token expiry policy is available now in your organization's access settings. For the full reference — compliance rules, per-token-type behavior, and exemptions — see the [access tokens documentation](/en/docs/administration/concepts/access-tokens/#access-token-expiry-policy).
|
||||
|
||||
If you have feedback, we'd love to hear it in the [Pulumi Community Slack](https://slack.pulumi.com/) or on [GitHub](https://github.com/pulumi/pulumi/issues).
|
||||
@@ -0,0 +1,260 @@
|
||||
---
|
||||
title: "Adopting Existing Cloud Resources into Pulumi"
|
||||
description: "Migrating from Terraform or another IaC tool? Learn how to adopt existing cloud infrastructure from Terraform, CloudFormation, ARM, YAML, and more into Pulumi."
|
||||
date: 2019-08-15
|
||||
authors: ["luke-hoban"]
|
||||
tags: ["migration"]
|
||||
---
|
||||
# Adopting Existing Cloud Resources into Pulumi
|
||||
|
||||
<p class="blog-meta">2019-08-15 · luke-hoban</p>
|
||||
|
||||
::: info
|
||||
See [Migrating From Terraform to Pulumi](/en/docs/iac/guides/migration/migrating-to-pulumi/from-terraform/) for updated documentation on migrating from Terraform.
|
||||
:::
|
||||
|
||||
|
||||
Most cloud infrastructure projects involve working with existing cloud resources — either building on top of existing resources or adopting existing resources under management with a new and more robust infrastructure provisioning solution.
|
||||
|
||||
Whether you are adopting resources that were deployed manually using your cloud provider's console or CLI — or migrating existing infrastructure from tools like Terraform or CloudFormation — Pulumi makes it easy to adopt and manage your existing resources.
|
||||
|
||||
|
||||
When working with existing resources, there are typically two scenarios:
|
||||
|
||||
* You need to reference existing resources to use as inputs to new resources in Pulumi
|
||||
* You need to adopt existing resources under management so they can be updated/managed in Pulumi
|
||||
|
||||
We'll review referencing existing resources, and then dive deeper into how you can adopt existing resources with Pulumi.
|
||||
|
||||
## Referencing Existing Resources
|
||||
|
||||
For referencing existing resources, Pulumi offers several tools.
|
||||
|
||||
* The `.get` methods available on every resource let you [get all the details for a resource](https://www.pulumi.com/registry/packages/aws/api-docs/ec2/vpc#look-up) from the cloud provider based just on its `id`.
|
||||
* The `StackReference` resource lets you reference outputs of another stack for use as inputs to a stack, which is very useful for [organizing projects and stacks](/en/docs/iac/guides/basics/organizing-projects-stacks/).
|
||||
* [`terraform.state.RemoteStateReference()`](/blog/using-terraform-remote-state-with-pulumi), [`aws.cloudformation.getStack()`](/registry/packages/aws/api-docs/cloudformation/getstack) and [`azure.core.SubscriptionTemplateDeployment.get()`](/registry/packages/azure/api-docs/core/subscriptiontemplatedeployment#look-up) let you reference outputs from existing Terraform, CloudFormation and ARM deployments respectively.
|
||||
|
||||
Together, these make it easy to reference existing infrastructure regardless of how it was provisioned.
|
||||
|
||||
## Adopting Existing Resources
|
||||
|
||||
For adopting existing resources, Pulumi offers the [`import`](/registry/packages/azure/api-docs/core/subscriptiontemplatedeployment#look-up) resource option to request that a resource defined in your Pulumi program adopt an existing resource in the cloud provider instead of creating a new one. In keeping with its focus on infrastructure as *code*, Pulumi lets you specify this `import` behavior inside the Pulumi code for your infrastructure deployment, instead of outside of it in some manual workflow. In its simplest form, it looks like this:
|
||||
|
||||
```typescript
|
||||
const myVpc = new aws.ec2.Vpc("my-vpc", {
|
||||
cidrBlock: "10.11.0.0/16",
|
||||
}, { import: "vpc-02cd0cd2d807f340c"});
|
||||
```
|
||||
|
||||
When Pulumi first sees a resource (in this case `my-vpc`), if it has an `import` option set, it will adopt the existing resource specified by that `import` ID from the cloud provider under management instead of creating a new resource.
|
||||
|
||||
We can see this when we deploy our Pulumi program with `pulumi up`:
|
||||
|
||||
```
|
||||
$ pulumi up
|
||||
Previewing update (dev):
|
||||
|
||||
Type Name Plan
|
||||
pulumi:pulumi:Stack importtestaws-dev
|
||||
= └─ aws:ec2:Vpc my-vpc import
|
||||
|
||||
Resources:
|
||||
= 1 to import
|
||||
1 unchanged
|
||||
```
|
||||
|
||||
Because the `import` is provided in code, it can be configured in several different ways. You can look up import ids from Pulumi config instead of hard-coding them into programs, construct ids from predictable names based on program parameters, or even conditionally add the <code v-pre>import: <id></code> property depending on whether one wants to deploy a stack in "adoption" or "creation" mode.
|
||||
|
||||
Import can be used for a wide variety of adoption scenarios, from importing a single resource to migrating an entire stack from an existing tool like Terraform. You can even automate an entire migration process across dozens of instances of infrastructure deployment. For small numbers of resources, you can just paste in individual resource IDs. For larger conversions, you can create a mapping of cloud resource ids (in JSON, CSV, or any other format) and load that into your Pulumi program with something like `import: idMapping[name]`. If you are importing or migrating dozens of stacks, you can even select between which of these mappings to use via a Pulumi config setting.
|
||||
|
||||
### Walkthrough of Adopting Existing Infrastructure to Pulumi
|
||||
|
||||
To see one of these scenarios in action end-to-end, let's walk through the process of deploying some "existing" infrastructure outside of Pulumi, and then adopting it under management of a Pulumi program. You can also check out the video below which walks through the same scenario.
|
||||
|
||||
<div class="video-container"><iframe src="https://www.youtube.com/embed/kX_3Wdft0Ms" title="YouTube video" frameborder="0" allowfullscreen></iframe></div>
|
||||
|
||||
We'll use Terraform to provision our "existing" infrastructure. These resources could have been provisioned manually in the console, or using platform-native infrastructure-as-code solutions like CloudFormation, ARM or Kubernetes YAML.
|
||||
|
||||
We'll also use TypeScript, though of course, the process is similar regardless of the language you choose.
|
||||
|
||||
#### 1. Deploy "existing" infrastructure
|
||||
|
||||
For our "existing" infrastructure, we'll use a small Azure deployment of a Virtual Machine and corresponding Resource Group and Networking resources. We'll deploy [this example](https://www.terraform.io/docs/providers/azurerm/r/virtual_machine.html#example-usage-from-an-azure-platform-image-) using `terraform`. Save the code in that example to `main.tf` and run `terraform init` and then `terraform apply` to deploy it.
|
||||
|
||||
#### 2. Create a Pulumi program
|
||||
|
||||
Next, we'll create a Pulumi program to describe the same infrastructure that exists in Azure. We could write this by hand, but since we used Terraform to define the original infrastructure, we also have the option to use [`tf2pulumi`](/docs/iac/guides/migration/migrating-to-pulumi/from-terraform/) to automatically convert our `.tf` files to Pulumi.
|
||||
|
||||
|
||||
::: info
|
||||
As of Pulumi CLI v3.71.0, `tf2pulumi` has been replaced with `pulumi convert --from terraform`. [Converting Full Terraform Programs to Pulumi blog](/en/blog/converting-full-terraform-programs-to-pulumi/) has more details.
|
||||
:::
|
||||
|
||||
|
||||
```bash
|
||||
$ pulumi new azure-typescript --force
|
||||
$ tf2pulumi
|
||||
```
|
||||
|
||||
We now have a Pulumi program in `index.ts` that describes the same infrastructure:
|
||||
|
||||
```typescript
|
||||
import * as pulumi from "@pulumi/pulumi";
|
||||
import * as azure from "@pulumi/azure";
|
||||
|
||||
const config = new pulumi.Config();
|
||||
const prefix = config.get("prefix") || "tfvmex";
|
||||
|
||||
const mainResourceGroup = new azure.core.ResourceGroup("main", {
|
||||
location: "West US 2",
|
||||
name: `${prefix}-resources`,
|
||||
});
|
||||
const mainVirtualNetwork = new azure.network.VirtualNetwork("main", {
|
||||
addressSpaces: ["10.0.0.0/16"],
|
||||
location: mainResourceGroup.location,
|
||||
name: `${prefix}-network`,
|
||||
resourceGroupName: mainResourceGroup.name,
|
||||
});
|
||||
|
||||
...
|
||||
|
||||
```
|
||||
|
||||
If we try to run a `pulumi up` now to deploy this though, we see that as we expect, we will try to deploy a new copy of the infrastructure:
|
||||
|
||||
```
|
||||
$ pulumi up
|
||||
Previewing update (dev2):
|
||||
|
||||
Type Name Plan
|
||||
+ pulumi:pulumi:Stack importazure-dev2 create
|
||||
+ ├─ azure:core:ResourceGroup main create
|
||||
+ ├─ azure:network:VirtualNetwork main create
|
||||
+ ├─ azure:network:Subnet internal create
|
||||
+ ├─ azure:network:NetworkInterface main create
|
||||
+ └─ azure:compute:VirtualMachine main create
|
||||
|
||||
Resources:
|
||||
+ 6 to create
|
||||
```
|
||||
|
||||
Instead of creating new resources though, we want to adopt the existing ones.
|
||||
|
||||
#### 3.Add `import` IDs
|
||||
|
||||
As we saw earlier, to import existing resources, we simply add <code v-pre>import: <id></code> to the resource options of a resource defined in Pulumi. That resource will then be imported instead of created.
|
||||
|
||||
We can try this for one resource first. We can look in our `terraform.tfstate` file or in the Azure Portal and see that the id of the Resource Group is `/subscriptions/0282681f-7a9e-424b-80b2-96babd57a8a1/resourceGroups/tfvmex-resources`. So let's use that:
|
||||
|
||||
```typescript
|
||||
const mainResourceGroup = new azure.core.ResourceGroup("main", {
|
||||
location: "West US 2",
|
||||
name: `${prefix}-resources`,
|
||||
}, { import: "/subscriptions/0282681f-7a9e-424b-80b2-96babd57a8a1/resourceGroups/tfvmex-resources" });
|
||||
```
|
||||
|
||||
#### 4. Adopt resources
|
||||
|
||||
Now our preview shows that it will import the `ResourceGroup` instead:
|
||||
|
||||
```
|
||||
$ pulumi up
|
||||
Previewing update (dev2):
|
||||
|
||||
Type Name Plan
|
||||
+ pulumi:pulumi:Stack importazure-dev2 create
|
||||
= └─ azure:core:ResourceGroup main import
|
||||
|
||||
Resources:
|
||||
+ 1 to create
|
||||
= 1 to import
|
||||
2 changes
|
||||
```
|
||||
|
||||
We can complete this process, adding <code v-pre>import: <id></code> to all resources, and then import them all to Pulumi.
|
||||
|
||||
```
|
||||
Updating (dev2):
|
||||
|
||||
Type Name Status
|
||||
+ pulumi:pulumi:Stack importazure-dev2 created
|
||||
= ├─ azure:core:ResourceGroup main imported
|
||||
= ├─ azure:network:VirtualNetwork main imported
|
||||
= ├─ azure:network:Subnet internal imported
|
||||
= ├─ azure:network:NetworkInterface main imported
|
||||
= └─ azure:compute:VirtualMachine main imported
|
||||
|
||||
Resources:
|
||||
+ 1 created
|
||||
= 5 imported
|
||||
6 changes
|
||||
|
||||
Duration: 8s
|
||||
```
|
||||
|
||||
As noted earlier, if we were doing this at larger scale, instead of putting resource IDs inline in the code, we could load the IDs from a file or from Pulumi config. These IDs could be automatically extracted from our `.tfstate` file or from queries against our cloud provider.
|
||||
|
||||
#### 5. Managing the resources with Pulumi
|
||||
|
||||
Once all of the resources are adopted into Pulumi, we can manage them by making incremental changes in Pulumi, and can discontinue using the existing `.tf` files to manage this set of infrastructure. For example, if we want to add a new tag to our Virtual Machine, we can use the code below. We can also now remove the `import` property if we want, or else leave it intact so long as the `id` of the resource remains the same. (If in the future we need to make a change that replaces one of these imported resources, Pulumi will require that the `id` property is removed, as it will no longer be correct.)
|
||||
|
||||
```diff
|
||||
const mainVirtualMachine = new azure.compute.VirtualMachine("main", {
|
||||
location: mainResourceGroup.location,
|
||||
name: `${prefix}-vm`,
|
||||
networkInterfaceIds: [mainNetworkInterface.id],
|
||||
osProfile: {
|
||||
// Note: This comes directly from the original Terraform example, but
|
||||
// you would typically replace this with secret config in Pulumi, which
|
||||
// you can do after importing these resources into Pulumi.
|
||||
adminPassword: "Password1234!",
|
||||
adminUsername: "testadmin",
|
||||
computerName: "hostname",
|
||||
},
|
||||
osProfileLinuxConfig: {
|
||||
disablePasswordAuthentication: false,
|
||||
},
|
||||
resourceGroupName: mainResourceGroup.name,
|
||||
storageImageReference: {
|
||||
offer: "UbuntuServer",
|
||||
publisher: "Canonical",
|
||||
sku: "16.04-LTS",
|
||||
version: "latest",
|
||||
},
|
||||
storageOsDisk: {
|
||||
caching: "ReadWrite",
|
||||
createOption: "FromImage",
|
||||
managedDiskType: "Standard_LRS",
|
||||
name: "myosdisk1",
|
||||
},
|
||||
tags: {
|
||||
environment: "staging",
|
||||
+ managedBy: "Pulumi",
|
||||
},
|
||||
vmSize: "Standard_DS1_v2",
|
||||
});
|
||||
```
|
||||
|
||||
Deploying this, Pulumi shows we will update the existing resource to add the new tag:
|
||||
|
||||
```
|
||||
~ tags: {
|
||||
+ managedBy: "Pulumi"
|
||||
}
|
||||
```
|
||||
|
||||
Since the resources are now being managed by Pulumi, we can use the Pulumi Service to see them:
|
||||
|
||||

|
||||
|
||||
And then navigate to the Virtual Machine in the Azure Portal and see the newly added `managedBy: Pulumi` tag.
|
||||
|
||||

|
||||
|
||||
The result is that we have migrated our existing infrastructure into Pulumi and can now use all the rich features of Pulumi to manage it going forward!
|
||||
|
||||
## Conclusion
|
||||
|
||||
With Pulumi, you can easily work with existing cloud infrastructure, either referencing the existing infrastructure as inputs to new cloud infrastructure defined in Pulumi, or adopting existing infrastructure under management with Pulumi.
|
||||
|
||||
[Get started](https://www.pulumi.com/up/) with Pulumi today!
|
||||
@@ -0,0 +1,256 @@
|
||||
---
|
||||
title: "Advanced AWS Networking: Part 1"
|
||||
description: "Learn how to create a hub-and-spoke architecture in AWS using Pulumi with Python. This is Part 1 of a 2 Part series."
|
||||
date: 2023-04-05
|
||||
authors: ["josh-kodroff", "andy-taylor", "jose-juhala"]
|
||||
tags: ["aws", "networking", "hub-and-spoke", "python"]
|
||||
---
|
||||
# Advanced AWS Networking: Part 1
|
||||
|
||||
<p class="blog-meta">2023-04-05 · josh-kodroff, andy-taylor, jose-juhala</p>
|
||||
|
||||
In this blog series you will learn how to create a hub-and-spoke network architecture in AWS with centralized egress and traffic inspection. In this first installment, we'll talk about the benefits of this architecture and begin to lay out some of its parts in Python with Pulumi, the infrastructure as code tool that enables you to manage infrastructure with real programming languages!
|
||||
|
||||
|
||||
::: info
|
||||
The complete code for this project is available on [GitHub](https://github.com/pulumi/examples/tree/master/aws-py-hub-and-spoke-network), which is a great place to go for full context.
|
||||
:::
|
||||
|
||||
|
||||
## What is a hub-and-spoke network?
|
||||
|
||||
A hub-and-spoke network is a common architecture for creating a network topology that provides isolation and security for your workloads. The hub-and-spoke architecture you'll be creating on AWS has three main components: an inspection VPC, AWS Transit Gateway, and a series of spoke VPCs:
|
||||
|
||||
* The **inspection VPC** provides centralized egress. It is the only VPC that has a route to the internet, so all other VPCs in the architecture must route their traffic through the inspection VPC. In part II of this blog post, you'll add AWS Firewall to the inspection VPC to allow all traffic to the internet to be governed by a single set of policies.
|
||||
* Network connectivity between VPCs is accomplished via **[AWS Transit Gateway](https://aws.amazon.com/transit-gateway/)**. The Transit Gateway maintains a central routing table that is used to route traffic from the spoke VPCs to the internet. We also need to maintain routes so that return traffic from the internet can be routed back to the correct spoke VPC.
|
||||
* The **spoke VPCs** are where we run our application workloads. They are isolated from each other and cannot communicate with each other unless we explicitly allow a network path. They will be able to communicate with the internet by default, but only through the inspection VPC's NAT gateways.
|
||||
|
||||
A fully fleshed-out version of the architecture, with multiple spoke VPCs follows:
|
||||
|
||||

|
||||
|
||||
|
||||
::: info
|
||||
We could also enable communication _between_ the spoke VPCs by adding routes to the Transit Gateway routing table. Traffic between spoke VPCs _would not_ be desirable for security reasons if those VPCs represent different environments of the same workload (e.g., QA, UAT, and production). Traffic between spoke VPCs _would_ potentially be desirable if those VPCs represent multiple workloads in the _same_ environment, for example, our production online store and our production ERP software.
|
||||
|
||||
For simplicity, we will not be enabling routes between spoke VPCs in this architecture.
|
||||
:::
|
||||
|
||||
|
||||
For a full discussion of all the considerations of building multi-VPC networks on AWS, see the excellent AWS whitepaper [Building a Scalable and Secure Multi-VPC AWS Network Infrastructure](https://docs.aws.amazon.com/whitepapers/latest/building-scalable-secure-multi-vpc-network-infrastructure/welcome.html).
|
||||
|
||||
## Why use a hub-and-spoke network with centralized egress?
|
||||
|
||||
There’s several advantages to this architecture:
|
||||
|
||||
* **Cost savings:** We save costs by allowing all of our spoke VPCs to share a single set of highly-available NAT gateways in the inspection VPC. There are costs to sending our traffic over AWS Transit Gateway, but in most scenarios Transit Gateway costs are significantly less than the cost of running NAT gateways in each spoke VPC.
|
||||
* **Stable public IP addresses:** Because all of our egress traffic to the internet originate from the same set of stable, public elastic IP addresses (attached to the NAT gateways in the inspection VPC), we can more easily interface with systems that use high-trust, network-based security models (i.e., IP allowlists). Network administrators for the systems we want to interface with only need allow a limited number of IPs to establish connectivity once and up-front, as opposed to having to allow new IPs for every VPC we create. These high-trust systems are often based in the data center and may have small and infrequent change windows, so only having to go through the change management process once, not for every spoke VPC we add, is a big win.
|
||||
* **Centralized traffic inspection:** When all traffic to the internet flows through our inspection VPC, we only need to apply a firewall and associated rules in a single place. This way, we can easily ensure that all network traffic to the internet complies with our organization’s security policies. (In the part of this post, we’ll add in AWS Firewall to our inspection VPC to add centralized traffic inspection capabilities to our architecture.)
|
||||
|
||||
## Creating the first Transit Gateway resources
|
||||
|
||||
After initializing your Pulumi project and adding the necessary references to the [AWS](https://www.pulumi.com/registry/packages/aws/) and [AWSX](https://www.pulumi.com/registry/packages/awsx/), you can add the resources relating to your Transit Gateway.
|
||||
|
||||
You'll need to configure a CIDR block for your network's supernet. All spoke VPCs in this codebase must fall under the supernet CIDR block. You will use the supernet CIDR to create a route in the inspection VPC that will route traffic returning from the internet to the Transit Gateway. The Transit Gateway will, in turn, route the traffic back to the specific originating spoke VPC.
|
||||
|
||||
You can get the supernet CIDR from the Pulumi configuration. If the configuration value is not set, you can default to a CIDR block of `10.0.0.0/8`:
|
||||
|
||||
```python
|
||||
config = pulumi.Config()
|
||||
supernet_cidr = config.get("supernet-cidr") or "10.0.0.0/8"
|
||||
```
|
||||
|
||||
Now you can add some of your initial Transit Gateway resources. You'll start with the Transit Gateway itself along with some route tables for your inspection and spoke VPCs, respectively. You will add routes to this route table later to allow traffic from our spoke VPCs to the internet, as well as routes from the internet back to the originating spoke VPC:
|
||||
|
||||
```python
|
||||
tgw = aws.ec2transitgateway.TransitGateway(
|
||||
"tgw",
|
||||
aws.ec2transitgateway.TransitGatewayArgs(
|
||||
description=f"Transit Gateway - {project}",
|
||||
default_route_table_association="disable",
|
||||
default_route_table_propagation="disable",
|
||||
tags={
|
||||
"Name": "Pulumi"
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
inspection_tgw_route_table = aws.ec2transitgateway.RouteTable(
|
||||
"post-inspection-tgw-route-table",
|
||||
aws.ec2transitgateway.RouteTableArgs(
|
||||
transit_gateway_id=tgw.id,
|
||||
tags={
|
||||
"Name": "post-inspection",
|
||||
}
|
||||
),
|
||||
# Adding the TGW as the parent makes the output of `pulumi up` a little
|
||||
# easier to understand as it groups these resources visually under the TGW
|
||||
# on which they depend.
|
||||
opts=pulumi.ResourceOptions(
|
||||
parent=tgw,
|
||||
),
|
||||
)
|
||||
|
||||
spoke_tgw_route_table = aws.ec2transitgateway.RouteTable(
|
||||
"spoke-tgw-route-table",
|
||||
aws.ec2transitgateway.RouteTableArgs(
|
||||
transit_gateway_id=tgw.id,
|
||||
tags={
|
||||
"Name": "spoke-tgw",
|
||||
}
|
||||
),
|
||||
opts=pulumi.ResourceOptions(
|
||||
parent=tgw,
|
||||
),
|
||||
)
|
||||
```
|
||||
|
||||
## Creating the inspection VPC
|
||||
|
||||
|
||||
::: info
|
||||
The code samples in this section are not exhaustive. That is, they do not contain every line of code required so that we can focus on the most illustrative portions. See the [GitHub repo](https://github.com/pulumi/examples/tree/master/aws-py-hub-and-spoke-network) for full context.
|
||||
:::
|
||||
|
||||
|
||||
Now that you've added some foundational Transit Gateway resources, you can create your inspection VPC.
|
||||
|
||||
The inspection VPC is implemented as a [Pulumi component resource](/en/docs/iac/concepts/components/). While we do not need to create multiple inspection VPCs in this codebase, implementing the inspection VPC as a component resource enhances the readability of both the code and the output by grouping all resources that belong to the inspection VPC in the output of `pulumi up`. You can also improve the component's readability by placing its code in a separate file (in this case, `inspection.py`).
|
||||
|
||||
When you create a component resource in Python, it's helpful to create a class that contains the arguments to the component resource. This allows you to pass the arguments to the component resource as a single object, which makes the code easier to read and understand. You can create a terse and easily readable arguments class in Python with the [`@dataclass` decorator](https://docs.python.org/3/library/dataclasses.html):
|
||||
|
||||
```python
|
||||
@dataclass
|
||||
class InspectionVpcArgs:
|
||||
supernet_cidr_block: str
|
||||
vpc_cidr_block: str
|
||||
tgw_id: pulumi.Input[str]
|
||||
spoke_tgw_route_table_id: pulumi.Input[str]
|
||||
inspection_tgw_route_table_id: pulumi.Input[str]
|
||||
firewall_policy_arn: pulumi.Input[str]
|
||||
```
|
||||
|
||||
Then, you can create the component resource class itself. The component resource class must inherit from `pulumi.ComponentResource`. The constructor for the component resource class must call the constructor of the base class, passing in the resource type (a string that uniquely identifies the component type, in the form of `{project}:{module}:{component_name}`), the resource name, and the resource options:
|
||||
|
||||
```python
|
||||
class InspectionVpc(pulumi.ComponentResource):
|
||||
def __init__(self, name: str, args: InspectionVpcArgs, opts: pulumi.ResourceOptions = None) -> None:
|
||||
super().__init__("awsAdvancedNetworking:index:InspectionVpc", name, None, opts)
|
||||
```
|
||||
|
||||
You'll start by creating a VPC with the [AWSX VPC component](https://www.pulumi.com/registry/packages/awsx/api-docs/ec2/vpc/). We'll leverage the sensible defaults the component provides to create a VPC across 3 availability zones for high availability. You can either create a single NAT gateway in our inspection VPC to save costs, or create 3 NAT gateways, one in each availability zone, to provide high availability. See the code for details.
|
||||
|
||||
After creating the VPC, you'll then need to attach the inspection VPC to the Transit Gateway. This is how the inspection VPC will be able to utilize the Transit Gateway and accept traffic from the spoke VPCs:
|
||||
|
||||
```python
|
||||
self.tgw_attachment = aws.ec2transitgateway.VpcAttachment(
|
||||
f"{name}-tgw-vpc-attachment",
|
||||
aws.ec2transitgateway.VpcAttachmentArgs(
|
||||
transit_gateway_id=self.args.tgw_id,
|
||||
subnet_ids=self.vpc.isolated_subnet_ids,
|
||||
vpc_id=self.vpc.vpc_id,
|
||||
transit_gateway_default_route_table_association=False,
|
||||
transit_gateway_default_route_table_propagation=False,
|
||||
appliance_mode_support="enable",
|
||||
tags={
|
||||
"Name": f"{name}",
|
||||
},
|
||||
),
|
||||
# We can only have one attachment per VPC, so we need to tell Pulumi
|
||||
# explicitly to delete the old one before creating a new one:
|
||||
pulumi.ResourceOptions(
|
||||
delete_before_replace=True,
|
||||
depends_on=[self.vpc],
|
||||
parent=self,
|
||||
)
|
||||
)
|
||||
```
|
||||
|
||||
Then add a route to the Transit Gateway route table for the _spoke_ VPCs that routes all traffic outside of the VPC to the inspection VPC (or to be precise, the Transit Gateway attachment in the inspection VPC). This route only needs to be added once as it will apply to all spoke VPCs, so we add it here in the inspection VPC since that's where we create the Transit Gateway attachment:
|
||||
|
||||
```python
|
||||
aws.ec2transitgateway.Route(
|
||||
f"{name}-default-spoke-to-inspection",
|
||||
aws.ec2transitgateway.RouteArgs(
|
||||
destination_cidr_block="0.0.0.0/0",
|
||||
transit_gateway_attachment_id=self.tgw_attachment.id,
|
||||
transit_gateway_route_table_id=args.spoke_tgw_route_table_id,
|
||||
),
|
||||
opts=pulumi.ResourceOptions(
|
||||
parent=self,
|
||||
)
|
||||
)
|
||||
```
|
||||
|
||||
Next, add routes within the inspection VPC's isolated subnets that route traffic to the internet through the NAT gateway. The Transit Gateway:
|
||||
|
||||
```python
|
||||
for subnet_id in isolated_subnet_ids:
|
||||
route_table = aws.ec2.get_route_table(
|
||||
subnet_id=subnet_id
|
||||
)
|
||||
|
||||
aws.ec2.Route(
|
||||
f"{self.name}-route-{subnet_id}-to-tgw",
|
||||
aws.ec2.RouteArgs(
|
||||
route_table_id=route_table.id,
|
||||
destination_cidr_block="0.0.0.0/0",
|
||||
nat_gateway_id=self.nat_gateway.id,
|
||||
),
|
||||
pulumi.ResourceOptions(
|
||||
parent=self,
|
||||
),
|
||||
)
|
||||
```
|
||||
|
||||
Finally, you'll need to add routes within the inspection VPC's public subnets (where the NAT gateways live) that route return traffic from the internet back through the Transit Gateway. This is how the inspection VPC will be able to route traffic to the spoke VPCs:
|
||||
|
||||
```python
|
||||
for subnet_id in public_subnet_ids:
|
||||
route_table = aws.ec2.get_route_table(
|
||||
subnet_id=subnet_id
|
||||
)
|
||||
|
||||
aws.ec2.Route(
|
||||
f"{self.name}-route-{subnet_id}-to-tgw",
|
||||
aws.ec2.RouteArgs(
|
||||
route_table_id=route_table.id,
|
||||
destination_cidr_block=self.args.supernet_cidr_block,
|
||||
transit_gateway_id=self.args.tgw_id,
|
||||
),
|
||||
pulumi.ResourceOptions(
|
||||
depends_on=[self.tgw_attachment],
|
||||
parent=self,
|
||||
),
|
||||
)
|
||||
```
|
||||
|
||||
You need to create both sets of these routes within an [apply](/en/docs/iac/concepts/inputs-outputs/#apply) because of the need to access the raw values of each of the subnet ids. Apply can be conceptually difficult for beginners in Pulumi to grasp, but it essentially means "once you know all the values that needed, pass them on to this function."
|
||||
|
||||
## Final steps
|
||||
|
||||
Now that you've created our inspection VPC component, you can reference it in the main project file:
|
||||
|
||||
```python
|
||||
from inspection import InspectionVpc, InspectionVpcArgs
|
||||
```
|
||||
|
||||
and you can create an instance of the component:
|
||||
|
||||
```python
|
||||
insp_vpc = InspectionVpc(
|
||||
"inspection",
|
||||
InspectionVpcArgs(
|
||||
supernet_cidr_block=supernet_cidr,
|
||||
vpc_cidr_block="10.129.0.0/24",
|
||||
tgw_id=tgw.id,
|
||||
inspection_tgw_route_table_id=inspection_tgw_route_table.id,
|
||||
spoke_tgw_route_table_id=spoke_tgw_route_table.id,
|
||||
firewall_policy_arn=None, # We will add this in the next post
|
||||
)
|
||||
)
|
||||
```
|
||||
|
||||
At this point, we do not have have a fully functional architecture - we still need to create the spoke VPCs - but if we want to get some feedback on our architecture, we can run `pulumi up` and see what happens. We should see that Pulumi will create the VPC, the Transit Gateway attachment, and the routes.
|
||||
|
||||
In the next post, we’ll create our spoke VPCs and verify connectivity, then add centralized inspection of network traffic going to the internet. Stay tuned!
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,132 @@
|
||||
---
|
||||
title: "Advanced TypeScript type FTW!"
|
||||
description: "TypeScript is great for cloud apps and infrastructure because of its rich type system. In this blog, learn how the type system works for infrastructure as code."
|
||||
date: 2018-09-19
|
||||
authors: ["cyrus-najmabadi"]
|
||||
tags: ["typescript"]
|
||||
---
|
||||
# Advanced TypeScript type FTW!
|
||||
|
||||
<p class="blog-meta">2018-09-19 · cyrus-najmabadi</p>
|
||||
|
||||
We at Pulumi love TypeScript for cloud apps and infrastructure, because of its rich type system and great ahead-of-time
|
||||
typechecking – making for a more productive inner loop and helping to find errors sooner. The typesystem magic behind
|
||||
how this works for infrastructure as code can be fascinating!
|
||||
|
||||
A core part of the Pulumi [programming model](/en/docs/iac/concepts/) is that we allow people to express complex
|
||||
[dependency data](/en/docs/iac/concepts/inputs-outputs/) that may _eventually_ be available.
|
||||
Traditional JavaScript programming might expose that as a Promise<T>, but we’ve taken that one step further by introducing
|
||||
a type we call:
|
||||
|
||||
type Input<T> = T | Promise<T> | Output<T>;
|
||||
|
||||
// Like a Promise<T>, but also keeps track of dependency information so we can figure
|
||||
// out what the upstream/downstream impact is whenever any values change in the system
|
||||
interface Output<T> { /* ... */ }
|
||||
|
||||
This complex type can often show up as inputs to all Pulumi objects like so:
|
||||
|
||||
interface VpcInput {
|
||||
ipAddresses: Input<Input<string>[]>;
|
||||
}
|
||||
|
||||
Breaking that down, it’s basically saying “I’ll take an array of strings. But those actual string values can individually be
|
||||
strings, promises-of-strings, or strings-carrying-dependency-information.” It even goes one step beyond that, because the
|
||||
entire array itself could be just an array-of-those-things, or a promise-of-array-of-those-things, or an
|
||||
array-of-those-things-with-dependency-information. Whew…!
|
||||
|
||||
This approach is great for people producing the data. As a producer I can do:
|
||||
|
||||
new Vpc({ ipAddresses: ["an-address"] }); // or even
|
||||
new Vpc({ ipAddresses: ["an-address", computeAddressAsynchronously() ]}); // or even
|
||||
new Vpc({ ipAddresses: ["an-address", computeAddressAsynchronously(), someDependency.address ]}); // or even
|
||||
new Vpc({ ipAddresses: computeAnArrayAnyOfTheAboveAsynchrousnously() }); // etc. etc.
|
||||
|
||||
It’s super flexible, and let’s people naturally produce the values in whatever way they want without having to work too hard to
|
||||
make it conform to some very narrow type.
|
||||
|
||||
However, while easy to produce, this can sometimes be difficult to consume. For example, if you wanted to take in that
|
||||
<code v-pre>Input<Input<string>[]></code> and then check if there was a very specific value in it, you might have to go through and do a bunch of
|
||||
work. You’d have to first deal with potentially getting a <code v-pre>Input<string>[]</code> or a <code v-pre>Promise<Input<string>[]></code> or even an <code v-pre>Output<Input<string>[]></code>.
|
||||
Then, once you even got to the underlying array, you’d have to deal with each potential element in it being a `string`… or a <code v-pre>Promise<string></code>… or a… well… you get the idea. It’s not fun 😃.
|
||||
|
||||
Up until now, we’d supplied some simple helpers to make this more manageable. Our helpers would effectively ‘unwrap’ one
|
||||
layer of this sort of structure allowing you take the external value and deal with an internal value of a known shape.
|
||||
So it effectively worked like this:
|
||||
|
||||
function unwrap<T>(input: Input<T>): T { /* ... */ }
|
||||
|
||||
// so, you could then write:
|
||||
const ipAddresses: Input<string>[] = unwrap(vpc.ipAddresses);
|
||||
|
||||
This helped things somewhat. But it still meant that as you processed that array you had to then unwrap each and every
|
||||
element. As our data model has grown, and we’ve tackled more and more complex domains, we started seeing code start to
|
||||
form the programming [Pyramid of Doom](https://en.wikipedia.org/wiki/Pyramid_of_doom_(programming)), where you just kept
|
||||
on going deeper and deeper, unwrapping all the way. We started seeing this happen so often that we wanted to see if we
|
||||
there was anything we could do to make life much nicer for people using our APIs and using these helpers.
|
||||
|
||||
Our core goal was to change our ‘unwrap’ function from just peeling away one layer of this onion, to peeling away _all_
|
||||
layers. So, for example, if you started with an <code v-pre>Input<Input<string>[]></code> you would just get back a plain old `string[]`
|
||||
that you could use completely naturally in all the ways you’d expect. We were initially uncertain if we could make
|
||||
this work, but thanks to the power of JavaScript and the expressivity of TypeScript, we think we found a great solution
|
||||
here.
|
||||
|
||||
We knew that providing the implementation such a function itself was not going to the true hard part. After all, we
|
||||
already had the code to peel back one layer. So peeling back all the layers was more a matter of just having the function
|
||||
call itself recursively when encountering things like arrays (or other objects that themselves contained `Input`s).
|
||||
|
||||
The real hard part came in when were trying figure out how would we even express this in a type-safe manner TypeScript.
|
||||
After all, what’s the type signature when you effectively want to say:
|
||||
|
||||
function unwrap(input: Input<...MaybeHasInputsOrPromisesOrOutputsArbitrarilyDeep...>): ThatThingWithAllTheDeepInputsPromisesAndOutputsErased;
|
||||
|
||||
This was a big head scratcher for a while. But after exploring some of the powerful new features that TypeScript has
|
||||
been bringing about in recent releases, we finally found a great way to manage it. In the end, it ends up looking
|
||||
something like this:
|
||||
|
||||
type primitive = string | number | boolean | undefined | null;
|
||||
|
||||
type Unwrap<T> =
|
||||
T extends Promise<infer U> ? UnwrapSimple<U> :
|
||||
T extends Output<infer U> ? UnwrapSimple<U> :
|
||||
UnwrapSimple<T>;
|
||||
|
||||
type UnwrapSimple<T> =
|
||||
T extends primitive ? T :
|
||||
T extends Array<infer U> ? UnwrappedArray<U> :
|
||||
T extends object ? UnwrappedObject<T> :
|
||||
never;
|
||||
|
||||
interface UnwrappedArray<T> extends Array<Unwrap<T>> {}
|
||||
|
||||
type UnwrappedObject<T> = {
|
||||
[P in keyof T]: Unwrap<T[P]>;
|
||||
};
|
||||
|
||||
function unwrap<T>(val: T): Unwrap<T>;
|
||||
|
||||
It’s a bit of a doozy containing a bunch of type definitions and the final function declaration that uses them. It
|
||||
makes use of many advanced TypeScript typing features. Including ‘Union Types’ (the ‘primitive’ type), ‘Mapped Types’
|
||||
(which ‘UnwrappedObject’ is an example of), ‘Conditional Types’ (the types with `?` and `:` in them) and ‘Inferred Types’
|
||||
(the use of `infer U` in several places). You can read more about these in the
|
||||
[Advanced Types](https://www.typescriptlang.org/docs/handbook/advanced-types.html) documentation.
|
||||
|
||||
Put together, the <code v-pre>Unwrap<T></code> itself is effectively a recursively defined structural pattern matching type. You can see
|
||||
it reference itself once you walk into <code v-pre>UnwrappedArray<T></code> and <code v-pre>UnwrappedObject<T></code> types. As it recurses, it matches
|
||||
the type it has and then ‘peels away’ the wrappings that have been caused by <code v-pre>Promise<T></code> and <code v-pre>Output<T></code>. As it hits
|
||||
Arrays and Objects, it dives deeper, unwrapping along the way. This is all manageable in TypeScript because it does this
|
||||
sort of matching and unwrapping in a lazy fashion, allowing us to express what is effectively an infinitely large
|
||||
pattern-matching type, without it having any trouble understanding it or applying it!
|
||||
|
||||
It amazes us how well this works and how expressive TypeScript is here. As you can see here, TypeScript completely
|
||||
understands what’s going on and will give you all the great type-checking support and tooling that we know and love:
|
||||
|
||||

|
||||
|
||||
Since adding support for this, we’ve been able to start using this new function across our own codebase and we’ve seen
|
||||
things get dramatically simpler. The pyramid-of-doom goes away and code becomes much cleaner and easier to read and
|
||||
maintain. JavaScript helped us write this system easily, but thanks to TypeScript we can express these complex intents
|
||||
and have the safety and understanding to do this sort of thing with confidence.
|
||||
|
||||
A special thanks to [@DanielRosenwasser](https://github.com/danielrosenwasser) over from the TypeScript team for
|
||||
putting up with my constant pestering on how to work through this and deal with some especially thorny areas!
|
||||
@@ -0,0 +1,120 @@
|
||||
---
|
||||
title: "Agent Sprawl Is Here. Your IaC Platform Is the Answer."
|
||||
description: "Developers are shipping AI agents to production. Your Pulumi platform already supplies the seven things those agents need to be governed."
|
||||
date: 2026-04-22
|
||||
authors: ["engin-diri"]
|
||||
tags: ["ai", "ai-agents", "platform-engineering", "devops", "infrastructure-as-code"]
|
||||
---
|
||||
# Agent Sprawl Is Here. Your IaC Platform Is the Answer.
|
||||
|
||||
<p class="blog-meta">2026-04-22 · engin-diri</p>
|
||||
|
||||
Somewhere in your company right now, a developer is building an AI agent. Maybe it's a release agent that cuts tags when tests pass. Maybe it's a cost agent that shuts down idle EC2 overnight. It's running, it's in production, and there's a decent chance the platform team doesn't know it exists.
|
||||
|
||||
This isn't a thought experiment. OutSystems just surveyed 1,900 IT leaders and the numbers are rough: 96% of enterprises run AI agents in production today, 94% say the sprawl is becoming a real security problem, and only 12% have any central way to manage it. Twelve percent. You can [read the full report here](https://www.outsystems.com/news/enterprise-ai-agent-report-2026/).
|
||||
|
||||
The real question is where those agents run. Inside the platform you've already built, or somewhere off to the side where nobody on the platform team can see them.
|
||||
|
||||
## The new platform tension
|
||||
|
||||
Platform teams have always had two jobs that pull in opposite directions. Let developers ship without waiting on a ticket. Keep the infrastructure coherent while they do. Golden paths, review stacks, a catalog of components that don't fight each other.
|
||||
|
||||
Agents break the second half of that deal.
|
||||
|
||||
A developer with a sharp prompt can spin up an SRE agent that watches a queue, a release agent that cuts tags when the test suite goes green, or a cost agent that kills idle infra at 2 a.m. That's useful. It's also running on your production cloud account, using credentials you never provisioned, writing to systems you never approved, and the only audit trail is whatever the developer remembered to log. The [Salesforce 2026 Connectivity Benchmark](https://www.salesforce.com/news/stories/connectivity-report-announcement-2026/) pegs the average enterprise at twelve agents today, projected to grow 67% over the next two years. Most teams aren't ready for one, let alone twenty.
|
||||
|
||||
This is the same shape as every sprawl problem before it. I wrote about the last one in [*How Secrets Sprawl Is Slowing You Down*](/en/blog/how-secrets-sprawl-is-slowing-you-down/), and the pattern keeps repeating. When something useful gets cheap, it proliferates. When it proliferates without structure, it becomes a liability.
|
||||
|
||||
The clock is also ticking on the compliance side. The [EU AI Act's high-risk obligations kick in on 2 August 2026](https://artificialintelligenceact.eu/implementation-timeline/). [Colorado's AI Act goes live on 30 June 2026](https://leg.colorado.gov/bills/sb25b-004) after last year's delay. A folder of unreviewed agent scripts isn't going to hold up against either of those.
|
||||
|
||||
## Three ways to respond (only one of them works)
|
||||
|
||||
There are roughly three paths from here.
|
||||
|
||||

|
||||
|
||||
**Do nothing.** Accept the sprawl and hope nothing catches fire. This is the default, and it's also how you end up explaining to an auditor why some finance agent moved data between three systems last Thursday and nobody remembers which prompt triggered it.
|
||||
|
||||
**Mandate centralization.** Tell developers every agent has to be registered and approved before it runs. This sounds responsible on a slide, and it falls apart inside a sprint. Developers route around friction. If the official path takes a week and the unofficial path takes an afternoon, the unofficial path wins, and you've just pushed the sprawl underground where you can't see it anymore.
|
||||
|
||||
**Make the platform the obvious path.** Build the thing developers actually want to use. A place where an agent inherits the guardrails, credentials, policies, and audit trail by default, because that's what's on offer. Adoption becomes a side effect of shipping something good.
|
||||
|
||||
Option three is the only one that scales. It's also the one where most platform teams look at their existing stack and assume they need to build a pile of new scaffolding. I don't think they do, and the rest of this post is why.
|
||||
|
||||
## The seven things an AI agent needs from your platform
|
||||
|
||||
An agent needs seven concrete things from the platform it runs on. Each one maps to a Pulumi primitive you already own.
|
||||
|
||||

|
||||
|
||||
### 1. A trustworthy context lake
|
||||
|
||||
Agents are only as good as the context they can reason over. Drop a generic LLM into your cloud account and you'll get plausible-sounding nonsense, because the model has never seen your environment. What you actually need is a grounded source of truth: what resources exist, how they relate, which stack owns what, which version is running where.
|
||||
|
||||
[Pulumi state](/en/docs/iac/concepts/state-and-backends/) is already that. Your program graph, your stack outputs, your resource metadata, all of it adds up to a structured record of what you've actually deployed. [Pulumi Neo reasons directly over that graph](/en/blog/grounded-ai-why-neo-knows-your-infrastructure/), which is why it can tell you why a deployment drifted instead of guessing. I wrote the long version of that argument there. Short version: you already have the context lake. Point agents at it.
|
||||
|
||||
### 2. Pre-cleared integrations
|
||||
|
||||
An agent that needs to touch five systems shouldn't need five separate credential dances. That's where credential sprawl starts. Every agent gets a long-lived key, every key ends up in somebody's `.env`, and every rotation turns into an incident.
|
||||
|
||||
The Pulumi surface here is the [hundreds of providers](https://www.pulumi.com/registry/) plus [Pulumi ESC](https://www.pulumi.com/product/secrets-management/) handling dynamic credentials through OIDC. An agent doesn't ask for an AWS access key. It asks ESC for a short-lived, scoped token bound to the environment it's allowed to operate in, and the token expires when the task ends. No static keys, no rotation pain, no awkward postmortem about how something got committed to GitHub. [The ESC patterns I walked through in the Claude skills post](/en/blog/top-8-claude-skills-devops-2026/) work just as well for an autonomous agent as they do for a human developer, which is really the whole point.
|
||||
|
||||
### 3. Governed actions
|
||||
|
||||
There's a real difference between "an agent can see your infrastructure" and "an agent can change your infrastructure." The second one is where you actually need structure. [Pulumi Deployments](/en/docs/deployments/) gives you that structure: defined workflows, controlled triggers, running inside your Pulumi Cloud boundary instead of whatever environment the developer happened to spin up. [The Automation API](/en/docs/iac/concepts/automation-api/) lets you build higher-order orchestration on the same primitives your developers already use.
|
||||
|
||||
The framing I keep coming back to goes like this. An agent shouldn't call `pulumi up` directly. It should submit an action to a governed pipeline that runs `pulumi up` on its behalf, inside an environment you control, with a log trail and the guardrails already in place. Same effect, very different threat model.
|
||||
|
||||
### 4. Deterministic policy
|
||||
|
||||
Real governance lives outside the prompt. "Please don't delete production" is a wish written into a system prompt, not an enforced control. And when an agent overrides your intent to do what it thought you meant, it's behaving exactly the way the technology was designed to behave.
|
||||
|
||||
[Pulumi Policies](/en/docs/discovery-governance/concepts/policy-as-code/) is the answer the IaC community landed on years ago: policy as code, written in a real programming language, evaluated deterministically at preview and update time. Disallow production RDS deletions. Require encryption at rest. Block S3 buckets with public ACLs. An agent running through Pulumi hits those gates whether it "wants" to or not, because the gates live in the pipeline and not in the prompt. This is the pillar most teams underweight, and it's the first one most auditors ask about.
|
||||
|
||||
### 5. An audit trail
|
||||
|
||||
When something goes wrong at 3 a.m. (and with enough agents running, something will), you need answers fast. What changed, who changed it, and why. Not just "which agent," but which version of which agent, triggered by what event, authorized by which policy, touching which resources.
|
||||
|
||||
Pulumi Cloud's activity log, the stack update history, and [ESC audit logs](/en/docs/esc/administration/audit-logs/) already capture all of that. Every update is versioned. Every secret access is logged. Every policy evaluation is recorded. When an agent submits a change through your Pulumi pipeline, it inherits that audit surface for free. The alternative is reconstructing an incident from a mix of Slack messages, container logs, and developer memory, which is roughly the state most teams without a platform are in today.
|
||||
|
||||
### 6. A review process
|
||||
|
||||
Not every agent action should wait for a human. But agents do need a promotion path, the same way new platform components do. Experimental, then reviewed, then trusted, then autonomous. That's exactly what `pulumi preview`, review stacks, and Deployments PR workflows already model for human contributors. An agent that wants to make a change should have to submit it the same way a junior engineer would. As a diff, with a plan, against a preview environment, until it earns the trust to skip steps.
|
||||
|
||||
This connects back to the pattern I laid out in [*Golden Paths: Infrastructure Components and Templates*](/en/blog/golden-paths-infrastructure-components-and-templates/). Golden paths were never only for humans. They're just paths, and agents can walk them too.
|
||||
|
||||
### 7. Human-in-the-loop approval
|
||||
|
||||
The last pillar is the one that keeps the other six honest. Some decisions shouldn't be automated, full stop. Production rollbacks outside business hours. Destructive changes above a certain blast-radius threshold. Anything that touches a regulated data boundary. For those cases, you want a forced human checkpoint that the agent can't route around.
|
||||
|
||||
Pulumi Deployments approvals already play that role for human changes. [Pulumi Neo's review steps](https://www.pulumi.com/product/neo/) add the AI-aware version: a structured plan, a diff, a named approver, and a record of what they decided and why. I walked through what this looks like in practice in [*Self-Verifying AI Agents*](/en/blog/self-verifying-ai-agents-vercels-agent-browser-in-the-ralph-wiggum-loop/). Short version: an agent that proposes is much safer than an agent that commits.
|
||||
|
||||
|
||||
Route changes from any coding agent, including Claude Code, Cursor, and Pulumi Neo, through the same infrastructure as code controls, policies, and audit trail your team already runs.
|
||||
|
||||
|
||||
## Why IaC is the natural substrate for this
|
||||
|
||||
Step back from the seven pillars and look at what they have in common. Context, integrations, governed actions, deterministic policy, audit, review, approval. None of those are new problems that AI agents invented. They're the problems infrastructure-as-code has been quietly solving for a decade, for human developers.
|
||||
|
||||
Every meaningful agent action ends up being a change, whether that's to infrastructure, configuration, secrets, or state. IaC is the one layer in your stack that already treats change as the unit of work. Plan, preview, apply, record. If you want governance for agents and you don't want to build it twice, the most efficient move is to route agent changes through the same substrate your humans already use.
|
||||
|
||||
I made the same point from a different angle in [*Token Efficiency vs Cognitive Efficiency: Choosing IaC for AI Agents*](/en/blog/token-efficiency-vs-cognitive-efficiency-choosing-iac-for-ai-agents/). An IaC platform that models your world as a graph of typed resources is a much better reasoning surface for an agent than a stack of YAML or a bash script somebody wrote on a Friday. The structure is what makes it work.
|
||||
|
||||
## What this means for the platform engineer
|
||||
|
||||
There's a narrative floating around that AI is going to make platform engineers less relevant. I haven't seen it hold up against an actual production environment. Every stat I've looked at points the other way. Gartner expects [70% of enterprises to deploy agentic AI as part of IT infrastructure and operations by 2029, up from less than 5% in 2025](https://www.itential.com/resource/analyst-report/gartner-predicts-2026-ai-agents-will-reshape-infrastructure-operations/). LangChain's [State of Agent Engineering report already has 57% of teams running agents in production today](https://www.langchain.com/state-of-agent-engineering). And Gartner projects that [80% of large software engineering orgs will have a platform team by end of 2026, up from 45% in 2022](https://deviniti.com/blog/leadership-teamwork/40-devops-stats-for-2026/). More agents means more changes, more changes means more blast radius, and more blast radius means more need for the thing platform teams are uniquely equipped to provide.
|
||||
|
||||
Your classic responsibilities haven't gone anywhere either. Golden paths, service catalogs, CI/CD, on-call rotations, all of that is still yours. Agents are an additional layer that needs the same discipline. The upside is that if your platform already runs on a mature IaC surface, you're extending a muscle you've been building for years instead of growing a new one.
|
||||
|
||||
The developer-facing side matters too. A developer building an agent needs to know what's available to them, needs templates that work on the first try, and needs to see what teammates have already built so they don't start from a blank page. That's the territory [the Claude skills post](/en/blog/top-8-claude-skills-devops-2026/) and [*IDP Strategy: Self-Service Infrastructure That Balances Autonomy With Control*](/en/blog/idp-strategy-planning-self-service-infrastructure-that-balances-developer-autonomy-with-operational-control/) cover. That's the experience layer that makes developers actually choose your platform instead of routing around it. You need both sides working at once. The governance your security team cares about, and the experience your developers will actually reach for.
|
||||
|
||||
## Close the window
|
||||
|
||||
The agents your developers are shipping this week are going to outlive the experiment that started them. Some of them will become critical. At least one will cause an incident. At least one will eventually show up in an audit. All of them are going to be easier to govern if they were built on your platform from day one than if you try to wrap policy around them later.
|
||||
|
||||
If you want the longer view on where this is going, [*AI Predictions for 2026: A DevOps Engineer's Guide*](/en/blog/ai-predictions-2026-devops-guide/) is the companion piece. If you want the developer-facing version of the grounding argument, [*Grounded AI*](/en/blog/grounded-ai-why-neo-knows-your-infrastructure/) is what to read next.
|
||||
|
||||
Either way, here's where I land. The substrate for agent governance is already running in your stack. You've been pointing it at human changes for years. Now point it at the agents too.
|
||||
|
||||
<p><a class="cta-button" href="https://www.pulumi.com/product/neo/">See how Pulumi Neo governs agent actions</a></p>
|
||||
@@ -0,0 +1,240 @@
|
||||
---
|
||||
title: "How to Run AI Agents on Kubernetes with Pulumi"
|
||||
description: "How to provision and govern Kubernetes infrastructure for AI agents with Pulumi, in TypeScript and Python, and where kagent, KServe, Kueue, and Neo fit in."
|
||||
date: 2026-07-28
|
||||
authors: ["joe-duffy"]
|
||||
tags: ["kubernetes", "ai-agents", "platform-engineering", "pulumi-neo", "infrastructure-as-code", "mcp"]
|
||||
---
|
||||
# How to Run AI Agents on Kubernetes with Pulumi
|
||||
|
||||
<p class="blog-meta">2026-07-28 · joe-duffy</p>
|
||||
|
||||
Kubernetes has become the default place teams run agentic AI workloads: CNCF's 2026 annual survey found that 66% of organizations hosting generative AI models use Kubernetes to manage some or all of their inference workloads.[^cncf-survey] An entire ecosystem has grown up around that fact — agent runtimes, model servers, GPU schedulers — and most of it assumes the infrastructure underneath is already handled. It usually isn't. An AI agent is not a stateless web service, and provisioning for one takes more than copying a Deployment YAML and swapping the image.
|
||||
|
||||
|
||||
I spend a lot of my time these days thinking about what changes when the thing consuming your infrastructure isn't a person or a fixed pipeline, but an agent making its own calls about what to do next — and Kubernetes is where I keep seeing that question show up first, because it's already where most teams run everything else. This post is about that gap: what changes about Kubernetes infrastructure when the workload is an agent, what the current agentic-Kubernetes ecosystem actually looks like, and how to provision and govern that infrastructure with [Pulumi](https://www.pulumi.com/up/) using TypeScript and Python — plus where [Pulumi Neo](https://www.pulumi.com/product/neo/) fits once the infrastructure itself has to answer to an agent. If you haven't read our take on the broader shift toward agentic infrastructure, [What Is Agentic Infrastructure?](https://www.pulumi.com/topics/agentic-infrastructure/) is a good companion piece; this post stays specific to the Kubernetes layer.
|
||||
|
||||
## What makes agentic AI workloads different from ordinary Kubernetes workloads?
|
||||
|
||||
An agent's resource and governance profile looks nothing like a typical web service, largely because it schedules accelerators, holds state across long sessions, and reaches out to systems a normal Deployment never touches.
|
||||
|
||||
| Dimension | Typical web service | Agent workload |
|
||||
| --- | --- | --- |
|
||||
| Compute | CPU, predictable | Often GPU/accelerator, bursty |
|
||||
| Session shape | Short-lived, stateless requests | Long-lived sessions, conversational state |
|
||||
| Egress | Internal services, one database | Model provider APIs, arbitrary tools, other agents |
|
||||
| Credential surface | A handful of scoped secrets | API keys for one or more model providers, plus whatever tools/MCP servers the agent is allowed to call |
|
||||
| Access/RBAC | Fixed, narrow | Potentially broad — an agent that can act on infrastructure needs infrastructure-shaped permissions |
|
||||
| Cost profile | Roughly linear with traffic | Token- and GPU-time-driven, harder to predict |
|
||||
|
||||
None of this means Kubernetes is the wrong place to run agents — the opposite: its scheduler, autoscaling, and RBAC primitives are exactly the right building blocks for these problems. It means the infrastructure around an agent deserves more deliberate design than "reuse the Deployment template," particularly around GPU scheduling, secrets, and the blast radius of what the agent is allowed to do.
|
||||
|
||||
## What does the agentic Kubernetes stack look like in 2026?
|
||||
|
||||
There isn't one "agents on Kubernetes" product; there's a stack, and most of it is open source and CNCF-adjacent. Being fair to that ecosystem matters here, because Pulumi's job is to provision and govern the infrastructure underneath these tools, not to replace them.
|
||||
|
||||
| Project | What it does | Status |
|
||||
| --- | --- | --- |
|
||||
| [kagent](https://kagent.dev/) | Framework for running AI agents on Kubernetes, with its own MCP server and CRDs for agents and model providers | CNCF Sandbox (accepted May 22, 2025)[^kagent-cncf] |
|
||||
| [KServe](https://kserve.github.io/website/) | Model-serving on Kubernetes | CNCF Incubating (accepted Sept 29, 2025)[^kserve-cncf] |
|
||||
| [Kueue](https://kueue.sigs.k8s.io/) | Job queueing for batch and ML workloads | CNCF Sandbox |
|
||||
| [KubeRay](https://github.com/ray-project/kuberay) | Runs Ray (and Ray Serve) clusters on Kubernetes | Kubernetes SIG / Ray ecosystem project |
|
||||
| vLLM + [llm-d](https://llm-d.ai/) | High-throughput, Kubernetes-native distributed LLM inference | Red Hat-launched, community project |
|
||||
| [LeaderWorkerSet](https://github.com/kubernetes-sigs/lws) / [JobSet](https://github.com/kubernetes-sigs/jobset) | Multi-node inference and batch training workload APIs | kubernetes-sigs |
|
||||
| Dynamic Resource Allocation (DRA) | Kubernetes-native API for scheduling GPUs and other accelerators | GA in Kubernetes v1.34[^dra-ga] |
|
||||
| [Gateway API Inference Extension](https://gateway-api-inference-extension.sigs.k8s.io/) | Routing and load balancing tuned for LLM inference traffic | GA |
|
||||
| [NVIDIA GPU Operator](https://github.com/NVIDIA/gpu-operator) | Manages NVIDIA drivers and device plugins on cluster nodes | NVIDIA-maintained |
|
||||
|
||||
kagent is worth a closer look since it's the piece most directly aimed at "run an agent on Kubernetes." As of its current release (v0.9.9), it defines its own custom resources — `Agent`, `ModelConfig`, `ModelProviderConfig`, `RemoteMCPServer`, and `SandboxAgent` — and ships an MCP server with built-in tools for Kubernetes, Helm, Istio, Argo, and Prometheus, plus the ability to connect to any external MCP server via the `RemoteMCPServer` CRD.[^kagent-crds] It's a genuinely useful abstraction for defining what an agent can do; it isn't, on its own, an answer for how the *cluster* the agent runs on got there, who's allowed to change it, or how secrets get to it safely. That's the layer Pulumi sits at.
|
||||
|
||||
## How do you provision Kubernetes infrastructure for AI agents with Pulumi?
|
||||
|
||||
A minimal but representative path from "no cluster" to "an agent running on it, governed" looks like this:
|
||||
|
||||
1. Provision a Kubernetes cluster with a GPU-enabled node group sized for your model workload.
|
||||
2. Install the kagent CRDs and controller onto the cluster using a Pulumi Helm chart resource.
|
||||
3. Store the model provider's API key as a Pulumi secret sourced from a Pulumi ESC environment, rather than a plaintext Kubernetes Secret.
|
||||
4. Declare the agent itself as a custom resource so it's versioned and reviewed the same way as everything else in the stack.
|
||||
5. Attach a policy pack so specific classes of change — like exposing a service publicly, or granting a service account cluster-admin — require an explicit review.
|
||||
6. Roll changes out through CI, or through the [Pulumi Kubernetes Operator](/en/docs/integrations/clouds/kubernetes/pulumi-kubernetes-operator/) if you want the cluster itself to reconcile against a Pulumi stack.
|
||||
|
||||
Steps 1–4 in TypeScript:
|
||||
|
||||
```typescript
|
||||
import * as pulumi from "@pulumi/pulumi";
|
||||
import * as kubernetes from "@pulumi/kubernetes";
|
||||
import * as eks from "@pulumi/eks";
|
||||
|
||||
// 1. GPU-enabled node group alongside your existing EKS cluster.
|
||||
const gpuNodeGroup = new eks.ManagedNodeGroup("agent-gpu-nodes", {
|
||||
cluster: eksCluster,
|
||||
nodeRole: nodeRole,
|
||||
instanceTypes: ["g6.8xlarge"],
|
||||
gpu: true,
|
||||
scalingConfig: { minSize: 1, desiredSize: 2, maxSize: 4 },
|
||||
});
|
||||
|
||||
const k8sProvider = new kubernetes.Provider("k8s", {
|
||||
kubeconfig: eksCluster.kubeconfig,
|
||||
});
|
||||
|
||||
// 2. kagent CRDs and controller via the Helm v4 Chart resource.
|
||||
const kagentCrds = new kubernetes.helm.v4.Chart("kagent-crds", {
|
||||
chart: "oci://ghcr.io/kagent-dev/kagent/helm/kagent-crds",
|
||||
namespace: "kagent",
|
||||
}, { provider: k8sProvider });
|
||||
|
||||
const kagent = new kubernetes.helm.v4.Chart("kagent", {
|
||||
chart: "oci://ghcr.io/kagent-dev/kagent/helm/kagent",
|
||||
namespace: "kagent",
|
||||
values: {
|
||||
providers: { default: "openAI" },
|
||||
},
|
||||
}, { provider: k8sProvider, dependsOn: [kagentCrds] });
|
||||
|
||||
// 3. Model provider API key, sourced as a secret from a Pulumi ESC
|
||||
// environment (declared in Pulumi.<stack>.yaml, not hardcoded here).
|
||||
const config = new pulumi.Config();
|
||||
const openAiApiKey = config.requireSecret("openAiApiKey");
|
||||
|
||||
const providerSecret = new kubernetes.core.v1.Secret("openai-credentials", {
|
||||
metadata: { namespace: "kagent" },
|
||||
stringData: { apiKey: openAiApiKey },
|
||||
}, { provider: k8sProvider });
|
||||
|
||||
// 4. The agent itself, as a versioned custom resource.
|
||||
const agent = new kubernetes.apiextensions.CustomResource("k8s-ops-agent", {
|
||||
apiVersion: "kagent.dev/v1alpha2",
|
||||
kind: "Agent",
|
||||
metadata: { namespace: "kagent" },
|
||||
spec: {
|
||||
description: "Answers questions about cluster state and proposes fixes",
|
||||
modelConfig: "openai-gpt",
|
||||
tools: ["kubernetes", "helm"],
|
||||
},
|
||||
}, { provider: k8sProvider, dependsOn: [kagent] });
|
||||
```
|
||||
|
||||
The same four steps in Python:
|
||||
|
||||
```python
|
||||
import pulumi
|
||||
import pulumi_eks as eks
|
||||
import pulumi_kubernetes as kubernetes
|
||||
from pulumi_kubernetes import apiextensions
|
||||
|
||||
# 1. GPU-enabled node group alongside your existing EKS cluster.
|
||||
gpu_node_group = eks.ManagedNodeGroup("agent-gpu-nodes",
|
||||
cluster=eks_cluster,
|
||||
node_role=node_role,
|
||||
instance_types=["g6.8xlarge"],
|
||||
gpu=True,
|
||||
scaling_config={"min_size": 1, "desired_size": 2, "max_size": 4})
|
||||
|
||||
k8s_provider = kubernetes.Provider("k8s", kubeconfig=eks_cluster.kubeconfig)
|
||||
|
||||
# 2. kagent CRDs and controller via the Helm v4 Chart resource.
|
||||
kagent_crds = kubernetes.helm.v4.Chart("kagent-crds",
|
||||
chart="oci://ghcr.io/kagent-dev/kagent/helm/kagent-crds",
|
||||
namespace="kagent",
|
||||
opts=pulumi.ResourceOptions(provider=k8s_provider))
|
||||
|
||||
kagent = kubernetes.helm.v4.Chart("kagent",
|
||||
chart="oci://ghcr.io/kagent-dev/kagent/helm/kagent",
|
||||
namespace="kagent",
|
||||
values={"providers": {"default": "openAI"}},
|
||||
opts=pulumi.ResourceOptions(provider=k8s_provider, depends_on=[kagent_crds]))
|
||||
|
||||
# 3. Model provider API key, sourced as a secret from a Pulumi ESC
|
||||
# environment (declared in Pulumi.<stack>.yaml, not hardcoded here).
|
||||
config = pulumi.Config()
|
||||
openai_api_key = config.require_secret("openAiApiKey")
|
||||
|
||||
provider_secret = kubernetes.core.v1.Secret("openai-credentials",
|
||||
metadata={"namespace": "kagent"},
|
||||
string_data={"apiKey": openai_api_key},
|
||||
opts=pulumi.ResourceOptions(provider=k8s_provider))
|
||||
|
||||
# 4. The agent itself, as a versioned custom resource.
|
||||
agent = apiextensions.CustomResource("k8s-ops-agent",
|
||||
api_version="kagent.dev/v1alpha2",
|
||||
kind="Agent",
|
||||
metadata={"namespace": "kagent"},
|
||||
spec={
|
||||
"description": "Answers questions about cluster state and proposes fixes",
|
||||
"modelConfig": "openai-gpt",
|
||||
"tools": ["kubernetes", "helm"],
|
||||
},
|
||||
opts=pulumi.ResourceOptions(provider=k8s_provider, depends_on=[kagent]))
|
||||
```
|
||||
|
||||
The <code v-pre>Pulumi.<stack>.yaml</code> for the stack pulls the API key from an ESC environment instead of a plaintext value in source control:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
- agents-team/production
|
||||
```
|
||||
|
||||
Verify the exact CRD group/version (`kagent.dev/v1alpha2` above) against kagent's own CRD manifests before you ship this in production — CRD APIs move faster than blog posts do.
|
||||
|
||||
## Why write agent infrastructure in a general-purpose language instead of templated YAML?
|
||||
|
||||
Because an agent's infrastructure has exactly the kind of conditional, repeated, testable shape that general-purpose languages are built for, and templated YAML is not. A `for` loop that provisions one GPU node pool per region, a function that returns a standard "agent + its guardrail policy" bundle, a unit test that asserts a policy pack actually blocks an over-privileged service account before it ships — all of that is native to TypeScript, Python, Go, .NET, and Java, and bolted-on at best in Helm templates or raw manifests.
|
||||
|
||||
This isn't a knock on Helm or Kustomize, which remain genuinely good tools for packaging and distributing charts — including kagent's own install, which is a Helm chart for a reason. The distinction is what you're doing with the result. Distributing a reusable, versioned package is a job Helm is built for. Composing that package into your specific cluster, wiring its secrets, gating its rollout with policy, and testing the whole thing before it ships is software engineering, and it benefits from a real language: loops, functions, types, unit tests, and the same CI/CD your application code already runs through.
|
||||
|
||||
## How do you keep agent workloads governed, least-privileged, and cost-aware?
|
||||
|
||||
An agent that can act on infrastructure needs infrastructure-shaped guardrails, not just a service account and a prayer. Three pieces of the Pulumi platform apply directly:
|
||||
|
||||
- **Policy as code.** [Pulumi Policies](/en/docs/discovery-governance/concepts/policy-as-code/) let you write rules — in the same general-purpose languages, not a separate policy DSL — that run before a change is applied: block a `Deployment` requesting cluster-admin, require GPU node pools to carry a cost-center label, or flag any `RemoteMCPServer` pointed at a host outside an allowlist.
|
||||
- **[Pulumi ESC](/en/docs/esc/)** for secrets and configuration, so model-provider API keys and other credentials are centrally managed, rotated, and scoped, rather than copy-pasted into `Secret` manifests across every cluster an agent touches.
|
||||
- **RBAC scoped to the agent's actual job.** The same custom-resource pattern used to declare the agent (shown above) is the natural place to also declare its `ServiceAccount`, `Role`, and `RoleBinding` — as code, reviewed the same way as the agent's own configuration, not layered on afterward.
|
||||
|
||||
I want to be precise here about Pulumi Insights, because I see the two products get conflated more than almost anything else we ship: Insights gives you discovery (a searchable inventory of resources across Pulumi, Terraform, CloudFormation, and manually created infrastructure) and policy enforcement, including pre-built compliance packs. Cost-optimization recommendations are a Neo capability, not an Insights one.
|
||||
|
||||
## Where does Pulumi Neo fit when the infrastructure itself is agentic?
|
||||
|
||||
Neo is Pulumi's own infrastructure agent, and it's worth being specific about what it actually does today rather than leaning on the general "AI for infrastructure" framing. Documented capabilities include answering questions about your existing infrastructure, proposing changes and opening a pull request for them, running a preview before anything lands, reviewing PRs, and taking on recurring maintenance work using your team's established Pulumi practices.[^neo-docs] The [Infrastructure AI docs](/en/docs/ai/) cover each of these in more depth.
|
||||
|
||||
The thing I care about most with Neo is trust, and trust gets earned one reviewed pull request at a time, not granted upfront. That's why every capability starts human-in-the-loop and only earns more autonomy once the guardrails have proven themselves in practice — the same discipline this post argues for everywhere else an agent touches your Kubernetes infrastructure. Pulumi's own product blog has also described Neo handling things like Terraform-to-Pulumi migrations and containerizing and migrating a service onto Kubernetes.[^neo-things]
|
||||
|
||||
The relevant framing for this post: Neo doesn't replace kagent, KServe, or any other workload-level agent framework running inside your cluster — it operates one layer up, on the infrastructure that provisions and governs the cluster itself. If your team is running kagent-based agents on Kubernetes, Neo is the thing that can propose the PR that adds a new GPU node pool, review the policy-pack change that locks down a `RemoteMCPServer`, or handle the maintenance toil around keeping that stack current.
|
||||
|
||||
## Frequently asked questions
|
||||
|
||||
### How do you deploy AI agents on Kubernetes?
|
||||
|
||||
Provision a cluster (with GPU node pools if your agent needs them), install an agent runtime — [kagent](https://kagent.dev/) is one of the more Kubernetes-native options as of 2026 — and declare the agent as a custom resource alongside its model configuration and any MCP tool servers it needs. Doing this with Pulumi means the cluster, the runtime install, the secrets, and the agent definition are all one reviewable, testable stack rather than a mix of `kubectl apply` commands run by hand.
|
||||
|
||||
### Do you need GPUs to run AI agents on Kubernetes?
|
||||
|
||||
Not always. An agent that only calls a hosted model API (OpenAI, Anthropic, and similar) needs CPU nodes to run its own logic and tool calls; the GPU-heavy work happens on the provider's infrastructure, not yours. GPUs matter once you're self-hosting inference — running an open-weight model via vLLM, KServe, or Ray Serve — which is where projects like Kueue, LeaderWorkerSet, and Dynamic Resource Allocation come in.
|
||||
|
||||
### How is kagent different from running an agent as a plain Deployment?
|
||||
|
||||
A plain `Deployment` gives you a running process; it doesn't give you a standard way to describe an agent's model configuration, its tool access, or its connections to MCP servers as first-class, versionable objects. kagent's CRDs (`Agent`, `ModelConfig`, `ModelProviderConfig`, `RemoteMCPServer`, `SandboxAgent`) exist specifically to make those concepts declarative, so a policy engine, a reviewer, or another automation can reason about them the same way it reasons about a `Deployment` or a `Service`.
|
||||
|
||||
### Can Pulumi manage Kubernetes resources that Helm or Terraform already created?
|
||||
|
||||
Yes. Pulumi Insights discovers and inventories resources regardless of what provisioned them — Pulumi, Terraform, CloudFormation, or manual changes — which is useful precisely because most clusters running agent workloads already have Helm-installed components like kagent, an ingress controller, or a GPU operator on them. You don't need to rip those out to bring the rest of the stack under Pulumi; `kubernetes.yaml.v2.ConfigFile` and `ConfigGroup` can also adopt existing manifests directly into a Pulumi program.
|
||||
|
||||
### What are Kubernetes best practices for AI workloads in 2026?
|
||||
|
||||
Match node pools to the workload (GPU pools for self-hosted inference, CPU pools for orchestration and tool-calling), use a queueing layer like Kueue for batch and training jobs so they don't starve latency-sensitive agent traffic, keep model-provider credentials in a secrets manager (not plaintext `Secret` objects), and scope every agent's RBAC to the specific tools it's allowed to call. For general Kubernetes hygiene beyond the AI-specific pieces, see [Kubernetes Best Practices I Wish I Had Known Before](/en/blog/kubernetes-best-practices-i-wish-i-had-known-before/).
|
||||
|
||||
### How does Pulumi Neo help manage Kubernetes infrastructure for AI agents?
|
||||
|
||||
Neo operates at the infrastructure layer underneath your agent workloads: it can answer questions about the state of your cluster, propose infrastructure changes as a reviewable pull request, run a preview before anything is applied, review incoming PRs, and take on the recurring maintenance that keeps a Kubernetes-plus-agents stack current — all using your team's existing Pulumi practices rather than a separate workflow.
|
||||
|
||||
## Where to go next
|
||||
|
||||
If you're starting from zero, the [Kubernetes get-started guide](https://www.pulumi.com/up/?cloud=kubernetes) and the [Kubernetes provider registry](https://www.pulumi.com/registry/packages/kubernetes/) cover the provisioning basics this post builds on. If you're already running agent workloads and want the governance layer, start with [Pulumi Policies](/en/docs/discovery-governance/concepts/policy-as-code/) and [Pulumi ESC](/en/docs/esc/). And if agent sprawl — not just agentic Kubernetes workloads, but the broader proliferation of agents across your org — is the more pressing problem, [Agent Sprawl Is Here. Your IaC Platform Is the Answer.](/en/blog/agent-sprawl-iac-platform-is-the-answer/) is the companion read.
|
||||
|
||||
[^cncf-survey]: CNCF Annual Survey Report, January 2026: [cncf.io/wp-content/uploads/2026/01/CNCF_Annual_Survey_Report_final.pdf](https://www.cncf.io/wp-content/uploads/2026/01/CNCF_Annual_Survey_Report_final.pdf).
|
||||
[^kagent-cncf]: "kagent was accepted to CNCF on May 22, 2025 at the Sandbox maturity level." CNCF Projects: [cncf.io/projects/kagent/](https://www.cncf.io/projects/kagent/).
|
||||
[^kserve-cncf]: KServe accepted as a CNCF Incubating project, September 29, 2025: [cncf.io/blog/2025/11/11/kserve-becomes-a-cncf-incubating-project/](https://www.cncf.io/blog/2025/11/11/kserve-becomes-a-cncf-incubating-project/).
|
||||
[^dra-ga]: Dynamic Resource Allocation reached general availability in Kubernetes v1.34 (released August 27, 2025). Kubernetes blog: [kubernetes.io/blog](https://kubernetes.io/blog/).
|
||||
[^kagent-crds]: kagent CRD kinds (`Agent`, `ModelConfig`, `ModelProviderConfig`, `RemoteMCPServer`, `SandboxAgent`) per the `kagent-dev/kagent` `v1alpha2` API types, and MCP server tooling per the project README: [github.com/kagent-dev/kagent](https://github.com/kagent-dev/kagent).
|
||||
[^neo-docs]: Pulumi Infrastructure AI / Neo documentation: [pulumi.com/docs/ai/](/en/docs/ai/).
|
||||
[^neo-things]: "10 Things You Can Do with Neo" and "10 More Things You Can Do with Neo," Pulumi blog: [pulumi.com/blog/10-things-you-can-do-with-neo/](/en/blog/10-things-you-can-do-with-neo/), [pulumi.com/blog/10-more-things-you-can-do-with-neo/](/en/blog/10-more-things-you-can-do-with-neo/).
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user