import * as core from "@terrascript/core"; export interface EgressArgs extends core.SchemaArgs { cidrBlocks?: core.Array | core.ArrayOut; description?: string | core.StringOut; fromPort: number | core.NumberOut; ipv6CidrBlocks?: core.Array | core.ArrayOut; prefixListIds?: core.Array | core.ArrayOut; protocol: string | core.StringOut; securityGroups?: core.Array | core.ArrayOut; self?: boolean | core.BooleanOut; toPort: number | core.NumberOut; } export class Egress extends core.Schema { @core.attr(String, { kind: "array" }) public cidrBlocks?: core.Array | core.ArrayOut; @core.attr(String) public description?: string | core.StringOut; @core.attr(Number) public fromPort!: number | core.NumberOut; @core.attr(String, { kind: "array" }) public ipv6CidrBlocks?: core.Array | core.ArrayOut; @core.attr(String, { kind: "array" }) public prefixListIds?: core.Array | core.ArrayOut; @core.attr(String) public protocol!: string | core.StringOut; @core.attr(String, { kind: "array" }) public securityGroups?: core.Array | core.ArrayOut; @core.attr(Boolean) public self?: boolean | core.BooleanOut; @core.attr(Number) public toPort!: number | core.NumberOut; } export interface IngressArgs extends core.SchemaArgs { cidrBlocks?: core.Array | core.ArrayOut; description?: string | core.StringOut; fromPort: number | core.NumberOut; ipv6CidrBlocks?: core.Array | core.ArrayOut; prefixListIds?: core.Array | core.ArrayOut; protocol: string | core.StringOut; securityGroups?: core.Array | core.ArrayOut; self?: boolean | core.BooleanOut; toPort: number | core.NumberOut; } export class Ingress extends core.Schema { @core.attr(String, { kind: "array" }) public cidrBlocks?: core.Array | core.ArrayOut; @core.attr(String) public description?: string | core.StringOut; @core.attr(Number) public fromPort!: number | core.NumberOut; @core.attr(String, { kind: "array" }) public ipv6CidrBlocks?: core.Array | core.ArrayOut; @core.attr(String, { kind: "array" }) public prefixListIds?: core.Array | core.ArrayOut; @core.attr(String) public protocol!: string | core.StringOut; @core.attr(String, { kind: "array" }) public securityGroups?: core.Array | core.ArrayOut; @core.attr(Boolean) public self?: boolean | core.BooleanOut; @core.attr(Number) public toPort!: number | core.NumberOut; } export interface SecurityGroupArgs extends core.ResourceArgs { /** * (Optional, Forces new resource) Security group description. Defaults to `Managed by Terraform`. Cann * ot be `""`. __NOTE__: This field maps to the AWS `GroupDescription` attribute, for which there is no * Update API. If you'd like to classify your security groups in a way that can be updated, use `tags` * . */ description?: string | core.StringOut; /** * (Optional, VPC only) Configuration block for egress rules. Can be specified multiple times for each * egress rule. Each egress block supports fields documented below. This argument is processed in [attr * ibute-as-blocks mode](https://www.terraform.io/docs/configuration/attr-as-blocks.html). */ egress?: core.Array | core.ArrayOut; /** * (Optional) Configuration block for ingress rules. Can be specified multiple times for each ingress r * ule. Each ingress block supports fields documented below. This argument is processed in [attribute-a * s-blocks mode](https://www.terraform.io/docs/configuration/attr-as-blocks.html). */ ingress?: core.Array | core.ArrayOut; /** * (Optional, Forces new resource) Name of the security group. If omitted, Terraform will assign a rand * om, unique name. */ name?: string | core.StringOut; /** * (Optional, Forces new resource) Creates a unique name beginning with the specified prefix. Conflicts * with `name`. */ namePrefix?: string | core.StringOut; /** * (Optional) Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules * before deleting the rule itself. This is normally not needed, however certain AWS services such as * Elastic Map Reduce may automatically add required rules to security groups used with the service, an * d those rules may contain a cyclic dependency that prevent the security groups from being destroyed * without removing the dependency first. Default `false`. */ revokeRulesOnDelete?: boolean | core.BooleanOut; /** * (Optional) Map of tags to assign to the resource. If configured with a provider [`default_tags` conf * iguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-conf * iguration-block) present, tags with matching keys will overwrite those defined at the provider-level * . */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ tagsAll?: core.Map | core.MapOut; /** * (Optional, Forces new resource) VPC ID. */ vpcId?: string | core.StringOut; } export class SecurityGroup extends core.Resource { /** * ARN of the security group. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Optional, Forces new resource) Security group description. Defaults to `Managed by Terraform`. Cann * ot be `""`. __NOTE__: This field maps to the AWS `GroupDescription` attribute, for which there is no * Update API. If you'd like to classify your security groups in a way that can be updated, use `tags` * . */ @core.attr(String) public description?: string | core.StringOut; /** * (Optional, VPC only) Configuration block for egress rules. Can be specified multiple times for each * egress rule. Each egress block supports fields documented below. This argument is processed in [attr * ibute-as-blocks mode](https://www.terraform.io/docs/configuration/attr-as-blocks.html). */ @core.attr(Egress, { computed: true, kind: "array" }) public egress?: core.Array | core.ArrayOut; /** * ID of the security group. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) Configuration block for ingress rules. Can be specified multiple times for each ingress r * ule. Each ingress block supports fields documented below. This argument is processed in [attribute-a * s-blocks mode](https://www.terraform.io/docs/configuration/attr-as-blocks.html). */ @core.attr(Ingress, { computed: true, kind: "array" }) public ingress?: core.Array | core.ArrayOut; /** * (Optional, Forces new resource) Name of the security group. If omitted, Terraform will assign a rand * om, unique name. */ @core.attr(String, { computed: true }) public name?: string | core.StringOut; /** * (Optional, Forces new resource) Creates a unique name beginning with the specified prefix. Conflicts * with `name`. */ @core.attr(String, { computed: true }) public namePrefix?: string | core.StringOut; /** * Owner ID. */ @core.attr(String, { computed: true }) public ownerId!: string | core.StringOut; /** * (Optional) Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules * before deleting the rule itself. This is normally not needed, however certain AWS services such as * Elastic Map Reduce may automatically add required rules to security groups used with the service, an * d those rules may contain a cyclic dependency that prevent the security groups from being destroyed * without removing the dependency first. Default `false`. */ @core.attr(Boolean) public revokeRulesOnDelete?: boolean | core.BooleanOut; /** * (Optional) Map of tags to assign to the resource. If configured with a provider [`default_tags` conf * iguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-conf * iguration-block) present, tags with matching keys will overwrite those defined at the provider-level * . */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; /** * (Optional, Forces new resource) VPC ID. */ @core.attr(String, { computed: true }) public vpcId?: string | core.StringOut; constructor(name: string, args?: SecurityGroupArgs) { super(name, "aws_security_group", args); } public override getNamespace(): string { return "aws_vpc"; } }