import * as pulumi from "@pulumi/pulumi"; /** * The `fastly.ComputeAclEntries` resource allows you to manage CIDR-based allow/block rules (ACL entries) inside a Fastly Compute ACL. * * By default, Terraform does not continue to manage the entries after the initial `pulumi up`. This allows you to make changes to ACL entries outside of Terraform using the [Fastly API](https://developer.fastly.com/reference/api/) or [Fastly CLI](https://developer.fastly.com/learning/tools/cli/)) without Terraform resetting them. * * To have Terraform continue managing the entries after creation (e.g., deleting any entries not defined in the config), set `manageEntries = true`. * * > **Note:** Use `manageEntries = true` cautiously. Terraform will overwrite external changes and delete any unmanaged entries. * * ## Example Usage * * Basic usage (with seeded values, unmanaged after initial apply): * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fastly from "@pulumi/fastly"; * * // IMPORTANT: Deleting a Compute ACL requires first deleting its resource_link. * // This requires a two-step `pulumi up` as we can't guarantee deletion order. * const exampleComputeAcl = new fastly.ComputeAcl("example", {name: "my_compute_acl"}); * const exampleComputeAclEntries = new fastly.ComputeAclEntries("example", { * computeAclId: exampleComputeAcl.id, * entries: { * "192.0.2.0/24": "ALLOW", * "198.51.100.0/24": "BLOCK", * }, * }); * const example = fastly.getPackageHash({ * filename: "package.tar.gz", * }); * const exampleServiceCompute = new fastly.ServiceCompute("example", { * name: "my_compute_service", * domains: [{ * name: "demo.example.com", * }], * "package": { * filename: "package.tar.gz", * sourceCodeHash: example.then(example => example.hash), * }, * resourceLinks: [{ * name: "my_acl_link", * resourceId: exampleComputeAcl.id, * }], * forceDestroy: true, * }); * ``` * * Terraform-managed usage (where Terraform controls entries long-term): * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fastly from "@pulumi/fastly"; * * // IMPORTANT: Deleting a Compute ACL requires first deleting its resource_link. * // This requires a two-step `pulumi up` as we can't guarantee deletion order. * const exampleComputeAcl = new fastly.ComputeAcl("example", {name: "my_compute_acl"}); * const exampleComputeAclEntries = new fastly.ComputeAclEntries("example", { * computeAclId: exampleComputeAcl.id, * entries: { * "203.0.113.0/24": "BLOCK", * "198.51.100.0/24": "ALLOW", * }, * manageEntries: true, * }); * const example = fastly.getPackageHash({ * filename: "package.tar.gz", * }); * const exampleServiceCompute = new fastly.ServiceCompute("example", { * name: "my_compute_service", * domains: [{ * name: "demo.example.com", * }], * "package": { * filename: "package.tar.gz", * sourceCodeHash: example.then(example => example.hash), * }, * resourceLinks: [{ * name: "my_acl_link", * resourceId: exampleComputeAcl.id, * }], * forceDestroy: true, * }); * ``` * * ## Import * * Fastly Compute ACL entries can be imported using the format `/entries`, e.g. * * ```sh * $ pulumi import fastly:index/computeAclEntries:ComputeAclEntries example /entries * ``` */ export declare class ComputeAclEntries extends pulumi.CustomResource { /** * Get an existing ComputeAclEntries resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ComputeAclEntriesState, opts?: pulumi.CustomResourceOptions): ComputeAclEntries; /** * Returns true if the given object is an instance of ComputeAclEntries. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ComputeAclEntries; /** * Manages entries for a Fastly Compute Access Control List (ACL). To import, use the format \n\n/entries. */ readonly computeAclId: pulumi.Output; /** * A map representing the entries in the Compute ACL, where the keys are the prefixes and the values are the actions (ALLOW or BLOCK). */ readonly entries: pulumi.Output<{ [key: string]: string; }>; /** * Manage the ACL entries in Terraform (default: false). If true, Terraform will ensure that the ACL's entries match the entries in the Terraform configuration. */ readonly manageEntries: pulumi.Output; /** * Create a ComputeAclEntries resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ComputeAclEntriesArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ComputeAclEntries resources. */ export interface ComputeAclEntriesState { /** * Manages entries for a Fastly Compute Access Control List (ACL). To import, use the format \n\n/entries. */ computeAclId?: pulumi.Input; /** * A map representing the entries in the Compute ACL, where the keys are the prefixes and the values are the actions (ALLOW or BLOCK). */ entries?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Manage the ACL entries in Terraform (default: false). If true, Terraform will ensure that the ACL's entries match the entries in the Terraform configuration. */ manageEntries?: pulumi.Input; } /** * The set of arguments for constructing a ComputeAclEntries resource. */ export interface ComputeAclEntriesArgs { /** * Manages entries for a Fastly Compute Access Control List (ACL). To import, use the format \n\n/entries. */ computeAclId: pulumi.Input; /** * A map representing the entries in the Compute ACL, where the keys are the prefixes and the values are the actions (ALLOW or BLOCK). */ entries: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Manage the ACL entries in Terraform (default: false). If true, Terraform will ensure that the ACL's entries match the entries in the Terraform configuration. */ manageEntries?: pulumi.Input; } //# sourceMappingURL=computeAclEntries.d.ts.map