Skip to contents

Create a security group

Usage

aws_vpc_security_group_create(
  name,
  engine = "mariadb",
  description = NULL,
  vpc_id = NULL,
  tags = NULL,
  ...
)

Arguments

name

(character) The name of the new secret. required

engine

(character) The engine to use. default: "mariadb". required. one of: mariadb, mysql, or postgres

description

(character) The description of the secret. optional

vpc_id

(character) a VPC id. optional. if not supplied your default VPC is used. To get your VPCs, see aws_vpcs()

tags

(character) The tags to assign to the security group. optional

...

named parameters passed on to create_security_group

Value

(list) with fields:

  • GroupId (character)

  • Tags (list)

Examples

if (FALSE) { # \dontrun{
# create security group
x <- aws_vpc_security_group_create(
  name = "testing1",
  description = "Testing security group creation"
)
aws_vpc_security_group_create(name = "testing2")
aws_vpc_security_group_create(
  name = "testing4",
  tags = list(
    list(
      ResourceType = "security-group",
      Tags = list(
        list(
          Key = "sky",
          Value = "blue"
        )
      )
    )
  )
)

# add ingress
aws_vpc_security_group_ingress(
  id = x$GroupId,
  ip_permissions = ip_permissions_generator("mariadb")
)
} # }