A simple example to show how to deploy Atlas Cluster using Azure DevOps and Terraform provider
Fork this repo
Setup Azure DevOps Organization and project
Navigate to Project, Choose Pipelines
Choose Create Pipeline
Where is your code - Choose Github
Choose repo you forked in previous step, It will load the azure-pipelines.yml file
Create Following variables
- $(ContainerName)
- $(ResourceGroupName)
- $(StorageAccountName)
Update yml file value (Use the value of backendserviceArm template)
backendServiceArm: 'Visual Studio Enterprise (62626e97-807f-4c32-98e6-b7c3078adaf9)'
Configure Atlas API Acces following these links
https://docs.atlas.mongodb.com/configure-api-access/
Ensure IPs of Azure region of your microsoft hosted or self hosted agent is whitelisted in the Atlas programmatic key created above
Go to Library of left hand navigation
upload terraform.tfvars file with following values
public_key = ""
private_key = ""
atlasprojectid = ""
cluster_region = "US_WEST_2"
atlas_provider_name = "AWS"
atlas_provider_instance_size_name = "M10"
auto_scaling_disk_gb_enabled = true
mongo_db_major_version = "4.4"
mongodb_atlas_database_username = ""
mongodb_atlas_database_user_password = ""