Resource: aws_fsx_ontap_storage_virtual_machine

Manages a FSx Storage Virtual Machine. See the FSx ONTAP User Guide for more information.

Example Usage

Basic Usage

resource "aws_fsx_ontap_storage_virtual_machine" "test" {
  file_system_id = aws_fsx_ontap_file_system.test.id
  name           = "test"
}

Using a Self-Managed Microsoft Active Directory

Additional information for using AWS Directory Service with ONTAP File Systems can be found in the FSx ONTAP Guide.

resource "aws_fsx_ontap_storage_virtual_machine" "test" {
  file_system_id = aws_fsx_ontap_file_system.test.id
  name           = "mysvm"

  active_directory_configuration {
    netbios_name = "mysvm"
    self_managed_active_directory_configuration {
      dns_ips     = ["10.0.0.111", "10.0.0.222"]
      domain_name = "corp.example.com"
      password    = "avoid-plaintext-passwords"
      username    = "Admin"
    }
  }
}

Argument Reference

This resource supports the following arguments:

active_directory_configuration

The active_directory_configuration configuration block supports the following arguments:

self_managed_active_directory

The self_managed_active_directory configuration block supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Endpoints

Endpoint

Timeouts

Configuration options:

Import

In Terraform v1.5.0 and later, use an import block to import FSx Storage Virtual Machine using the id. For example:

import {
  to = aws_fsx_ontap_storage_virtual_machine.example
  id = "svm-12345678abcdef123"
}

Using terraform import, import FSx Storage Virtual Machine using the id. For example:

% terraform import aws_fsx_ontap_storage_virtual_machine.example svm-12345678abcdef123

Certain resource arguments, like svm_admin_password and the self_managed_active_directory configuation block password, do not have a FSx API method for reading the information after creation. If these arguments are set in the Terraform configuration on an imported resource, Terraform will always show a difference. To workaround this behavior, either omit the argument from the Terraform configuration or use ignore_changes to hide the difference. For example:

resource "aws_fsx_ontap_storage_virtual_machine" "example" {
  # ... other configuration ...

  svm_admin_password = "avoid-plaintext-passwords"

  # There is no FSx API for reading svm_admin_password
  lifecycle {
    ignore_changes = [svm_admin_password]
  }
}