<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ajanthan HR</title>
    <description>The latest articles on DEV Community by Ajanthan HR (@ajanthan_hr_c019bb2b72c79).</description>
    <link>https://dev.to/ajanthan_hr_c019bb2b72c79</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2979757%2Fcac56b98-e231-4a29-9311-1a955103f695.jpeg</url>
      <title>DEV Community: Ajanthan HR</title>
      <link>https://dev.to/ajanthan_hr_c019bb2b72c79</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ajanthan_hr_c019bb2b72c79"/>
    <language>en</language>
    <item>
      <title>Part 2: AI Agent Truly Intelligent?</title>
      <dc:creator>Ajanthan HR</dc:creator>
      <pubDate>Sun, 06 Apr 2025 02:29:14 +0000</pubDate>
      <link>https://dev.to/ajanthan_hr_c019bb2b72c79/part-2-ai-agent-truly-intelligent-4653</link>
      <guid>https://dev.to/ajanthan_hr_c019bb2b72c79/part-2-ai-agent-truly-intelligent-4653</guid>
      <description>&lt;p&gt;What Makes an AI Agent Truly Intelligent?&lt;/p&gt;

&lt;p&gt;We’ve all heard the buzz around AI agents, but what really sets an intelligent agent apart from a basic chatbot or automation script?&lt;/p&gt;

&lt;p&gt;At the core, a powerful AI agent is built from five essential components — each working together to create a system that’s not just reactive, but proactive, adaptable, and intelligent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Profile / Persona
&lt;/h2&gt;

&lt;p&gt;This defines the identity and purpose of the agent.&lt;br&gt;
Is it a coder that writes backend logic? A tester that writes unit tests? A researcher that gathers insights?&lt;br&gt;
The persona sets the tone, behavior, and capabilities of the agent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Actions
&lt;/h2&gt;

&lt;p&gt;What can the agent actually do?&lt;br&gt;
This could include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Calling APIs&lt;/li&gt;
&lt;li&gt;Writing files&lt;/li&gt;
&lt;li&gt;Sending emails&lt;/li&gt;
&lt;li&gt;Generating code&lt;/li&gt;
&lt;li&gt;Interfacing with tools or databases&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The more precise and powerful the action set, the more capable the agent becomes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Knowledge / Memory
&lt;/h2&gt;

&lt;p&gt;An agent needs to remember context — not just within a session, but across interactions.&lt;br&gt;
This includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Factual knowledge&lt;/li&gt;
&lt;li&gt;Past interactions&lt;/li&gt;
&lt;li&gt;Task history&lt;/li&gt;
&lt;li&gt;User preferences&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This memory layer is what enables long-term learning and personalization.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reasoning / Evaluation
&lt;/h2&gt;

&lt;p&gt;Can the agent analyze, compare, and make decisions?&lt;br&gt;
Good agents don’t just follow instructions blindly — they evaluate outcomes, suggest alternatives, and learn from errors.&lt;br&gt;
This is where AI starts to mimic critical thinking.&lt;/p&gt;

&lt;h2&gt;
  
  
  Planning / Feedback
&lt;/h2&gt;

&lt;p&gt;Finally, an intelligent agent should be able to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Break down complex tasks into steps&lt;/li&gt;
&lt;li&gt;Execute a plan&lt;/li&gt;
&lt;li&gt;Adjust based on real-time feedback from the user or system&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think of it as the agent’s ability to learn and improve through iteration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;We’re entering an era where AI agents will handle real-world responsibilities — from coding and testing to customer service and research. But only those agents with a strong foundation in these five components will truly deliver value.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agentaichallenge</category>
      <category>llm</category>
      <category>rag</category>
    </item>
    <item>
      <title>Part-1: Agents Are the New Interfaces — Welcome to the Future of AI</title>
      <dc:creator>Ajanthan HR</dc:creator>
      <pubDate>Sat, 05 Apr 2025 19:15:23 +0000</pubDate>
      <link>https://dev.to/ajanthan_hr_c019bb2b72c79/part-1-agents-are-the-new-interfaces-welcome-to-the-future-of-ai-3h7m</link>
      <guid>https://dev.to/ajanthan_hr_c019bb2b72c79/part-1-agents-are-the-new-interfaces-welcome-to-the-future-of-ai-3h7m</guid>
      <description>&lt;h2&gt;
  
  
  What Is an AI Agent?
