실천 CloudFormation FSx편

계속! !

먼저 만들겠습니다.

그 1





FSx.yaml 파일을 사용합니다.

그 2





PJPrefix만 handson이라는 이름으로 변경하고 다음

그대로 스택 작성에 ...

그리고 미리 만들었던 것이 여기



여기도 상당히 시간이 걸립니다! !

소스 코드는 이쪽

이번은 문서를 보면서 해설할 수 있으면 좋겠습니다.
문서
AWSTemplateFormatVersion: "2010-09-09"

Parameters:
  PJPrefix:
    Description: Enter a prefix of this system.
    Type: String
    Default: "test"
    AllowedPattern: "[a-zA-Z][a-zA-Z0-9][ -~]*"
    ConstraintDescription: must begin with a letter and contain only alphanumeric characters.
  StorageCapacity:
    Description: "Storage Capacity"
    Type: "Number"
    Default: 32
    MinValue: 32
    MaxValue: 65536
    ConstraintDescription: must be at least 32Gib to 65536Gib.
  WeeklyMaintenanceStartTime:
    Description: "Weekly Maintenance Time"
    Type: String
    Default: "2:20:30"
    AllowedPattern: "^[1-7]:([0-1][0-9]|2[0-3]):[0-5][0-9]$"
    ConstraintDescription: "d:HH:MM d = 1~7 HH = 00~23 MM = 00~59"
  DailyAutomaticBackupStartTime:
    Description: "Daily backup start time"
    Type: String
    Default: "16:30"
    AllowedPattern: "^([0-1][0-9]|2[0-3]):[0-5][0-9]$"
    ConstraintDescription: "HH:MM HH = 00~23 MM = 00~59"
  AutomaticBackupRetentionDays:
    Description: "Backup Retention Period"
    Type: Number
    Default: 7
    MinValue: 0
    MaxValue: 35
    ConstraintDescription: The number of days to keep the automatic backup. The default is to keep the backup for seven days. Setting this value to 0 disables the creation of automatic backups. The maximum retention period for a backup is 35 days.

Resources:
  WindowsSelfManagedADFileSystemWithAllConfigs:
    Type: "AWS::FSx::FileSystem"
    Properties:
      FileSystemType: "WINDOWS"
      StorageCapacity: !Ref StorageCapacity
      StorageType: "SSD"
      SubnetIds:
        - { "Fn::ImportValue": !Sub "${PJPrefix}-private-subnet-a" } # VPCを合わせるPrivate
        - { "Fn::ImportValue": !Sub "${PJPrefix}-private-subnet-c" }
      SecurityGroupIds:
        - { "Fn::ImportValue": !Sub "${PJPrefix}-fsx-sg" }
      Tags:
        - Key: Name
          Value: !Sub ${PJPrefix}-file-server
      WindowsConfiguration:
        ActiveDirectoryId: { "Fn::ImportValue": !Sub "${PJPrefix}-windows-ad" }
        ThroughputCapacity: 16
        WeeklyMaintenanceStartTime: !Ref WeeklyMaintenanceStartTime
        DailyAutomaticBackupStartTime: !Ref DailyAutomaticBackupStartTime
        AutomaticBackupRetentionDays: !Ref AutomaticBackupRetentionDays
        DeploymentType: "MULTI_AZ_1"
        PreferredSubnetId: { "Fn::ImportValue": !Sub "${PJPrefix}-private-subnet-a" } # ADのサブネットをVPC合わせる
        CopyTagsToBackups: false

Outputs:
  WindowsSelfManagedADFileSystemWithAllConfigs:
    Description: WindowsSelfManagedADFileSystem
    Value: !Ref WindowsSelfManagedADFileSystemWithAllConfigs
    Export:
      Name: !Sub "${PJPrefix}-fsx"


WorkSpaces편

좋은 웹페이지 즐겨찾기