[{"data":1,"prerenderedAt":548},["Reactive",2],{"navigation":3,"/posts/pulumi-watch":204,"/posts/pulumi-watch-surround":517},[4,192,200],{"title":5,"_path":6,"children":7,"icon":191},"Blog","/posts",[8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59,62,65,68,71,74,77,80,83,86,89,92,95,98,101,104,107,110,113,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,176,179,182,185,188],{"title":9,"_path":10},"Testing your API with REST Client","/posts/testing-your-api-with-rest-client",{"title":12,"_path":13},"HTML templating in Xamarin","/posts/html-templating-in-xamarin",{"title":15,"_path":16},"Goodbye Azure Portal, Welcome Azure CLI","/posts/welcome-azure-cli",{"title":18,"_path":19},"Coming across Gitpod","/posts/gitpod",{"title":21,"_path":22},"Handle token retrieval while querying an API","/posts/delegating-handler",{"title":24,"_path":25},"Clean up your local git branches.","/posts/cleaning-git-branches",{"title":27,"_path":28},"Automate configuration of Teams Tab SSO with PowerShell.","/posts/teams-sso-powershell",{"title":30,"_path":31},"How to do a technology watch? - Part 1","/posts/technology-watch-part1",{"title":33,"_path":34},"How to do a technology watch? - Part 2","/posts/technology-watch-part2",{"title":36,"_path":37},"You almost no longer need Key Vault references for Azure Functions.","/posts/azure-functions-custom-configuration",{"title":39,"_path":40},"How to do a technology watch? - Part 3","/posts/technology-watch-part3",{"title":42,"_path":43},"Forget DevOps, the future is already here!","/posts/devops-future",{"title":45,"_path":46},"Week 9, 2021 - Tips I learned this week","/posts/w09-2021-tips-learned-this-week",{"title":48,"_path":49},"Week 12, 2021 - Tips I learned this week","/posts/w12-2021-tips-learned-this-week",{"title":51,"_path":52},"Week 14, 2021 - Tips I learned this week","/posts/w14-2021-tips-learned-this-week",{"title":54,"_path":55},"Once upon a time in .NET","/posts/once-upon-a-time-in-dotnet",{"title":57,"_path":58},"Install your applications with winget","/posts/winget-import",{"title":60,"_path":61},"Customize your applications when installing them with winget","/posts/winget-override",{"title":63,"_path":64},"Week 22, 2021 - Tips I learned this week","/posts/w22-2021-tips-learned-this-week",{"title":66,"_path":67},"How to connect to an Azure SQL Database from C# using Azure AD","/posts/sqlclient-active-directory-authent",{"title":69,"_path":70},"Producing packages for Windows Package Manager","/posts/wingetcreate",{"title":72,"_path":73},"4 tips about GitHub Actions environment variables and contexts","/posts/github-actions-var-and-context",{"title":75,"_path":76},"AzureWebJobsStorage, the secret you don't need in your Function App.","/posts/azure-functions-without-azurewebjobsstorage",{"title":78,"_path":79},"ASP.NET Core - Lost in configuration","/posts/lost-in-configuration",{"title":81,"_path":82},"Week 39, 2021 - Tips I learned this week","/posts/w39-2021-tips-learned-this-week",{"title":84,"_path":85},"Week 41, 2021 - Tips I learned this week","/posts/w41-2021-tips-learned-this-week",{"title":87,"_path":88},"Migrating and open-sourcing my blog","/posts/migrating-blog",{"title":90,"_path":91},"Week 45, 2021 - Tips I learned this week","/posts/w45-2021-tips-learned-this-week",{"title":93,"_path":94},"Organize your GitHub stars with Astral","/posts/astral",{"title":96,"_path":97},"Pulumi with an Azure Blob Storage backend","/posts/pulumi-azure-backend",{"title":99,"_path":100},"IaC Hot Reload with Pulumi Watch","/posts/pulumi-watch",{"title":102,"_path":103},"Week 2, 2022 - Tips I learned this week","/posts/w02-2022-tips-learned-this-week",{"title":105,"_path":106},"Week 3, 2022 - Tips I learned this week","/posts/w03-2022-tips-learned-this-week",{"title":108,"_path":109},"Week 5, 2022 - Tips I learned this week","/posts/w05-2022-tips-learned-this-week",{"title":111,"_path":112},"How to provision an Azure SQL Database with Active Directory authentication","/posts/sqldatabase-active-directory-authent",{"title":114,"_path":115},"Why will I choose Pulumi over Terraform for my next project?","/posts/pulumi-vs-terraform",{"title":117,"_path":118},"Week 19, 2022 - Tips I learned this week","/posts/w19-2022-tips-learned-this-week",{"title":120,"_path":121},"Week 20, 2022 - Tips I learned this week","/posts/w20-2022-tips-learned-this-week",{"title":123,"_path":124},"Keeping secrets secure when using API Clients","/posts/http-clients-secrets",{"title":126,"_path":127},"What made me want to be a developer?","/posts/be-a-developer",{"title":129,"_path":130},"What can we do when stuck with a programming problem?","/posts/get-unstuck",{"title":132,"_path":133},"How did I automate the setup of my developer Windows laptop?","/posts/automate-developer-machine",{"title":135,"_path":136},"Discussion about API clients","/posts/http-clients",{"title":138,"_path":139},"Week 46, 2022 - Tips I learned this week","/posts/w46-2022-tips-learned-this-week",{"title":141,"_path":142},"When Pulumi met Nuke: a .NET love story","/posts/when-pulumi-met-nuke",{"title":144,"_path":145},"A year of learning and sharing - Dev Retro 2022","/posts/2022-retro",{"title":147,"_path":148},"Perform Dynamic Execution of an npm Package","/posts/pnpm-dlx",{"title":150,"_path":151},"Manage multiple Node.js versions","/posts/pnpm-env",{"title":153,"_path":154},"Introducing the Vue.js CI/CD series","/posts/vuecicd-introduction",{"title":156,"_path":157},"Execute commands using your project dependencies","/posts/pnpm-exec",{"title":159,"_path":160},"Vue.js CI/CD: Continuous Integration","/posts/vuecicd-ci",{"title":162,"_path":163},"Who is using pnpm?","/posts/pnpm-who-is-using",{"title":165,"_path":166},"Create an Azure-Ready GitHub Repository using Pulumi","/posts/azure-ready-github-repository",{"title":168,"_path":169},"Deploying to Azure from Azure DevOps without secrets","/posts/ado-workload-identity-federation",{"title":171,"_path":172},"Effortlessly Configure GitHub Repositories for Azure Deployment via OIDC","/posts/scripting-azure-ready-github-repository",{"title":174,"_path":175},"Playing with the .NET 8 Web API template","/posts/playing-with-dotnet8",{"title":177,"_path":178},"Another year of sharing and learning - Dev Retro 2023","/posts/2023-retro",{"title":180,"_path":181},"Week 4, 2024 - Tips I learned this week","/posts/w04-2024-tips-learned-this-week",{"title":183,"_path":184},"Using dependency injection with Azure .NET SDK","/posts/azure-sdk-di",{"title":186,"_path":187},"Having Fun With IT Event Calendars","/posts/it-event-calendars",{"title":189,"_path":190},"Call your Azure AD B2C protected API with authenticated HTTP requests from your JetBrains IDE","/posts/http-clients-oauth2","i-heroicons-newspaper",{"title":193,"_path":194,"children":195,"icon":199},"Goodies","/goodies",[196],{"title":197,"_path":198},"My Git Cheat Sheet","/goodies/gitcheatsheet","i-heroicons-gift-solid",{"title":201,"_path":202,"icon":203},"About","/about","i-heroicons-user-circle-solid",{"_path":100,"_dir":205,"_draft":206,"_partial":206,"_locale":207,"title":99,"description":208,"lead":209,"date":210,"badge":211,"image":213,"tags":215,"body":218,"_type":512,"_id":513,"_source":514,"_file":515,"_extension":516},"posts",false,"","Do you like using hot reload when developing applications? How about using hot reload when developing the cloud infrastructure of an application? Keep reading because that's what we are going to talk about.","Hot-reloading your cloud infrastructure.","2022-01-02T00:00:00.000Z",{"label":212},"DevOps",{"src":214},"/images/cloud-lighthouse_1.jpg",[216,217],"Pulumi","IaC",{"type":219,"children":220,"toc":506},"root",[221,228,235,240,260,294,328,368,382,388,400,423,436,442,457,469,481,493],{"type":222,"tag":223,"props":224,"children":225},"element","p",{},[226],{"type":227,"value":208},"text",{"type":222,"tag":229,"props":230,"children":232},"h2",{"id":231},"developing-and-deploying-cloud-infrastructure",[233],{"type":227,"value":234},"Developing and deploying Cloud Infrastructure",{"type":222,"tag":223,"props":236,"children":237},{},[238],{"type":227,"value":239},"When doing Infrastructure as Code for a cloud application we usually do the following steps:",{"type":222,"tag":241,"props":242,"children":243},"ol",{},[244,250,255],{"type":222,"tag":245,"props":246,"children":247},"li",{},[248],{"type":227,"value":249},"we write the code describing the desired state of the infrastructure",{"type":222,"tag":245,"props":251,"children":252},{},[253],{"type":227,"value":254},"we build this infrastructure code and compare the resulting desired state against the current state of the infrastructure",{"type":222,"tag":245,"props":256,"children":257},{},[258],{"type":227,"value":259},"we deploy to the provisioned infrastructure the changes needed to achieve the desired state",{"type":222,"tag":223,"props":261,"children":262},{},[263,265,279,281,292],{"type":227,"value":264},"When using Pulumi, you can run the ",{"type":222,"tag":266,"props":267,"children":271},"a",{"href":268,"rel":269},"https://www.pulumi.com/docs/reference/cli/pulumi_preview/",[270],"nofollow",[272],{"type":222,"tag":273,"props":274,"children":276},"code",{"className":275},[],[277],{"type":227,"value":278},"pulumi preview",{"type":227,"value":280}," command for step 2 and the ",{"type":222,"tag":266,"props":282,"children":285},{"href":283,"rel":284},"https://www.pulumi.com/docs/reference/cli/pulumi_up/",[270],[286],{"type":222,"tag":273,"props":287,"children":289},{"className":288},[],[290],{"type":227,"value":291},"pulumi up",{"type":227,"value":293}," command for step 3.",{"type":222,"tag":223,"props":295,"children":296},{},[297,299,304,306,312,314,319,321,326],{"type":227,"value":298},"As its name suggests, the ",{"type":222,"tag":273,"props":300,"children":302},{"className":301},[],[303],{"type":227,"value":278},{"type":227,"value":305}," command only \"preview\" the updates that could be made to the infrastructure but does not apply them. To perform an update of the cloud infrastructure you have to use the ",{"type":222,"tag":273,"props":307,"children":309},{"className":308},[],[310],{"type":227,"value":311},"pulumi update",{"type":227,"value":313}," command which also does a preview of the changes, prompts the user to approve the changes to be made, and performs these changes. That is why, to be honest I don't bother with ",{"type":222,"tag":273,"props":315,"children":317},{"className":316},[],[318],{"type":227,"value":278},{"type":227,"value":320},": most of the time I only use the ",{"type":222,"tag":273,"props":322,"children":324},{"className":323},[],[325],{"type":227,"value":291},{"type":227,"value":327}," command (which means I do steps 2 and 3 in one row).",{"type":222,"tag":329,"props":330,"children":332},"callout",{"icon":331},"i-heroicons-chat-bubble-left-20-solid",[333],{"type":222,"tag":223,"props":334,"children":335},{},[336,338,343,345,350,352,358,360,366],{"type":227,"value":337},"In case you wonder, if you already have run ",{"type":222,"tag":273,"props":339,"children":341},{"className":340},[],[342],{"type":227,"value":278},{"type":227,"value":344}," before running ",{"type":222,"tag":273,"props":346,"children":348},{"className":347},[],[349],{"type":227,"value":291},{"type":227,"value":351}," you can skip the preview in the ",{"type":222,"tag":273,"props":353,"children":355},{"className":354},[],[356],{"type":227,"value":357},"up",{"type":227,"value":359}," command by using the ",{"type":222,"tag":273,"props":361,"children":363},{"className":362},[],[364],{"type":227,"value":365},"--skip-preview",{"type":227,"value":367}," option.",{"type":222,"tag":223,"props":369,"children":370},{},[371,373,380],{"type":227,"value":372},"Of course, you can use these commands to automate the deployment of your cloud infrastructure using your favorite ",{"type":222,"tag":266,"props":374,"children":377},{"href":375,"rel":376},"https://www.pulumi.com/docs/guides/continuous-delivery/",[270],[378],{"type":227,"value":379},"CI/CD system",{"type":227,"value":381},".",{"type":222,"tag":229,"props":383,"children":385},{"id":384},"the-need-for-a-hot-reload-like-experience-when-doing-iac",[386],{"type":227,"value":387},"The need for a hot reload-like experience when doing IaC",{"type":222,"tag":223,"props":389,"children":390},{},[391,393,398],{"type":227,"value":392},"All this is great but there are times when all you want is to quickly write your infrastructure code and check that you can successfully provision and configure the cloud resources you need. This can happen when you want to prototype something, test a new cloud resource, or simply when you are developing your infrastructure and want to verify your infrastructure code works. Usually, you are using a \"sandbox\" cloud environment for this, the same way you would use your local environment for debugging application code. At these moments, you don't care about CI/CD. You care about quickly experimenting with changes to your infrastructure, being productive, making changes in your code, and checking what it does, so you want to be able to quickly iterate to make your code work. Yet, this is not possible if each time you make a change to the code you have to manually run the ",{"type":222,"tag":273,"props":394,"children":396},{"className":395},[],[397],{"type":227,"value":291},{"type":227,"value":399}," command, and approve the deployment.",{"type":222,"tag":329,"props":401,"children":402},{"icon":331},[403],{"type":222,"tag":223,"props":404,"children":405},{},[406,408,414,416,421],{"type":227,"value":407},"You can use the ",{"type":222,"tag":273,"props":409,"children":411},{"className":410},[],[412],{"type":227,"value":413},"--yes",{"type":227,"value":415}," option to automatically approve the changes and directly perform the update when running the ",{"type":222,"tag":273,"props":417,"children":419},{"className":418},[],[420],{"type":227,"value":291},{"type":227,"value":422}," command.",{"type":222,"tag":223,"props":424,"children":425},{},[426,428,434],{"type":227,"value":427},"But guess what? Fast feedback when doing a code change is exactly what you want when developing an application. Indeed whether you are building an application or building infrastructure you are doing software development so you have the same needs and practices. And what do application developers have in their toolbox to be more productive when developing? They have \"hot reload\": while debugging locally an application, they can modify the source code, and changes made will be almost instantaneously reflected on the application. Wouldn't it be great if similarly you could make a change in your infrastructure code and have the provisioned infrastructure automatically updated? That is what the ",{"type":222,"tag":273,"props":429,"children":431},{"className":430},[],[432],{"type":227,"value":433},"pulumi watch",{"type":227,"value":435}," command is here for.",{"type":222,"tag":229,"props":437,"children":439},{"id":438},"using-pulumi-watch",[440],{"type":227,"value":441},"Using Pulumi Watch",{"type":222,"tag":223,"props":443,"children":444},{},[445,455],{"type":222,"tag":266,"props":446,"children":449},{"href":447,"rel":448},"https://www.pulumi.com/docs/reference/cli/pulumi_watch/",[270],[450],{"type":222,"tag":273,"props":451,"children":453},{"className":452},[],[454],{"type":227,"value":433},{"type":227,"value":456}," is a command currently in preview that watches for changes in the infrastructure code directory and continuously updates the cloud resources.",{"type":222,"tag":223,"props":458,"children":459},{},[460,462,467],{"type":227,"value":461},"But the best is to see by yourself. In the following example, you can see on the left of the screen a terminal opened with the ",{"type":222,"tag":273,"props":463,"children":465},{"className":464},[],[466],{"type":227,"value":433},{"type":227,"value":468}," command running, and on the right of the screen vscode opened with the code describing the currently provisioned Azure infrastructure for my project. Some lines to create a \"Tweets\" table in the storage account are commented. When I uncomment them and save the code file, you can see that pulumi detects it, builds the code, and deploys the changes so creates the table in that case.",{"type":222,"tag":223,"props":470,"children":471},{},[472],{"type":222,"tag":473,"props":474,"children":480},"img",{"alt":475,"className":476,"src":479},"Pulumi watch in terminal.",[477,478],"rounded-lg","mx-auto","/posts/images/pulumiwatch_terminal_1.gif",[],{"type":222,"tag":223,"props":482,"children":483},{},[484,486,491],{"type":227,"value":485},"I don't know what you think but I find this pretty cool: it's like hot reload for your infrastructure as code. Of course, you will probably not use ",{"type":222,"tag":273,"props":487,"children":489},{"className":488},[],[490],{"type":227,"value":433},{"type":227,"value":492}," all the time, but for quickly writing and testing your infrastructure code it can be very helpful.",{"type":222,"tag":223,"props":494,"children":495},{},[496,498,504],{"type":227,"value":497},"As far as I know (don't hesitate to correct me in the comments if I am wrong), there is no such feature in Terraform and it's too bad because when you start using the ",{"type":222,"tag":273,"props":499,"children":501},{"className":500},[],[502],{"type":227,"value":503},"watch",{"type":227,"value":505}," command you don't want to do without it.",{"title":207,"searchDepth":507,"depth":507,"links":508},2,[509,510,511],{"id":231,"depth":507,"text":234},{"id":384,"depth":507,"text":387},{"id":438,"depth":507,"text":441},"markdown","content:1.posts:31.pulumi-watch.md","content","1.posts/31.pulumi-watch.md","md",[518,535],{"_path":103,"_dir":205,"_draft":206,"_partial":206,"_locale":207,"title":102,"description":519,"lead":520,"date":521,"image":522,"badge":524,"tags":526,"_type":512,"_id":533,"_source":514,"_file":534,"_extension":516},"This is my first article of the series Tips I learned this week for 2022 🚀! And today we are going to see some tips about .NET, Azure, GitHub, and VS Code.","Tooling around .NET, Azure, Github and VS Code.","2022-01-14T00:00:00.000Z",{"src":523},"/images/surface_1.jpg",{"label":525},"Tips",[527,528,529,530,531,532],"tips learned this week",".NET","Azure CLI","GitHub","vscode","tooling","content:1.posts:32.w02-2022-tips-learned-this-week.md","1.posts/32.w02-2022-tips-learned-this-week.md",{"_path":97,"_dir":205,"_draft":206,"_partial":206,"_locale":207,"title":96,"description":536,"lead":537,"date":538,"badge":539,"image":540,"tags":542,"_type":512,"_id":546,"_source":514,"_file":547,"_extension":516},"By default when you use Pulumi, the state is managed by Pulumi Service which is very convenient as you can concentrate on building your project infrastructure instead of spending time on where to store the state and how to handle concurrency. However, sometimes for governance or pricing concerns, or any other reasons, you don't want to use Pulumi Service and you prefer to manage the state yourself with your own backend. In this article, we will see how we can do that using Azure.","Pulumi without Pulumi Service.","2021-12-14T00:00:00.000Z",{"label":212},{"src":541},"/images/cloud-crave_1.jpg",[216,217,529,543,544,545],"Azure Storage","Azure Key Vault","Azure","content:1.posts:30.pulumi-azure-backend.md","1.posts/30.pulumi-azure-backend.md",1716749601594]