Resource: aws_m2_environment

Terraform resource for managing an AWS Mainframe Modernization Environment.

Example Usage

Basic Usage

resource "aws_m2_environment" "test" {
  name            = "test-env"
  engine_type     = "bluage"
  instance_type   = "M2.m5.large"
  security_groups = ["sg-01234567890abcdef"]
  subnet_ids      = ["subnet-01234567890abcdef", "subnet-01234567890abcdea"]
}

High Availability

resource "aws_m2_environment" "test" {
  name            = "test-env"
  engine_type     = "bluage"
  instance_type   = "M2.m5.large"
  security_groups = ["sg-01234567890abcdef"]
  subnet_ids      = ["subnet-01234567890abcdef", "subnet-01234567890abcdea"]

  high_availability_config {
    desired_capacity = 2
  }
}

EFS Filesystem

resource "aws_m2_environment" "test" {
  name            = "test-env"
  engine_type     = "bluage"
  instance_type   = "M2.m5.large"
  security_groups = ["sg-01234567890abcdef"]
  subnet_ids      = ["subnet-01234567890abcdef", "subnet-01234567890abcdea"]
  storage_configuration {
    efs {
      file_system_id = "fs-01234567890abcdef"
      mount_point    = "/m2/mount/example"
    }
  }
}

FSX Filesystem

resource "aws_m2_environment" "test" {
  name            = "test-env"
  engine_type     = "bluage"
  instance_type   = "M2.m5.large"
  security_groups = ["sg-01234567890abcdef"]
  subnet_ids      = ["subnet-01234567890abcdef", "subnet-01234567890abcdea"]

  storage_configuration {
    fsx {
      file_system_id = "fs-01234567890abcdef"
      mount_point    = "/m2/mount/example"
    }
  }

}

Argument Reference

The following arguments are required:

The following arguments are optional:

storage_configuration

efs

This argument is processed in attribute-as-blocks mode.

The following arguments are required:

fsx

This argument is processed in attribute-as-blocks mode.

The following arguments are required:

high_availability_config

This argument is processed in attribute-as-blocks mode.

The following arguments are required:

Attribute Reference

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

Timeouts

Configuration options:

Import

In Terraform v1.5.0 and later, use an import block to import Mainframe Modernization Environment using the 01234567890abcdef012345678. For example:

import {
  to = aws_m2_environment.example
  id = "01234567890abcdef012345678"
}

Using terraform import, import Mainframe Modernization Environment using the 01234567890abcdef012345678. For example:

% terraform import aws_m2_environment.example 01234567890abcdef012345678