<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Byte Sized Cloud - Medium]]></title>
        <description><![CDATA[You can find Cloud related byte sized learning materials here. - Medium]]></description>
        <link>https://medium.com/byte-sized-cloud?source=rss----e81a39488b95---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Byte Sized Cloud - Medium</title>
            <link>https://medium.com/byte-sized-cloud?source=rss----e81a39488b95---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 15:59:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/byte-sized-cloud" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building OPNsense firewall in Proxmox]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/byte-sized-cloud/building-opnsense-firewall-in-proxmox-fba2c9082276?source=rss----e81a39488b95---4"><img src="https://cdn-images-1.medium.com/max/753/1*uzAyg-K4pbazUnD7Bfc_Zg.png" width="753"></a></p><p class="medium-feed-link"><a href="https://medium.com/byte-sized-cloud/building-opnsense-firewall-in-proxmox-fba2c9082276?source=rss----e81a39488b95---4">Continue reading on Byte Sized Cloud »</a></p></div>]]></description>
            <link>https://medium.com/byte-sized-cloud/building-opnsense-firewall-in-proxmox-fba2c9082276?source=rss----e81a39488b95---4</link>
            <guid isPermaLink="false">https://medium.com/p/fba2c9082276</guid>
            <dc:creator><![CDATA[Manish Karki]]></dc:creator>
            <pubDate>Fri, 26 Jun 2026 08:14:42 GMT</pubDate>
            <atom:updated>2026-06-26T08:14:44.190Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How to use AWS CFCT]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/byte-sized-cloud/how-to-use-aws-cfct-2a1d3d4b50b9?source=rss----e81a39488b95---4"><img src="https://cdn-images-1.medium.com/max/2600/1*9cFW0JnUfdBMWNl-lJ9GNw.png" width="2992"></a></p><p class="medium-feed-snippet">Non-member access: https://medium.com/@manish.karki/how-to-use-aws-cfct-2a1d3d4b50b9?sk=86fdf8b61ac108f909532079b2652a05</p><p class="medium-feed-link"><a href="https://medium.com/byte-sized-cloud/how-to-use-aws-cfct-2a1d3d4b50b9?source=rss----e81a39488b95---4">Continue reading on Byte Sized Cloud »</a></p></div>]]></description>
            <link>https://medium.com/byte-sized-cloud/how-to-use-aws-cfct-2a1d3d4b50b9?source=rss----e81a39488b95---4</link>
            <guid isPermaLink="false">https://medium.com/p/2a1d3d4b50b9</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[aws-control-tower]]></category>
            <dc:creator><![CDATA[Manish Karki]]></dc:creator>
            <pubDate>Fri, 26 Jun 2026 08:14:32 GMT</pubDate>
            <atom:updated>2026-06-26T08:14:33.634Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Terraform in Multi-Account AWS Using GitHub Actions and OIDC]]></title>
            <link>https://medium.com/byte-sized-cloud/terraform-in-multi-account-aws-using-github-actions-and-oidc-580cc092d044?source=rss----e81a39488b95---4</link>
            <guid isPermaLink="false">https://medium.com/p/580cc092d044</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[terraform]]></category>
            <dc:creator><![CDATA[Manish Karki]]></dc:creator>
            <pubDate>Fri, 26 Jun 2026 08:14:21 GMT</pubDate>
            <atom:updated>2026-06-26T08:14:22.920Z</atom:updated>
            <content:encoded><![CDATA[<p>Non-member access: <a href="https://medium.com/@manish.karki/terraform-in-multi-account-aws-using-github-actions-and-oidc-580cc092d044">https://medium.com/@manish.karki/terraform-in-multi-account-aws-using-github-actions-and-oidc-580cc092d044</a></p><p>Terraform is often perceived as easy, and in a lab environment, it absolutely is. You write a few resources, run terraform init, plan, and apply, and infrastructure magically appears. But the real challenge begins when you move from a <strong>single-account lab setup</strong> to a <strong>multi-account enterprise architecture</strong>.</p><p>This article explores:</p><ul><li>Why Terraform feels simple in a lab</li><li>Why multi-account deployments introduce real complexity</li><li>How GitHub Actions + OIDC changes authentication patterns</li><li>Two architectural approaches</li></ul><h3>Terraform Is Easy in a Lab Environment</h3><p>In a typical lab:</p><ul><li>Single AWS or Azure account</li><li>Single provider block</li><li>Single IAM role or service principal</li><li>No cross-account networking</li><li>No shared services</li></ul><pre>provider &quot;aws&quot; {<br>  region = &quot;us-east-1&quot;<br>}</pre><p>That’s it.</p><p>You create:</p><ul><li>EC2</li><li>VPC</li><li>Security groups</li><li>Route tables</li></ul><p>Everything lives inside one boundary.</p><p>There are no cross-account dependencies, no DNS in shared services, no centralized networking, and no identity boundary issues.</p><p>And because of that, Terraform feels extremely straightforward.</p><h3>The Reality: Multi-Account Architecture</h3><p>In enterprise environments, things look very different.</p><p>For example, in AWS:</p><ul><li>Account A → Application account (EC2, ECS, Lambda)</li><li>Account B → Shared networking account (Transit Gateway, centralized VPC)</li><li>Account C → Shared services (Route53, logging, security tooling)</li><li>Account D → Security account</li></ul><p>In Azure:</p><ul><li>Multiple subscriptions</li><li>Hub-spoke architecture</li><li>Central networking subscription</li><li>Shared DNS subscription</li><li>Separate identity boundaries</li></ul><p>Now imagine a simple deployment:</p><ul><li>Deploy EC2 in Account A</li><li>Attach to a Transit Gateway in Account B</li><li>Update DNS record in Account C</li><li>Maybe create VPC peering between A and B</li></ul><p>That’s no longer “simple Terraform”.</p><p>Now you’re dealing with:</p><ul><li>Cross-account authentication</li><li>Cross-account resource references</li><li>Trust relationships</li><li>Least privilege boundaries</li><li>CI/CD identity federation</li></ul><p>This is where architecture matters.</p><h3>Using GitHub Actions + OIDC</h3><p>Instead of long-lived credentials, modern best practice is to use OIDC federation between:</p><ul><li>GitHub Actions</li><li>AWS IAM Role (or Azure federated identity)</li></ul><p>For AWS:</p><ul><li>GitHub → OIDC provider in IAM</li><li>IAM Role trusts GitHub repo</li><li>Workflow assumes role dynamically</li></ul><p>This eliminates:</p><ul><li>Static access keys</li><li>Secrets stored in GitHub</li><li>Credential rotation headaches</li></ul><p>The question is:</p><p><strong>How do we handle multiple accounts?</strong></p><h3>Approach 1: Separate OIDC Role Per Account</h3><p>In this model:</p><ul><li>Account A has an OIDC role</li><li>Account B has an OIDC role</li><li>Account C has an OIDC role</li></ul><p>Each GitHub workflow assumes the appropriate role depending on what it deploys.</p><h3>Example</h3><ul><li>Workflow A → Assumes Role in Account A</li><li>Workflow B → Assumes Role in Account B</li></ul><h3>Why This Looks Simple</h3><p>It aligns with isolation principles.</p><p>Each account:</p><ul><li>Has its own trust relationship</li><li>Has tightly scoped permissions</li><li>Has independent pipelines</li></ul><h3>Why This Becomes a Problem</h3><p>This approach breaks down when <strong>one deployment needs to touch multiple accounts in the same run.</strong></p><p>Example:</p><ul><li>Create EC2 in Account A</li><li>Create a Route53 record in Account C</li><li>Attach to TGW in Account B</li></ul><p>Now what?</p><p>You cannot easily:</p><ul><li>Switch identities mid-apply</li><li>Assume two OIDC roles in one Terraform provider automatically</li><li>Maintain atomic deployment across accounts</li></ul><p>You end up:</p><ul><li>Splitting pipelines</li><li>Passing outputs between workflows</li><li>Increasing complexity</li><li>Losing transactional consistency</li></ul><p>This model works for <strong>isolated account deployments</strong>, but not for <strong>cross-account orchestration</strong>.</p><h3>Approach 2 (Recommended): Primary OIDC Role + Cross-Account Role Assumption + Provider Aliases</h3><p>This is the scalable pattern.</p><h3>Step 1: GitHub Assumes a Primary Role</h3><p>GitHub Actions uses OIDC to assume a role in a <strong>Deployment Account</strong> (or shared tooling account).</p><p>This role:</p><ul><li>Has minimal permissions</li><li>Is allowed to assume roles in other accounts</li></ul><h3>Step 2: Role Chaining (AssumeRole)</h3><p>In target accounts:</p><ul><li>Create IAM roles that trust the Deployment Account role</li><li>Grant least-privilege permissions</li></ul><p>Add the following custom inline policy to your AWS Role used for OIDC:</p><pre>{<br>    &quot;Version&quot;: &quot;2012-10-17&quot;,<br>    &quot;Statement&quot;: [<br>        {<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Action&quot;: &quot;sts:AssumeRole&quot;,<br>            &quot;Resource&quot;: &quot;arn:aws:iam::&lt;target-account-id&gt;:role/&lt;role-name-in-target-account&gt;&quot;<br>        }<br>    ]<br>}</pre><p>You can add “Resource” as required.</p><p>Add this in the trust relationship in the role of the target account:</p><pre>{<br>    &quot;Version&quot;: &quot;2012-10-17&quot;,<br>    &quot;Statement&quot;: [<br>        {<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Principal&quot;: {<br>                &quot;AWS&quot;: [<br>                    &quot;arn:aws:iam::&lt;source-account-id&gt;:role/&lt;role-for-OIDC-in-source-account&gt;&quot;<br>                ]<br>            },<br>            &quot;Action&quot;: &quot;sts:AssumeRole&quot;<br>        }<br>    ]<br>}</pre><p>Add this to each account you require to deploy resources to. The policy of the role should have enough permissions to deploy the resources.</p><h3>Step 3: Use Terraform Provider Aliases</h3><p>Terraform supports multiple provider configurations.</p><p>Below is an example of providers.tf in the root folder:</p><pre>terraform {<br><br>  required_version = &quot;&gt;= 1.3.0&quot;<br><br>  required_providers {<br>    aws = {<br>      source  = &quot;hashicorp/aws&quot;<br>      version = &quot;&gt;= 6.28.0, &lt; 7.0.0&quot;<br>      configuration_aliases = [aws.account_b]<br>    }<br>  }<br>}<br><br>provider &quot;aws&quot; {<br>  region = var.aws_region<br>}<br><br>provider &quot;aws&quot; {<br>  alias  = &quot;account_b&quot;<br>  region = var.aws_region<br><br>  assume_role {<br>    role_arn = var.account_b_role_arn<br>  }<br>}</pre><p>You can have multiple providers for different accounts.</p><p>Below is an example of main.tf for one module:</p><pre>module &quot;mk_s3_bucket&quot; {<br>  providers = {<br>    aws = aws.account_b<br>  }<br>  source = &quot;./modules/my-s3&quot;<br>  bucket_name = var.bucket_name<br>  account_b_role_arn = var.account_b_role_arn<br>}</pre><p>This module is deployed is specific account. You can do the same for other modules with a separate provider to deploy in another account.</p><h3>Step 4: GitHub action</h3><p>Here is an example of how you can pass the role name for another AWS account in a pipeline. You need to save it in GitHub Secrets/Variables and pass it in the pipeline if you don’t want to hardcode the role ARN. The pipeline is for manual trigger with a specific directory. You can adjust it as required.</p><pre>name: Terraform Deploy (OIDC)<br><br>on:<br>  workflow_dispatch:<br>    inputs:<br>      tf_directory:<br>        description: &quot;Terraform directory to deploy.&quot;<br>        required: true<br>        default: &quot;./terraform-s3&quot;<br><br>permissions:<br>  id-token: write<br>  contents: read<br><br>jobs:<br>  terraform:<br>    name: Deploy Terraform<br>    runs-on: ubuntu-latest<br><br>    environment: production   # optional: use protected environment<br><br>    steps:<br>      - name: Checkout repository<br>        uses: actions/checkout@v4<br><br>      # Configure AWS credentials using OIDC<br>      - name: Configure AWS credentials<br>        uses: aws-actions/configure-aws-credentials@v4<br>        with:<br>          role-to-assume: ${{ secrets.AWS_ROLE_ARN }}<br>          role-session-name: github-terraform-session<br>          aws-region: ${{ secrets.AWS_REGION }}<br><br>      # Install Terraform<br>      - name: Setup Terraform<br>        uses: hashicorp/setup-terraform@v3<br>        with:<br>          terraform_version: 1.6.6<br><br>      # Initialize Terraform<br>      - name: Terraform Init<br>        env:<br>          TF_VAR_account_b_role_arn: ${{ secrets.ACCOUNT_B_ROLE_ARN }}<br>        run: terraform init<br>        working-directory: ./${{ github.event.inputs.tf_directory }}<br><br>      # Validate configuration<br>      - name: Terraform Validate<br>        env:<br>          TF_VAR_account_b_role_arn: ${{ secrets.ACCOUNT_B_ROLE_ARN }}<br>        run: terraform validate<br>        working-directory: ./${{ github.event.inputs.tf_directory }}<br><br>      # Create execution plan<br>      - name: Terraform Plan<br>        env:<br>          TF_VAR_account_b_role_arn: ${{ secrets.ACCOUNT_B_ROLE_ARN }}<br>        run: terraform plan -out=tfplan<br>        working-directory: ./${{ github.event.inputs.tf_directory }}<br><br>      # Apply (only if manual trigger)<br>      - name: Terraform Apply<br>        env:<br>          TF_VAR_account_b_role_arn: ${{ secrets.ACCOUNT_B_ROLE_ARN }}<br>        run: terraform apply -auto-approve tfplan<br>        working-directory: ./${{ github.event.inputs.tf_directory }}</pre><h3>Why This Is Better</h3><p>✅ Single CI workflow<br> ✅ Single Terraform state<br> ✅ Atomic cross-account deployment<br> ✅ Explicit account boundaries in code<br> ✅ Clean separation of permissions<br> ✅ Scalable to N accounts</p><p>You gain:</p><ul><li>Control</li><li>Clarity</li><li>Reusability</li><li>Enterprise-grade security</li></ul><h3>Why Understanding Complexity Matters</h3><p>Terraform itself is not complex. Multi-account architecture is.</p><p>The challenge is not:</p><ul><li>Writing HCL</li></ul><p>The challenge is:</p><ul><li>Identity design</li><li>Trust boundaries</li><li>Cross-account networking</li><li>CI/CD federation</li><li>Least privilege enforcement</li></ul><p>If you only learn Terraform in a lab, you learn syntax. If you deploy in multi-account enterprise environments, you learn architecture. And architecture is what separates DevOps engineers from platform engineers.</p><h3>Final Thoughts</h3><p>Terraform is simple in a single account. But in real-world environments:</p><ul><li>Cross-account DNS</li><li>VPC peering</li><li>Transit Gateway attachments</li><li>Shared networking</li><li>Centralized logging</li></ul><p>All require thoughtful identity architecture. If your deployments must span multiple accounts, avoid multiple OIDC roles per account for the same pipeline.</p><p>Instead:</p><ul><li>Use one OIDC entry point</li><li>Use cross-account role assumption</li><li>Use provider aliases</li><li>Enforce least privilege</li></ul><p>That is the pattern that scales.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=580cc092d044" width="1" height="1" alt=""><hr><p><a href="https://medium.com/byte-sized-cloud/terraform-in-multi-account-aws-using-github-actions-and-oidc-580cc092d044">Terraform in Multi-Account AWS Using GitHub Actions and OIDC</a> was originally published in <a href="https://medium.com/byte-sized-cloud">Byte Sized Cloud</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding CLI, SDK, and Infrastructure as Code in AWS and Azure]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">Non-member access&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/byte-sized-cloud/understanding-cli-sdk-and-infrastructure-as-code-in-aws-and-azure-322dbcc6557b?source=rss----e81a39488b95---4">Continue reading on Byte Sized Cloud »</a></p></div>]]></description>
            <link>https://medium.com/byte-sized-cloud/understanding-cli-sdk-and-infrastructure-as-code-in-aws-and-azure-322dbcc6557b?source=rss----e81a39488b95---4</link>
            <guid isPermaLink="false">https://medium.com/p/322dbcc6557b</guid>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Manish Karki]]></dc:creator>
            <pubDate>Fri, 26 Jun 2026 08:14:08 GMT</pubDate>
            <atom:updated>2026-06-26T08:14:10.208Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Creating Wrapper Modules in Terraform: Enforcing Company Standards for Resource Deployment]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">Non-member access&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/byte-sized-cloud/creating-wrapper-modules-in-terraform-enforcing-company-standards-for-resource-deployment-618890c758c3?source=rss----e81a39488b95---4">Continue reading on Byte Sized Cloud »</a></p></div>]]></description>
            <link>https://medium.com/byte-sized-cloud/creating-wrapper-modules-in-terraform-enforcing-company-standards-for-resource-deployment-618890c758c3?source=rss----e81a39488b95---4</link>
            <guid isPermaLink="false">https://medium.com/p/618890c758c3</guid>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[infrastructure-as-code]]></category>
            <dc:creator><![CDATA[Manish Karki]]></dc:creator>
            <pubDate>Sun, 15 Feb 2026 01:24:55 GMT</pubDate>
            <atom:updated>2026-02-15T01:25:28.357Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[AWS Control Tower Set Up For an Absolute Beginner]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">Non-member access&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/byte-sized-cloud/aws-control-tower-set-up-for-an-absolute-beginner-0ad2a4cbe397?source=rss----e81a39488b95---4">Continue reading on Byte Sized Cloud »</a></p></div>]]></description>
            <link>https://medium.com/byte-sized-cloud/aws-control-tower-set-up-for-an-absolute-beginner-0ad2a4cbe397?source=rss----e81a39488b95---4</link>
            <guid isPermaLink="false">https://medium.com/p/0ad2a4cbe397</guid>
            <category><![CDATA[aws-multiple-accounts]]></category>
            <category><![CDATA[aws-well-architected]]></category>
            <category><![CDATA[aws-control-tower]]></category>
            <category><![CDATA[aws-opswork]]></category>
            <category><![CDATA[aws-landing-zone]]></category>
            <dc:creator><![CDATA[Manish Karki]]></dc:creator>
            <pubDate>Sun, 07 Sep 2025 02:59:10 GMT</pubDate>
            <atom:updated>2026-02-06T02:08:48.065Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Using AWS Workspace Secure browser with IAM Identity Centre]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/byte-sized-cloud/using-aws-workspace-secure-browser-with-iam-identity-centre-ae81a1df3d92?source=rss----e81a39488b95---4"><img src="https://cdn-images-1.medium.com/max/1900/1*fQDWZyZVGbEyGJS5OxoKQQ.png" width="1900"></a></p><p class="medium-feed-snippet">https://medium.com/byte-sized-cloud/using-aws-workspace-secure-browser-with-iam-identity-centre-ae81a1df3d92?sk=f50d59f3598cbce737a8faef0d77</p><p class="medium-feed-link"><a href="https://medium.com/byte-sized-cloud/using-aws-workspace-secure-browser-with-iam-identity-centre-ae81a1df3d92?source=rss----e81a39488b95---4">Continue reading on Byte Sized Cloud »</a></p></div>]]></description>
            <link>https://medium.com/byte-sized-cloud/using-aws-workspace-secure-browser-with-iam-identity-centre-ae81a1df3d92?source=rss----e81a39488b95---4</link>
            <guid isPermaLink="false">https://medium.com/p/ae81a1df3d92</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[workspace]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Manish Karki]]></dc:creator>
            <pubDate>Sun, 07 Sep 2025 02:58:53 GMT</pubDate>
            <atom:updated>2025-09-07T03:06:07.581Z</atom:updated>
        </item>
    </channel>
</rss>