Skip to content

ANFTechTeam/anf-sql-snapshot-scheduler

Repository files navigation

ANF SQL Server Snapshot scheduler

to work on this project you need Powershell 6 Core as 7 isn't ready yet in Azure Function. to install it :

brew install powershell@6.2.4
brew 

Functions

checkInstall

sequenceDiagram
	HTTP Trigger ->>+ Azure Function : POST /api/checkInstall { ResourceGroupName, VMName }
  activate Azure Function
  loop Get VM Tags
      Azure Function ->>+ Azure Subscription: get tag list of VM
    Azure Subscription ->>+  Azure Function: Give list of Tags
    opt Tag value is "true"
     Azure Function -->>  HTTP Trigger: if NetApp Tag is "True"
    end
    loop Tag is Missing or False
      Azure Function ->>+ Azure Subscription: VM State?
      Azure Subscription ->>+ Azure Function : VM State
      alt vm is Off
        Azure Function ->>+ Azure Subscription: Start VM
      end
      Azure Function ->>+ VM : Execute runcommand
      VM ->>+ Azure Function: Result
      Azure Function ->>+ Azure Subscription: Set Tag with Result
    end
  end
        Azure Function ->>+ HTTP Trigger: Result
Loading

this function need a POST request on

About

Azure Snapshot Scheduler with SQL Integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published