I wanted to explore using ChatGPT exclusively to create Create An Azure DevOps Pipeline with Terraform in Deploying Azure Resources as if I never created such a pipeline before.
I want to explore the following
- How effective using ChatGPT enabled me achieve my objective?
- How natural was the chat bot experience to me as a human?
- What were some challenges and downsides in using ChatGPT?
- Can I use this without googling for other articles and blogs?
I will go through some of the questions that I had asked and comment on its effectiveness. For brevity, I won’t display all the questions and steps. But I have a YouTube video where I recorded the full experience and you can view end to end.
The following are the key steps and my commentary
1) Asking for high level steps:

I felt this was a very helpful initial guide and gave me confidence to proceed further and drill down with follow up questions regarding each step.
And so I was easily able to create the DevOps project.

2) Create the DevOps service connect

I wasn’t clear on whether to select the Service Principal Name (automatic) option so I asked:

The instruction of point 6. Select a previously created service principal or create a new one didn’t alight to the UI options

So I proceeded ahead and I was prompted for credentials that has Azure Global Admin access which created a service principal automatically.
So this was minor miss from ChatGPT. Note that ChatGPT data is up until 2021.
I was able to get the service connection.

3) Creating the YAML pipeline code for Terraform tasks


This is decent code example and good explanation at the end, but one issue is that it didn’t mention the Terraform init but I’ll just follow through and see how to resolve later.

4) After this I uploaded my terraform code to deploy an Azure function app and storage account and ran the YAML pipeline. I encounter an error and ask ChatGPT about it.

The response didn’t respond with the right answer that I am expecting. I kept on asking for other alternative approaches and asking differently hoping that my questioning was effective enough.
So to resolve this, I had to rely on my own experience and knowledge by changing the parameter terraformWorkingDirectory to workingDirectory.

5) Resolve another pipeline error with terraform plan where initialization is required.

So I insert the terraform init step.

6) Resolve the following pipeline error

I simply paste the error into ChatGPT without much contextual detail and it is pleasantly providing a solution with explanation


So I create the backend by creating the azure resource group and storage account and then update the parameter values accordingly:

7) I further added YAML pipeline variables and their values as it is needed to be passed to the terraform code via the plan and apply steps.
And so I am eventually (after some more resolving other areas with ChatGPT), I am able to successfully run the pipeline.

I am now able to see the deployed Azure resources.

8) In testing the function app, I can see it is working

Conclusion
Overall, using ChatGPT was an amazing experience. Let me revert back to the questions I sought to ask in the beginning of this post.
- How effective is using ChatGPT enabled me achieve my objective?
Quite effective. ChatGPT accellerated my learning and provided detailed enough guidance.
In comparison to google searches, google provides many other examples and articles but you have to sift through them and it can be a trial and error to figure out what is the relevant example. With ChatGPT, the relevance is more spot on. - How natural was the chat bot experience to me as a human?
The chat conversation is very natural as it provides some additional guidance and other considerations. - What were some challenges and downsides in using ChatGPT?
The one downside is that certian syntax such as the parameter names (e.g. terraformWorkingDirectory) was either incompatible or out of date. This makes sense as it is made known that the data that ChatGPT is trained is up until 2021.
Also, the prescribed terraform version for the terraform installer task was outdated. I think it should have mentioned “latest” as an alternative and let the user decide. - Can I use this without googling for other articles and blogs?
I do think google would still be relevant for the time being as I do like features to learn technology with google images and video. Also the google answers that are a few lines is helpful as well. If and when ChatGPT can provide information in almost real time and provide images and screenshots with technical answers would be a huge advantage over Google search.
I would definitely use ChatGPT as another tool in my toolbox in my engineering and learn to use it more effectively with better prompts and well frames questions. By this way, I may have had less challenges in my demonstration. This is the advent of exciting things to come in the field of generative AI.
Here’s the video of the full experience:
Pingback: February 20, 2023 Weekly Update on Microsoft Integration Platform & Azure iPaaS - Hooking Stuff Together