&lt;/h2&gt;

&lt;p&gt;An agent, by definition, is something that acts, produces an effect, or achieves a result through intelligence. In AI, the term refers to systems that can understand tasks, make decisions, and take action — often with or without human involvement.&lt;/p&gt;

&lt;p&gt;In modern AI, the term assistant is often used interchangeably with agent. Think ChatGPT, GPT-based plugins, or any intelligent system that works on your behalf.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four Ways We Interact with AI Today
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Direct Interaction&lt;br&gt;
This is the simplest form — you talk directly to the LLM (like early ChatGPT). No middle layer, no interpretation, just raw conversation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Agent/Assistant Proxy&lt;br&gt;
Here, the LLM refines or reformulates your request before performing the task. Example: When ChatGPT rephrases your prompt before sending it to DALL·E 3 for image generation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Agent/Assistant with Function Calls&lt;br&gt;
In this case, the LLM understands available tools (like plugins) and prepares to use them. It asks for your approval before executing and returns the result wrapped in a natural-language response.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Autonomous Agent&lt;br&gt;
The most powerful — and potentially risky — form. These agents create a plan, make decisions, and execute steps independently. They may ask for feedback occasionally but operate with a high level of autonomy.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Multi-Agent Systems: AI Teams in Action
&lt;/h2&gt;

&lt;p&gt;As tasks grow in complexity, we move from single agents to multi-agent systems.&lt;/p&gt;

&lt;p&gt;Imagine this setup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A controller agent communicates with the user.&lt;/li&gt;
&lt;li&gt;A coder agent writes the requested code.&lt;/li&gt;
&lt;li&gt;A tester agent writes unit tests for it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These agents collaborate, share information, and refine their outputs before delivering a final solution. It’s like having a virtual team — one that never sleeps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Multi-Agent Systems Matter
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Parallel task execution&lt;/li&gt;
&lt;li&gt;Specialization by role&lt;/li&gt;
&lt;li&gt;Collaborative feedback loops&lt;/li&gt;
&lt;li&gt;Reduced error rates&lt;/li&gt;
&lt;li&gt;Scalable intelligence&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Platforms like Microsoft AutoGen are leading the way, letting developers create flexible, powerful multi-agent configurations to solve real-world problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  From One Agent to Many: The Future of AI
&lt;/h2&gt;

&lt;p&gt;We’re evolving from chat-based AI into intelligent, proactive, and collaborative agent systems.&lt;/p&gt;

&lt;p&gt;These agents don’t just assist — they plan, build, test, evaluate, and deliver — together.&lt;/p&gt;

&lt;p&gt;AI is no longer a tool. It’s becoming your team.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agentaichallenge</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Ajanthan HR</dc:creator>
      <pubDate>Sat, 05 Apr 2025 19:02:09 +0000</pubDate>
      <link>https://dev.to/ajanthan_hr_c019bb2b72c79/-1in7</link>
      <guid>https://dev.to/ajanthan_hr_c019bb2b72c79/-1in7</guid>
      <description></description>
      <category>emptystring</category>
    </item>
    <item>
      <title>How to Automate Azure Storage Using Pulumi ESC &amp; Automation API</title>
      <dc:creator>Ajanthan HR</dc:creator>
      <pubDate>Thu, 03 Apr 2025 05:26:26 +0000</pubDate>
      <link>https://dev.to/ajanthan_hr_c019bb2b72c79/do-it-now-2i29</link>
      <guid>https://dev.to/ajanthan_hr_c019bb2b72c79/do-it-now-2i29</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/pulumi"&gt;Pulumi Deploy and Document Challenge&lt;/a&gt;: Shhh, It's a Secret!&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I developed a Python-based automation tool that streamlines the provisioning of Azure Storage Accounts using Pulumi ESC (Environment, Secrets, and Config) and the Pulumi Automation API. This tool enables infrastructure as code (IaC) by dynamically retrieving environment-specific configurations, securely handling authentication credentials, and deploying cloud resources in a fully automated manner.&lt;/p&gt;

