Skip to content

azurermContainerRegistryTaskScheduleRunNow

Runs a Container Registry Task Schedule.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
new azurerm.provider.AzurermProvider(this, "azurerm", {
  features: [{}],
});
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
  this,
  "example",
  {
    location: "West Europe",
    name: "example-rg",
  }
);
const azurermContainerRegistryExample =
  new azurerm.containerRegistry.ContainerRegistry(this, "example_2", {
    location: azurermResourceGroupExample.location,
    name: "example-acr",
    resource_group_name: azurermResourceGroupExample.name,
    sku: "Basic",
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermContainerRegistryExample.overrideLogicalId("example");
const azurermContainerRegistryTaskExample =
  new azurerm.containerRegistryTask.ContainerRegistryTask(this, "example_3", {
    container_registry_id: azurermContainerRegistryExample.id,
    docker_step: [
      {
        context_access_token: "<github personal access token>",
        context_path:
          "https://github.com/<user name>/acr-build-helloworld-node#main",
        dockerfile_path: "Dockerfile",
        image_names: ["helloworld:{{.Run.ID}}"],
      },
    ],
    name: "example-task",
    platform: [
      {
        os: "Linux",
      },
    ],
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermContainerRegistryTaskExample.overrideLogicalId("example");
const azurermContainerRegistryTaskScheduleRunNowExample =
  new azurerm.containerRegistryTaskScheduleRunNow.ContainerRegistryTaskScheduleRunNow(
    this,
    "example_4",
    {
      container_registry_task_id: azurermContainerRegistryTaskExample.id,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermContainerRegistryTaskScheduleRunNowExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

  • containerRegistryTaskId - (Required) The ID of the Container Registry Task that to be scheduled. Changing this forces a new Container Registry Task Schedule to be created.

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of the Container Registry Task Schedule.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 30 minutes) Used when creating the Container Registry Task Schedule.
  • read - (Defaults to 5 minutes) Used when retrieving the Container Registry Task Schedule.
  • delete - (Defaults to 30 minutes) Used when deleting the Container Registry Task Schedule.