import * as core from "@terrascript/core";

export interface FirewallConfigArgs extends core.ResourceArgs {
  /**
   * (Required) Determines how Route 53 Resolver handles queries during failures, for example when all tr
   * affic that is sent to DNS Firewall fails to receive a reply. By default, fail open is disabled, whic
   * h means the failure mode is closed. This approach favors security over availability. DNS Firewall bl
   * ocks queries that it is unable to evaluate properly. If you enable this option, the failure mode is
   * open. This approach favors availability over security. DNS Firewall allows queries to proceed if it
   * is unable to properly evaluate them. Valid values: `ENABLED`, `DISABLED`.
   */
  firewallFailOpen?: string | core.StringOut;

  /**
   * (Required) The ID of the VPC that the configuration is for.
   */
  resourceId: string | core.StringOut;
}

export class FirewallConfig extends core.Resource<FirewallConfigArgs> {
  /**
   * (Required) Determines how Route 53 Resolver handles queries during failures, for example when all tr
   * affic that is sent to DNS Firewall fails to receive a reply. By default, fail open is disabled, whic
   * h means the failure mode is closed. This approach favors security over availability. DNS Firewall bl
   * ocks queries that it is unable to evaluate properly. If you enable this option, the failure mode is
   * open. This approach favors availability over security. DNS Firewall allows queries to proceed if it
   * is unable to properly evaluate them. Valid values: `ENABLED`, `DISABLED`.
   */
  @core.attr(String, { computed: true })
  public firewallFailOpen?: string | core.StringOut;

  /**
   * The ID of the firewall configuration.
   */
  @core.attr(String, { computed: true })
  public id!: string | core.StringOut;

  /**
   * The AWS account ID of the owner of the VPC that this firewall configuration applies to.
   */
  @core.attr(String, { computed: true })
  public ownerId!: string | core.StringOut;

  /**
   * (Required) The ID of the VPC that the configuration is for.
   */
  @core.attr(String)
  public resourceId!: string | core.StringOut;

  constructor(name: string, args?: FirewallConfigArgs) {
    super(name, "aws_route53_resolver_firewall_config", args);
  }

  public override getNamespace(): string {
    return "aws_route53_resolver";
  }
}
