Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kerens mac #61

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions Terraform/deploy-fsx-ontap/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ resource "aws_vpc_security_group_ingress_rule" "nfs_mount_udp" {
}

resource "aws_vpc_security_group_egress_rule" "allow_all_traffic" {
count = var.create_sg ? 1 : 0
count = var.create_sg ? 1 : 0
security_group_id = aws_security_group.fsx_sg[count.index].id
cidr_ipv4 = "0.0.0.0/0"
ip_protocol = "-1"
Expand Down Expand Up @@ -137,9 +137,6 @@ resource "aws_fsx_ontap_file_system" "terraform-fsxn" {
security_group_ids = var.create_sg ? [element(aws_security_group.fsx_sg.*.id, 0)] : []
deployment_type = var.fsx_deploy_type
throughput_capacity = var.fsx_tput_in_MBps
tags = {
Name = var.fsx_name
}
weekly_maintenance_start_time = var.fsx_maintenance_start_time
kms_key_id = var.kms_key_id
automatic_backup_retention_days = var.backup_retention_days
Expand All @@ -151,19 +148,18 @@ resource "aws_fsx_ontap_file_system" "terraform-fsxn" {
}
fsx_admin_password = var.fsx_admin_password
route_table_ids = var.route_table_ids
tags = var.tags
# endpoint_ip_address_range = ""
}

resource "aws_fsx_ontap_storage_virtual_machine" "mysvm" {
// REQUIRED PARAMETERS
file_system_id = aws_fsx_ontap_file_system.terraform-fsxn.id
name = var.svm_name
file_system_id = aws_fsx_ontap_file_system.terraform-fsxn.id
name = var.svm_name

// OPTIONAL PARAMETERS
root_volume_security_style = var.root_vol_sec_style
tags = {
Name = var.svm_name
}
tags = var.tags
# active_directory_configuration {}
}

Expand Down
164 changes: 82 additions & 82 deletions Terraform/deploy-fsx-ontap/variables.tf
Original file line number Diff line number Diff line change
@@ -1,144 +1,144 @@
variable "create_sg" {
description = "Determines whether the SG should be deployed as part of this execution or not"
type = bool
default = false
description = "Determines whether the SG should be deployed as part of this execution or not"
type = bool
default = false
}

variable "cidr_for_sg" {
description = "cide block to be used for the ingress rules"
type = string
default = "0.0.0.0/0"
description = "cide block to be used for the ingress rules"
type = string
default = "0.0.0.0/0"
}

variable "fsx_name" {
description = "The deployed filesystem name"
type = string
default = "terraform-fsxn"
description = "The deployed filesystem name"
type = string
default = "terraform-fsxn"
}

variable "vpc_id" {
description = "The ID of the VPC in which the FSxN fikesystem should be deployed"
type = string
default = "vpc-111111111"
description = "The ID of the VPC in which the FSxN fikesystem should be deployed"
type = string
default = "vpc-111111111"
}

variable "fsx_subnets" {
description = "The IDs of the subnets fro which the FSxN filesystem will be assigned IP addresses"
type = map
default = {
"primarysub" = ""
"secondarysub" = ""
}
description = "The IDs of the subnets fro which the FSxN filesystem will be assigned IP addresses"
type = map
default = {
"primarysub" = ""
"secondarysub" = ""
}
}

variable "fsx_capacity_size_gb" {
description = "The storage capacity (GiB) of the FSxN file system. Valid values between 1024 and 196608"
type = number
default = 1024
description = "The storage capacity (GiB) of the FSxN file system. Valid values between 1024 and 196608"
type = number
default = 1024
}

variable "fsx_deploy_type" {
description = "The filesystem deployment type. Supports MULTI_AZ_1 and SINGLE_AZ_1"
type = string
default = "SINGLE_AZ_1"
description = "The filesystem deployment type. Supports MULTI_AZ_1 and SINGLE_AZ_1"
type = string
default = "SINGLE_AZ_1"
}

variable "fsx_tput_in_MBps" {
description = "The throughput capacity (in MBps) for the file system. Valid values are 128, 256, 512, 1024, 2048, and 4096."
type = number
default = 256
description = "The throughput capacity (in MBps) for the file system. Valid values are 128, 256, 512, 1024, 2048, and 4096."
type = number
default = 256
}

variable "fsx_maintenance_start_time" {
description = "The preferred start time (in d:HH:MM format) to perform weekly maintenance, in the UTC time zone."
type = string
default = "00:00:00"
description = "The preferred start time (in d:HH:MM format) to perform weekly maintenance, in the UTC time zone."
type = string
default = "00:00:00"
}

variable "kms_key_id" {
description = "ARN for the KMS Key to encrypt the file system at rest, Defaults to an AWS managed KMS Key."
type = string
description = "ARN for the KMS Key to encrypt the file system at rest, Defaults to an AWS managed KMS Key."
type = string
}

variable "backup_retention_days" {
description = "The number of days to retain automatic backups. Setting this to 0 disables automatic backups. You can retain automatic backups for a maximum of 90 days."
type = number
default = 0
description = "The number of days to retain automatic backups. Setting this to 0 disables automatic backups. You can retain automatic backups for a maximum of 90 days."
type = number
default = 0
}

variable "daily_backup_start_time" {
description = "A recurring daily time, in the format HH:MM. HH is the zero-padded hour of the day (0-23), and MM is the zero-padded minute of the hour. Requires automatic_backup_retention_days to be set."
type = string
default = "00:00"
description = "A recurring daily time, in the format HH:MM. HH is the zero-padded hour of the day (0-23), and MM is the zero-padded minute of the hour. Requires automatic_backup_retention_days to be set."
type = string
default = "00:00"
}

variable "disk_iops_configuration" {
description = "The SSD IOPS configuration for the Amazon FSx for NetApp ONTAP file system"
type = map
default = {
"iops" = 3000
"mode" = "AUTOMATIC"
}
description = "The SSD IOPS configuration for the Amazon FSx for NetApp ONTAP file system"
type = map
default = {
"iops" = 3000
"mode" = "AUTOMATIC"
}
}

variable "fsx_admin_password" {
description = "The ONTAP administrative password for the fsxadmin user that you can use to administer your file system using the ONTAP CLI and REST API"
type = string
description = "The ONTAP administrative password for the fsxadmin user that you can use to administer your file system using the ONTAP CLI and REST API"
type = string
}

variable "storage_type" {
description = "The filesystem storage type"
type = string
default = "SSD"
description = "The filesystem storage type"
type = string
default = "SSD"
}

variable "route_table_ids" {
description = "Specifies the VPC route tables in which your file system's endpoints will be created. You should specify all VPC route tables associated with the subnets in which your clients are located."
type = list
description = "Specifies the VPC route tables in which your file system's endpoints will be created. You should specify all VPC route tables associated with the subnets in which your clients are located."
type = list
}

variable "svm_name" {
description = "The name of the Storage Virtual Machine"
type = string
default = "first_svm"
description = "The name of the Storage Virtual Machine"
type = string
default = "first_svm"
}

variable "root_vol_sec_style" {
description = "Specifies the root volume security style, Valid values are UNIX, NTFS, and MIXED. All volumes created under this SVM will inherit the root security style unless the security style is specified on the volume."
type = string
default = "UNIX"
description = "Specifies the root volume security style, Valid values are UNIX, NTFS, and MIXED. All volumes created under this SVM will inherit the root security style unless the security style is specified on the volume."
type = string
default = "UNIX"
}

variable "vol_info" {
description = "Details for the volume creation"
type = map
default = {
"vol_name" = "vol1"
"junction_path" = "/vol1"
"size_mg" = 1024
"efficiency" = true
"tier_policy_name" = "AUTO"
"cooling_period" = 31
"vol_type" = "RW"
"bypass_sl_retention" = false
"copy_tags_to_backups" = false
"sec_style" = "UNIX"
"skip_final_backup" = false
}
description = "Details for the volume creation"
type = map
default = {
"vol_name" = "vol1"
"junction_path" = "/vol1"
"size_mg" = 1024
"efficiency" = true
"tier_policy_name" = "AUTO"
"cooling_period" = 31
"vol_type" = "RW"
"bypass_sl_retention" = false
"copy_tags_to_backups" = false
"sec_style" = "UNIX"
"skip_final_backup" = false
}
}

variable "vol_snapshot_policy" {
description = "Specifies the snapshot policy for the volume"
type = map
default = {
"Name" = "terraform-fsxn"
}
description = "Specifies the snapshot policy for the volume"
type = map
default = {
"Name" = "terraform-fsxn"
}
}

variable "tags" {
description = "Tags to be applied to the resources"
type = map
default = {
"Name" = "terraform-fsxn"
}
description = "Tags to be applied to the resources"
type = map
default = {
"Name" = "terraform-fsxn"
}
}
Loading