&lt;p&gt;The implementation leverages Pulumi ESC SDK to fetch environment variables, secrets, and configuration details, ensuring a secure and scalable infrastructure deployment process. Additionally, the Pulumi Automation API is used to programmatically create and manage stacks, enabling seamless provisioning, updating, and destruction of cloud resources.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key features of the tool include:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Environment-aware provisioning:&lt;/strong&gt; Automatically fetches required configurations and credentials.&lt;br&gt;
&lt;strong&gt;Secure authentication:&lt;/strong&gt; Uses OIDC-based authentication to interact with Azure.&lt;br&gt;
&lt;strong&gt;Infrastructure as Code (IaC):&lt;/strong&gt; Automates the creation of Azure Resource Groups and Storage Accounts.&lt;br&gt;
&lt;strong&gt;Automated stack management:&lt;/strong&gt; Supports creation, update, and teardown of resources with minimal manual intervention.&lt;/p&gt;
&lt;h2&gt;
  
  
  Live Demo Link
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/Ajanhari/azure-pulumi-esc/blob/main/README.md#Demo" rel="noopener noreferrer"&gt;https://github.com/Ajanhari/azure-pulumi-esc/blob/main/README.md#Demo&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Project Repo
&lt;/h2&gt;



&lt;p&gt;&lt;a href="https://github.com/Ajanhari/azure-pulumi-esc" rel="noopener noreferrer"&gt;https://github.com/Ajanhari/azure-pulumi-esc&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  My Journey
&lt;/h2&gt;


&lt;h3&gt;
  
  
  Create a new pulumi program:
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="s1"&gt;'ajan@LAPTOP-I71Q9TDP:~/pulumi-esc-demo$'&lt;/span&gt; pulumi new python
This &lt;span class="nb"&gt;command &lt;/span&gt;will walk you through creating a new Pulumi project.

Enter a value or leave blank to accept the &lt;span class="o"&gt;(&lt;/span&gt;default&lt;span class="o"&gt;)&lt;/span&gt;, and press &amp;lt;ENTER&amp;gt;.
Press ^C at any &lt;span class="nb"&gt;time &lt;/span&gt;to quit.

Project name &lt;span class="o"&gt;(&lt;/span&gt;pulumi-esc-demo&lt;span class="o"&gt;)&lt;/span&gt;:
Project description &lt;span class="o"&gt;(&lt;/span&gt;A minimal Python Pulumi program&lt;span class="o"&gt;)&lt;/span&gt;: Automate Azure Storage Creation Using Pulumi ESC &amp;amp; Automation API
Created project &lt;span class="s1"&gt;'pulumi-esc-demo'&lt;/span&gt;

