Skip to content

Create cosmos db in another region, but in same deployment #943

Closed Answered by r30e
nikodemrafalski asked this question in Q&A
Discussion options

You must be logged in to vote

Personally, I've got around this issue with an extension on the deployment builder. Something like this:

[<CustomOperation "add_resources_in_location">]
member this.AddInLocation (state, location, resources) =
  this.AddArmResources(state, resources |> List.collect (fun x -> x.BuildResources location))

(Apologies for code quality, I'm writing on a phone)

However given that farmer bakes-in the location of a resource as part of the add_resources call, you can change the location of the resource group and this won't affect any resource which has already been added.

arm {
  location EastUS
  add_resources eastUsResources
  location CanadaEast
  add_resources canadaEastResources
}

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jwthomson
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants