-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
47 lines (43 loc) · 1.4 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
provider "aws" {
region = var.region
}
# Creating a VPC for Neptune to reside
#resource "aws_vpc" "default" {
# cidr_block = var.vpc
#}
# Establishing a Neptune DB cluster
resource "aws_neptune_cluster" "default" {
cluster_identifier = var.cluster_identifier
engine = "neptune"
engine_version = "1.3.0.0"
backup_retention_period = 1
preferred_backup_window = "07:00-09:00"
skip_final_snapshot = true
apply_immediately = true
#vpc_security_group_ids = ["sg_netptune"]
neptune_subnet_group_name = "sg-privado"
neptune_cluster_parameter_group_name = "default.neptune1.3"
iam_roles = ["arn:aws:iam::874438869694:role/AWSGlueServiceRoleDefault"]
tags = {Solution : var.tag}
tags_all = {Solution : var.tag}
serverless_v2_scaling_configuration {
min_capacity = 1
max_capacity = 2.5
}
}
# Generating a Neptune DB instance associated with the cluster
resource "aws_neptune_cluster_instance" "default" {
identifier = var.cluster_instance
cluster_identifier = aws_neptune_cluster.default.id
instance_class = "db.serverless"
neptune_parameter_group_name = "default.neptune1.3"
engine = "neptune"
apply_immediately = true
availability_zone = "us-east-1c"
publicly_accessible = false
auto_minor_version_upgrade = true
tags = {Solution : var.tag}
tags_all = {Solution : var.tag}
}