Thursday, February 3, 2022

AZURE DEVOPS TO AWS cloud formation

Recently I was tasked with a job to deploy cloud formation templates from Azure Devops . Its a relatively easy task Let me walk you through the steps 1)What are we trying to do?
2)How to do it?
1)Set up Service connection In azure devops go to Project Settings>>Service Connection and create a new service connection.You will need to provide some details about an AWS User you will have to configure on the AWS End. Setup the AWS User with the required privileges to spin up cloud formation stacks
2)Setup azure pipelines

Many teams prefer to define their build and release pipelines using YAML.This YAML file in AzureDevops is called azure-pipelines.yaml file. In azure devops create a AWSShellScript task that basically executes your cloudformation deployment You can build your stack and deploy it using the SAM CLI

- task: AWSShellScript@1 
displayName: Network layer
inputs:
awsCredentials: WHATEVER_YOU_SETUP
regionName: WHATEVER_REGION
scriptType: 'inline'
inlineScript: |
sam deploy \
--template TEMPLATEl\
--no-confirm-changeset \
--capabilities CAPABILITY_IAM CAPABILITY_AUTO_EXPAND \
--stack-name NetworkLayer

No comments:

Post a Comment