title: Triggering Azure Container Instance group to start every day
body: <p>I am using Terraform to set up an infrastructure, in which I want to run a Docker container (using ACI) every day, with the same (default) command every time. </p>
  
  <p>My initial idea is to use Terraform to provision a Container Group resource, and then my only remaining task is to make sure it is started every day. However, I can't figure out how to do this the simplest. </p>
  
  <p>Currently, my attempt is to use Logic Apps, but I can't find the right action. Ideally, a Container Group had a web-hook that could trigger it starting, or logic apps had an action that could run Azure CLI commands.</p>
  
  <p>Any input?</p>
  
  <pre><code>provider "azure" {
  
  }
  
  resource "azurerm_resource_group" "test" {
    name     = "testResourceGroup1"
    location = "North Europe"
  }
  
  data "azurerm_container_registry" "test" {
    name                = "..."
    resource_group_name = "..."
  }
  
  resource "azurerm_container_group" "example" {
    name                = "example-continst"
    location            = "${azurerm_resource_group.test.location}"
    resource_group_name = "${azurerm_resource_group.test.name}"
    os_type             = "Linux"
    ip_address_type     = "Public"
    restart_policy      = "Never"
  
    image_registry_credential {
      username = "${data.azurerm_container_registry.test.admin_username}"
      password = "${data.azurerm_container_registry.test.admin_password}"
      server = "${data.azurerm_container_registry.test.login_server}"
    }
  
    container {
      name   = "main"
      image  = "${data.azurerm_container_registry.test.login_server}/compute-instance"
      cpu    = "1.0"
      memory = "1.0"
  
      ports {
        port     = 443
        protocol = "TCP"
      }
    }
  }
  
  resource "azurerm_logic_app_workflow" "test" {
    name                = "workflow1"
    location            = "${azurerm_resource_group.test.location}"
    resource_group_name = "${azurerm_resource_group.test.name}"
  }
  
  resource "azurerm_logic_app_trigger_recurrence" "test" {
    name         = "run-every-day"
    logic_app_id = "${azurerm_logic_app_workflow.test.id}"
    frequency    = "Day"
    interval     = 1
  }
  </code></pre>