---
layout: "fastly"
page_title: "Fastly: fastly_api_security_operation_tags"
sidebar_current: "docs-fastly-datasource-fastly_api_security_operation_tags"
description: |-
  Get API Security operation tags for a Fastly service.
---

# fastly_api_security_operation_tags

Use this data source to list API Security operation tags for a Fastly service.

## Example Usage

```terraform
resource "fastly_service_vcl" "svc1" {
  name          = "test-svc-1-example"
  force_destroy = true

  backend {
    address = "example.com"
    name    = "tf-test-backend-1"
  }
}

# Optional: create a tag so the data source returns a predictable result
resource "fastly_api_security_operation_tag" "example" {
  service_id  = fastly_service_vcl.svc1.id
  name        = "example-tag"
  description = "Example tag"
}

data "fastly_api_security_operation_tags" "tags" {
  service_id = fastly_service_vcl.svc1.id

  depends_on = [fastly_api_security_operation_tag.example]
}

output "api_security_operation_tags" {
  value = data.fastly_api_security_operation_tags.tags.tags
}

output "api_security_operation_tags_total" {
  value = data.fastly_api_security_operation_tags.tags.total
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `service_id` (String) Service ID.

### Read-Only

- `id` (String) The ID of this resource.
- `tags` (Set of Object) Operation tags. (see [below for nested schema](#nestedatt--tags))
- `total` (Number) Total number of matching results, as returned by the API.

<a id="nestedatt--tags"></a>
### Nested Schema for `tags`

Read-Only:

- `created_at` (String)
- `description` (String)
- `id` (String)
- `name` (String)
- `operation_count` (Number)
- `updated_at` (String)
