Viewing docs for Fastly v11.4.1
published on Friday, Feb 27, 2026 by Pulumi
published on Friday, Feb 27, 2026 by Pulumi
Viewing docs for Fastly v11.4.1
published on Friday, Feb 27, 2026 by Pulumi
published on Friday, Feb 27, 2026 by Pulumi
Use this data source to get a list of Fastly dictionaries for the specified service/version.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as fastly from "@pulumi/fastly";
const exampleServiceVcl = new fastly.ServiceVcl("example", {
name: "Example Service",
domains: [{
name: "example.com",
}],
dictionaries: [
{
name: "example_1",
},
{
name: "example_2",
},
{
name: "example_3",
},
],
forceDestroy: true,
});
const example = fastly.getDictionariesOutput({
serviceId: exampleServiceVcl.id,
serviceVersion: exampleServiceVcl.activeVersion,
});
export const serviceDictionaries = example;
import pulumi
import pulumi_fastly as fastly
example_service_vcl = fastly.ServiceVcl("example",
name="Example Service",
domains=[{
"name": "example.com",
}],
dictionaries=[
{
"name": "example_1",
},
{
"name": "example_2",
},
{
"name": "example_3",
},
],
force_destroy=True)
example = fastly.get_dictionaries_output(service_id=example_service_vcl.id,
service_version=example_service_vcl.active_version)
pulumi.export("serviceDictionaries", example)
package main
import (
"github.com/pulumi/pulumi-fastly/sdk/v11/go/fastly"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleServiceVcl, err := fastly.NewServiceVcl(ctx, "example", &fastly.ServiceVclArgs{
Name: pulumi.String("Example Service"),
Domains: fastly.ServiceVclDomainArray{
&fastly.ServiceVclDomainArgs{
Name: pulumi.String("example.com"),
},
},
Dictionaries: fastly.ServiceVclDictionaryArray{
&fastly.ServiceVclDictionaryArgs{
Name: pulumi.String("example_1"),
},
&fastly.ServiceVclDictionaryArgs{
Name: pulumi.String("example_2"),
},
&fastly.ServiceVclDictionaryArgs{
Name: pulumi.String("example_3"),
},
},
ForceDestroy: pulumi.Bool(true),
})
if err != nil {
return err
}
example := fastly.GetDictionariesOutput(ctx, fastly.GetDictionariesOutputArgs{
ServiceId: exampleServiceVcl.ID(),
ServiceVersion: exampleServiceVcl.ActiveVersion,
}, nil)
ctx.Export("serviceDictionaries", example)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Fastly = Pulumi.Fastly;
return await Deployment.RunAsync(() =>
{
var exampleServiceVcl = new Fastly.ServiceVcl("example", new()
{
Name = "Example Service",
Domains = new[]
{
new Fastly.Inputs.ServiceVclDomainArgs
{
Name = "example.com",
},
},
Dictionaries = new[]
{
new Fastly.Inputs.ServiceVclDictionaryArgs
{
Name = "example_1",
},
new Fastly.Inputs.ServiceVclDictionaryArgs
{
Name = "example_2",
},
new Fastly.Inputs.ServiceVclDictionaryArgs
{
Name = "example_3",
},
},
ForceDestroy = true,
});
var example = Fastly.GetDictionaries.Invoke(new()
{
ServiceId = exampleServiceVcl.Id,
ServiceVersion = exampleServiceVcl.ActiveVersion,
});
return new Dictionary<string, object?>
{
["serviceDictionaries"] = example,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fastly.ServiceVcl;
import com.pulumi.fastly.ServiceVclArgs;
import com.pulumi.fastly.inputs.ServiceVclDomainArgs;
import com.pulumi.fastly.inputs.ServiceVclDictionaryArgs;
import com.pulumi.fastly.FastlyFunctions;
import com.pulumi.fastly.inputs.GetDictionariesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleServiceVcl = new ServiceVcl("exampleServiceVcl", ServiceVclArgs.builder()
.name("Example Service")
.domains(ServiceVclDomainArgs.builder()
.name("example.com")
.build())
.dictionaries(
ServiceVclDictionaryArgs.builder()
.name("example_1")
.build(),
ServiceVclDictionaryArgs.builder()
.name("example_2")
.build(),
ServiceVclDictionaryArgs.builder()
.name("example_3")
.build())
.forceDestroy(true)
.build());
final var example = FastlyFunctions.getDictionaries(GetDictionariesArgs.builder()
.serviceId(exampleServiceVcl.id())
.serviceVersion(exampleServiceVcl.activeVersion())
.build());
ctx.export("serviceDictionaries", example);
}
}
resources:
exampleServiceVcl:
type: fastly:ServiceVcl
name: example
properties:
name: Example Service
domains:
- name: example.com
dictionaries:
- name: example_1
- name: example_2
- name: example_3
forceDestroy: true
variables:
example:
fn::invoke:
function: fastly:getDictionaries
arguments:
serviceId: ${exampleServiceVcl.id}
serviceVersion: ${exampleServiceVcl.activeVersion}
outputs:
serviceDictionaries: ${example}
Using getDictionaries
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDictionaries(args: GetDictionariesArgs, opts?: InvokeOptions): Promise<GetDictionariesResult>
function getDictionariesOutput(args: GetDictionariesOutputArgs, opts?: InvokeOptions): Output<GetDictionariesResult>def get_dictionaries(service_id: Optional[str] = None,
service_version: Optional[int] = None,
opts: Optional[InvokeOptions] = None) -> GetDictionariesResult
def get_dictionaries_output(service_id: Optional[pulumi.Input[str]] = None,
service_version: Optional[pulumi.Input[int]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDictionariesResult]func GetDictionaries(ctx *Context, args *GetDictionariesArgs, opts ...InvokeOption) (*GetDictionariesResult, error)
func GetDictionariesOutput(ctx *Context, args *GetDictionariesOutputArgs, opts ...InvokeOption) GetDictionariesResultOutput> Note: This function is named GetDictionaries in the Go SDK.
public static class GetDictionaries
{
public static Task<GetDictionariesResult> InvokeAsync(GetDictionariesArgs args, InvokeOptions? opts = null)
public static Output<GetDictionariesResult> Invoke(GetDictionariesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDictionariesResult> getDictionaries(GetDictionariesArgs args, InvokeOptions options)
public static Output<GetDictionariesResult> getDictionaries(GetDictionariesArgs args, InvokeOptions options)
fn::invoke:
function: fastly:index/getDictionaries:getDictionaries
arguments:
# arguments dictionaryThe following arguments are supported:
- Service
Id string - Alphanumeric string identifying the service.
- Service
Version int - Integer identifying a service version.
- Service
Id string - Alphanumeric string identifying the service.
- Service
Version int - Integer identifying a service version.
- service
Id String - Alphanumeric string identifying the service.
- service
Version Integer - Integer identifying a service version.
- service
Id string - Alphanumeric string identifying the service.
- service
Version number - Integer identifying a service version.
- service_
id str - Alphanumeric string identifying the service.
- service_
version int - Integer identifying a service version.
- service
Id String - Alphanumeric string identifying the service.
- service
Version Number - Integer identifying a service version.
getDictionaries Result
The following output properties are available:
- Dictionaries
List<Get
Dictionaries Dictionary> - List of all dictionaries for the version of the service.
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Id string - Alphanumeric string identifying the service.
- Service
Version int - Integer identifying a service version.
- Dictionaries
[]Get
Dictionaries Dictionary - List of all dictionaries for the version of the service.
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Id string - Alphanumeric string identifying the service.
- Service
Version int - Integer identifying a service version.
- dictionaries
List<Get
Dictionaries Dictionary> - List of all dictionaries for the version of the service.
- id String
- The provider-assigned unique ID for this managed resource.
- service
Id String - Alphanumeric string identifying the service.
- service
Version Integer - Integer identifying a service version.
- dictionaries
Get
Dictionaries Dictionary[] - List of all dictionaries for the version of the service.
- id string
- The provider-assigned unique ID for this managed resource.
- service
Id string - Alphanumeric string identifying the service.
- service
Version number - Integer identifying a service version.
- dictionaries
Sequence[Get
Dictionaries Dictionary] - List of all dictionaries for the version of the service.
- id str
- The provider-assigned unique ID for this managed resource.
- service_
id str - Alphanumeric string identifying the service.
- service_
version int - Integer identifying a service version.
- dictionaries List<Property Map>
- List of all dictionaries for the version of the service.
- id String
- The provider-assigned unique ID for this managed resource.
- service
Id String - Alphanumeric string identifying the service.
- service
Version Number - Integer identifying a service version.
Supporting Types
GetDictionariesDictionary
- id str
- Alphanumeric string identifying the Dictionary.
- name str
- Name for the Dictionary.
- write_
only bool - Indicates if items in the dictionary are readable or not.
Package Details
- Repository
- Fastly pulumi/pulumi-fastly
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
fastlyTerraform Provider.
Viewing docs for Fastly v11.4.1
published on Friday, Feb 27, 2026 by Pulumi
published on Friday, Feb 27, 2026 by Pulumi