Please enter your desired stack name.
To create a stack &lt;span class="k"&gt;in &lt;/span&gt;an organization, use the format &amp;lt;org-name&amp;gt;/&amp;lt;stack-name&amp;gt; &lt;span class="o"&gt;(&lt;/span&gt;e.g. &lt;span class="sb"&gt;`&lt;/span&gt;acmecorp/dev&lt;span class="sb"&gt;`&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt;
Stack name &lt;span class="o"&gt;(&lt;/span&gt;dev&lt;span class="o"&gt;)&lt;/span&gt;: DemoESCOrg/prod
Created stack &lt;span class="s1"&gt;'prod'&lt;/span&gt;

The toolchain to use &lt;span class="k"&gt;for &lt;/span&gt;installing dependencies and running the program pip
Installing dependencies...

Creating virtual environment...
Finished creating virtual environment
Updating pip, setuptools, and wheel &lt;span class="k"&gt;in &lt;/span&gt;virtual environment...
Requirement already satisfied: pip &lt;span class="k"&gt;in&lt;/span&gt; ./venv/lib/python3.10/site-packages &lt;span class="o"&gt;(&lt;/span&gt;22.0.2&lt;span class="o"&gt;)&lt;/span&gt;
Collecting pip
  Using cached pip-25.0.1-py3-none-any.whl &lt;span class="o"&gt;(&lt;/span&gt;1.8 MB&lt;span class="o"&gt;)&lt;/span&gt;
  ...
  ...
Requirement already satisfied: setuptools &lt;span class="k"&gt;in&lt;/span&gt; ./venv/lib/python3.10/site-packages &lt;span class="o"&gt;(&lt;/span&gt;59.6.0&lt;span class="o"&gt;)&lt;/span&gt;
Installing collected packages: six, semver, pyyaml, protobuf, grpcio, dill, debugpy, pulumi
Successfully installed debugpy-1.8.13 dill-0.3.9 grpcio-1.66.2 protobuf-4.25.6 pulumi-3.159.0 pyyaml-6.0.2 semver-3.0.4 six-1.17.0
Finished installing dependencies
Finished installing dependencies

Your new project is ready to go!

To perform an initial deployment, run &lt;span class="sb"&gt;`&lt;/span&gt;pulumi up&lt;span class="sb"&gt;`&lt;/span&gt;

&lt;span class="s1"&gt;'ajan@LAPTOP-I71Q9TDP:~/pulumi-esc-demo$'&lt;/span&gt; &lt;span class="nb"&gt;ls
&lt;/span&gt;Pulumi.yaml  __main__.py  requirements.txt  venv

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;We now have a pulumi project YAML configuration file and the beginnings of a small python program all set up.&lt;/p&gt;

&lt;p&gt;According to the pulumi documentation, we need to add a pulumi cloud access token&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PULUMI_ACCESS_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your pulumi cloud org token"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Setup Azure Service Principal and Configure Federated Credentials for pulumi ESC
&lt;/h3&gt;

&lt;p&gt;This guide will walk you through creating a Service Principal in Azure with Federated Credentials using the Azure Portal.&lt;/p&gt;

&lt;h4&gt;
  
  
  Steps to Create a Service Principal with Federated Credentials
&lt;/h4&gt;

&lt;h4&gt;
  
  
  1. Create an App Registration
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;

&lt;ul&gt;
&lt;li&gt;In the &lt;a href="https://portal.azure.com" rel="noopener noreferrer"&gt;Azure portal&lt;/a&gt;, navigate to &lt;strong&gt;Azure Active Directory&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;App registrations&lt;/strong&gt; and then click &lt;strong&gt;New registration&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Provide a name for your application (e.g., &lt;strong&gt;pulumi-azure-esc-auth&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Supported account types&lt;/strong&gt; section, select &lt;strong&gt;Accounts in this organizational directory only&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Register&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;After the Microsoft Entra application has been created, take note of the following details:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Subscription ID&lt;/li&gt;
&lt;li&gt;  Application (client) ID&lt;/li&gt;
&lt;li&gt;  Directory (tenant) ID&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These values will be necessary when enabling OIDC for your service.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Configure Federated Credentials
&lt;/h4&gt;

&lt;p&gt;Once your application is registered, navigate to the &lt;strong&gt;Certificates &amp;amp; secrets&lt;/strong&gt; pane in the left navigation menu.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select the &lt;strong&gt;Federated credentials&lt;/strong&gt; tab.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Add credential&lt;/strong&gt; to start the &lt;strong&gt;Add a credential&lt;/strong&gt; wizard.&lt;/li&gt;
&lt;li&gt;In the wizard, select &lt;strong&gt;Other Issuer&lt;/strong&gt; as the &lt;strong&gt;Federated credential scenario&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Fill in the remaining form fields as follows:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Issuer:&lt;/strong&gt; &lt;code&gt;https://api.pulumi.com/oidc&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Subject Identifier:&lt;/strong&gt; pulumi:environments:org:DemoESCOrg:env:DevDemo/prod&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Name:&lt;/strong&gt; An arbitrary name for the credential, e.g., &lt;strong&gt;"pulumi-oidc-credentials"&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audience:&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;For &lt;strong&gt;Pulumi Deployments&lt;/strong&gt;, this is only the name of your Pulumi &lt;strong&gt;organization&lt;/strong&gt;.
&lt;/li&gt;
&lt;li&gt;For &lt;strong&gt;ESC (Enterprise Service Connection)&lt;/strong&gt;, this is the name of your Pulumi &lt;strong&gt;organization&lt;/strong&gt; prefixed with &lt;code&gt;azure:&lt;/code&gt; (e.g., &lt;code&gt;azure:DemoESCOrg&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h4&gt;
  
  
  3. Assign Roles
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Go to the &lt;strong&gt;resource group/subscription&lt;/strong&gt; you want the service principal to access.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Access control (IAM)&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Add role assignment&lt;/strong&gt;, choose the appropriate role (e.g., &lt;strong&gt;Contributor&lt;/strong&gt;), and select your newly created application.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once these steps are completed, your Service Principal with Federated Credentials will be set up and ready to use.&lt;/p&gt;




&lt;h3&gt;
  
  
  Creating Pulumi ESC environment:
&lt;/h3&gt;

&lt;p&gt;ESC environments can be established using two methods: through the ESC CLI or via Pulumi Cloud. This guide specifically outlines the process for creating an environment using the ESC CLI.&lt;/p&gt;

&lt;p&gt;Before proceeding, please ensure that the ESC CLI is installed on your system.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a New Organization (Optional): If desired, you can create a new organization to help manage your projects and environments more effectively. This step is optional and can be skipped if you prefer to use your existing organization.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Initialize a New Environment: Use the following command to create a new environment&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;esc login
esc &lt;span class="nb"&gt;env &lt;/span&gt;init DemoESCOrg/DevDemo/prod
&lt;/code&gt;&lt;/pre&gt;


&lt;ul&gt;
&lt;li&gt;Pulumi uses OIDC (OpenID Connect) to authenticate with Azure via Microsoft Entra Workload Identity Federation. This requires configuring ESC environment to pass the correct credentials.&lt;/li&gt;
&lt;li&gt;Run the following command to modify the environment configuration:
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;  esc &lt;span class="nb"&gt;env &lt;/span&gt;edit DemoESCOrg/DevDemo/prod
&lt;/code&gt;&lt;/pre&gt;



&lt;ul&gt;
&lt;li&gt;Replace Default Content with OIDC Configuration and add the following environment variables:
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight yaml"&gt;&lt;code&gt;  &lt;span class="na"&gt;values&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;azure&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;login&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;fn::open::azure-login&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;clientId&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;your-client-id&amp;gt;&lt;/span&gt;
          &lt;span class="na"&gt;tenantId&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;your-tenant-id&amp;gt;&lt;/span&gt;
          &lt;span class="na"&gt;subscriptionId&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/subscriptions/&amp;lt;your-subscription-id&amp;gt;&lt;/span&gt;
          &lt;span class="na"&gt;oidc&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
    &lt;span class="na"&gt;environmentVariables&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;ARM_USE_OIDC&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;true'&lt;/span&gt;
      &lt;span class="na"&gt;ARM_CLIENT_ID&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${azure.login.clientId}&lt;/span&gt;
      &lt;span class="na"&gt;ARM_TENANT_ID&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${azure.login.tenantId}&lt;/span&gt;
      &lt;span class="na"&gt;ARM_OIDC_TOKEN&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${azure.login.oidc.token}&lt;/span&gt;
      &lt;span class="na"&gt;ARM_SUBSCRIPTION_ID&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${azure.login.subscriptionId}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;ul&gt;
&lt;li&gt;Replace the placeholder 'your-client-id', 'your-tenant-id' and 'your-subscription-id' with actual value based your service principle and azure subscription.&lt;/li&gt;
&lt;li&gt;To confirm that the environment variables were set correctly, run below and output verify values are set properly:
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;esc &lt;span class="nb"&gt;env &lt;/span&gt;get DemoESCOrg/DevDemo/prod
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  Retrieve Secrets from Azure Key Vault using Pulumi ESC
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The &lt;strong&gt;azure-secrets&lt;/strong&gt; provider enables you to dynamically import Secrets and Configuration from Azure Key Vault into your Environment. The provider will return a map of names to Secrets.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run the following command to modify/update the environment configuration:
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;  esc &lt;span class="nb"&gt;env &lt;/span&gt;edit DemoESCOrg/DevDemo/prod
&lt;/code&gt;&lt;/pre&gt;



&lt;ul&gt;
&lt;li&gt;Replace Default Content with OIDC Configuration and add the following environment variables:
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight yaml"&gt;&lt;code&gt;  &lt;span class="na"&gt;values&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;azure&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;login&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;fn::open::azure-login&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="s"&gt;...&lt;/span&gt;
            &lt;span class="s"&gt;...&lt;/span&gt;
      &lt;span class="na"&gt;secrets&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;fn::open::azure-secrets&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;login&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${azure.login}&lt;/span&gt;
          &lt;span class="na"&gt;vault&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;example-vault-name&lt;/span&gt; &lt;span class="c1"&gt;# your keyvault name&lt;/span&gt;
          &lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;api-key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
              &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;api-key&lt;/span&gt; &lt;span class="c1"&gt;# Replace with actual secret name from keyvault&lt;/span&gt;
      &lt;span class="na"&gt;app-secret&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;app-secret&lt;/span&gt;
    &lt;span class="na"&gt;environmentVariables&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="s"&gt;...&lt;/span&gt;
        &lt;span class="s"&gt;...&lt;/span&gt;
        &lt;span class="s"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;ul&gt;
&lt;li&gt;Replace the placeholder 'your-client-id', 'your-tenant-id' and 'your-subscription-id' with actual value based your service principle and azure subscription.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To confirm that the environment variables were set correctly, run below and output verify values are set properly:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; esc &lt;span class="nb"&gt;env &lt;/span&gt;get DemoESCOrg/DevDemo/prod OR
 esc &lt;span class="nb"&gt;env &lt;/span&gt;open DemoESCOrg/DevDemo/prod
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You should see output similar to the following and the value for "api-key" is fetched from azure key vault:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"azure"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"login"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"clientId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"aaaa...."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"oidc"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"token"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ey...."&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"subscriptionId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"000...."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"tenantId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"8888...."&lt;/span&gt;&lt;span class="w"&gt;
              &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"secrets"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"api-key"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"my-api-key-value"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
               &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  Using Pulumi ESC
&lt;/h2&gt;

&lt;p&gt;Using Pulumi ESC, achieved below goals&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Establish Secrets and Configurations:&lt;/strong&gt; Utilize Pulumi ESC environments within Pulumi Cloud to create and manage secrets and configurations effectively.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Securely Retrieve Secrets:&lt;/strong&gt; Fetch secrets from Azure Key Vault and securely store them in the Pulumi Cloud environment for streamlined access and management.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integrate and Provision Resources:&lt;/strong&gt; Developed a program that leverages Pulumi ESC configurations to provision an Azure Resource Group and a Storage Account.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Challenges:
&lt;/h2&gt;

&lt;p&gt;According to this document (&lt;a href="https://www.pulumi.com/docs/pulumi-cloud/access-management/oidc/provider/azure/#configure-oidc-in-the-pulumi-console" rel="noopener noreferrer"&gt;https://www.pulumi.com/docs/pulumi-cloud/access-management/oidc/provider/azure/#configure-oidc-in-the-pulumi-console&lt;/a&gt;), enabling Azure integration automatically stores the fetched credentials as environment variables. However, since I am unable to save the configuration, the credentials are not stored automatically.&lt;/p&gt;

&lt;p&gt;As a workaround, I retrieved the values using the ESC SDK in a Python program and set the required values through code. This enables authentication to Azure using the OIDC token.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Pulumi has very decent documentation, which helps me a lot to configure the project setup.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion.
&lt;/h2&gt;

&lt;p&gt;This script seamlessly integrates Pulumi with ESC to retrieve environment values and authenticate with Azure using OIDC. It automates the creation and management of Azure resources, ensuring a streamlined and secure deployment process. Additionally, it allows you to easily update or destroy the stack as needed, providing flexibility and control over your infrastructure.&lt;/p&gt;

&lt;p&gt;If you have any queries, let me know in the comments section. Happy to assist you.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>pulumichallenge</category>
      <category>cloud</category>
      <category>webdev</category>
    </item>
    <item>
      <title>GitHub Access Governance with Pulumi.</title>
      <dc:creator>Ajanthan HR</dc:creator>
      <pubDate>Sun, 30 Mar 2025 03:30:14 +0000</pubDate>
      <link>https://dev.to/ajanthan_hr_c019bb2b72c79/github-access-governance-with-pulumi-4g7e</link>
      <guid>https://dev.to/ajanthan_hr_c019bb2b72c79/github-access-governance-with-pulumi-4g7e</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/pulumi"&gt;Pulumi Deploy and Document Challenge&lt;/a&gt;: Get Creative with Pulumi and GitHub&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Managing user access in GitHub at scale is not easy, especially when you have to handle multiple repositories, teams, and permissions across an organization. It becomes even more challenging when you need to ensure security and compliance.&lt;/p&gt;

&lt;p&gt;That's where Pulumi comes in. It's a powerful Infrastructure as Code (IaC) tool that allows you to define and enforce access policies using familiar programming languages like Python, TypeScript, and Go. Instead of manually managing permissions, you can automate everything with code, making it more efficient and scalable.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built: Automated GitHub Access Management
&lt;/h2&gt;

&lt;p&gt;This project aims to create a fully automated system for simplified permission management, eliminating the need to manually configure settings within GitHub's interface.&lt;/p&gt;

&lt;p&gt;The solution allows you to define user roles and repository access configurations within a straightforward YAML file. Pulumi, combined with Python and GitHub Actions, automates the provisioning and enforcement of these access controls.&lt;/p&gt;

&lt;p&gt;This approach is ideal for startups, enterprises, open-source projects, and any team seeking a hassle-free, scalable solution for GitHub access management.&lt;/p&gt;

&lt;h2&gt;
  
  
  Live Demo: Setting Up and Running the Project
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Note:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Make sure pulumi installation is done before. if not kindly refer&lt;/em&gt; &lt;a href="https://www.pulumi.com/docs/iac/download-install" rel="noopener noreferrer"&gt;https://www.pulumi.com/docs/iac/download-install&lt;/a&gt;&lt;br&gt;
Follow these steps to see the project in action:&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 1: &lt;strong&gt;Clone the Repository&lt;/strong&gt;
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Ajanhari/pulumi-github-access-governance.git
&lt;span class="nb"&gt;cd &lt;/span&gt;pulumi-github-access-governance
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Step 2: &lt;strong&gt;Set Up Pulumi and Install Dependencies&lt;/strong&gt;
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;pulumi pulumi-github pyyaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Step 3: &lt;strong&gt;Configure Pulumi for Your GitHub Organization&lt;/strong&gt;
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Login to Pulumi locally&lt;/span&gt;
pulumi login &lt;span class="nt"&gt;--local&lt;/span&gt;

&lt;span class="c"&gt;# Set GitHub Personal Access Token (Replace with actual token)&lt;/span&gt;
pulumi config &lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="nt"&gt;--secret&lt;/span&gt; githubToken &lt;span class="s2"&gt;"&amp;lt;YOUR_GITHUB_PERSONAL_ACCESS_TOKEN&amp;gt;"&lt;/span&gt;

&lt;span class="c"&gt;# Initialize a new Pulumi stack named "dev"&lt;/span&gt;
pulumi stack init dev

&lt;span class="c"&gt;# Set GitHub organization/owner (Replace 'YourOrgName' with your actual org)&lt;/span&gt;
pulumi config &lt;span class="nb"&gt;set &lt;/span&gt;github:owner &lt;span class="s2"&gt;"YourOrgName"&lt;/span&gt;

&lt;span class="c"&gt;# Set GitHub API Base URL&lt;/span&gt;
pulumi config &lt;span class="nb"&gt;set &lt;/span&gt;github:baseUrl &lt;span class="s2"&gt;"https://api.github.com"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/em&gt; Replace  with your actual GitHub Personal Access Token. Treat this token as a secret and manage it accordingly. YourOrgName should be replaced with your GitHub Organization name.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 4: &lt;strong&gt;Modify &lt;code&gt;users.yaml&lt;/code&gt; to Assign Roles&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Modify the users.yaml file to define roles and assign users to repositories.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;repositories:
  repo1:
    admin:
      - Ajanthan
      - Sachin
    maintain:
      - maintainer1
    write:
      - Varun
      - dev2
    triage: []
    read: []
  repo2:
    admin:
      - Ajanthan
      - Sachin
    write:
      - Varun
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 5: &lt;strong&gt;Deploy Changes&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pulumi up &lt;span class="nt"&gt;--yes&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 6: &lt;strong&gt;Verify in GitHub&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Check your GitHub repository settings to confirm the updated access permissions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 7: &lt;strong&gt;Automate with GitHub Actions&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Push the updated &lt;code&gt;users.yaml&lt;/code&gt; file to the repository and let GitHub Actions handle the provisioning.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add users.yaml
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Updated user roles"&lt;/span&gt;
git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;GitHub Actions will automatically apply the changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Repo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/Ajanhari/pulumi-github-access-governance" rel="noopener noreferrer"&gt;https://github.com/Ajanhari/pulumi-github-access-governance&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Key Advantages
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Centralized User Management:&lt;/strong&gt; Define and manage all access permissions in a single YAML file.&lt;br&gt;
&lt;strong&gt;Automated Access Control:&lt;/strong&gt; Eliminates the need for manual configuration, reducing human error and saving time.&lt;br&gt;
&lt;strong&gt;Scalability:&lt;/strong&gt; Designed to efficiently handle access management for hundreds of repositories.&lt;br&gt;
&lt;strong&gt;Compliance &amp;amp; Security:&lt;/strong&gt; Leverages GitHub Actions for audit trails and logs, enhancing compliance and security.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;If you're seeking to streamline GitHub access governance across multiple repositories, Pulumi offers a powerful and efficient solution. By leveraging Infrastructure as Code principles, Pulumi simplifies permission management, enhances scalability, and improves the reliability of your GitHub access controls. This approach saves time and reduces risk, allowing your team to focus on development and innovation.&lt;/p&gt;

&lt;p&gt;If you have any queries, let me know in the comments section. Happy to assist you. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Note:&lt;/em&gt;&lt;/strong&gt; This code is tested in github enterprise account.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>pulumichallenge</category>
      <category>github</category>
      <category>githubchallenge</category>
    </item>
  </channel>
</rss>
