Skip to content

Latest commit

 

History

History
84 lines (60 loc) · 2.46 KB

feed_retention_policy.html.markdown

File metadata and controls

84 lines (60 loc) · 2.46 KB

layout: "azuredevops"

page_title: "AzureDevops: azuredevops_feed_retention_policy" description: |- Manages the Feed Retention Policy within Azure DevOps organization.

azuredevops_feed_retention_policy

Manages the Feed Retention Policy within Azure DevOps.

Example Usage - Project Feed

resource "azuredevops_project" "example" {
  name               = "Example Project"
  visibility         = "private"
  version_control    = "Git"
  work_item_template = "Agile"
  description        = "Managed by Terraform"
}

resource "azuredevops_feed" "example" {
  name       = "ExampleFeed"
  project_id = azuredevops_project.example.id
}

resource "azuredevops_feed_retention_policy" "example" {
  project_id                                = azuredevops_project.example.id
  feed_id                                   = azuredevops_feed.example.id
  count_limit                               = 20
  days_to_keep_recently_downloaded_packages = 30
}

Example Usage - Organization Feed

resource "azuredevops_feed" "example" {
  name = "examplefeed"
}

resource "azuredevops_feed_retention_policy" "example" {
  feed_id                                   = azuredevops_feed.example.id
  count_limit                               = 20
  days_to_keep_recently_downloaded_packages = 30
}

Argument Reference

The following arguments are supported:

  • feed_id - (Required) The ID of the Feed. Changing this forces a new resource to be created.

  • count_limit- (Required) The maximum number of versions per package.

  • days_to_keep_recently_downloaded_packages- (Required) The days to keep recently downloaded packages.

  • project_id - (Optional) The ID of the Project. If not specified, Feed will be created at the organization level. Changing this forces a new resource to be created.

Attributes Reference

The following attributes are exported:

  • feed_id - The ID of the Feed.
  • project_id - The ID of the Project.

Relevant Links

Import

Azure DevOps Feed Retention Policy can be imported using the Project ID and Feed ID or Feed ID e.g.:

terraform import azuredevops_feed_retention_policy.example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000

or

terraform import azuredevops_feed_retention_policy.example 00000000-0000-0000-0000-000000000000