Stackset Error (Resource handler returned message: "OrganizationalUnitIds are required)

0

I get the error below while trying to deploy my stackset please help

Resource handler returned message: "OrganizationalUnitIds are required (Service: CloudFormation, Status Code: 400, Request ID: 2565b714-bc42-4096-a950-6d410de49298)" (RequestToken: bd1f1e77-2f35-356a-b5c9-9e9dfc2f7602, HandlerErrorCode: InvalidRequest)

Here is the smaple code am using

  TestingStackSet20240413:
    Type: AWS::CloudFormation::StackSet
    DependsOn: [TestingOUAccount20240413]
    Properties:
      StackSetName: TestingOUAccount20240413
      TemplateURL: StackSetTemplate.yaml
      Parameters:
      - {ParameterKey: BucketName, ParameterValue: TestingBucketName}
      # Tags: #[Array of Tag]
      Capabilities: #[Array of String]
      - CAPABILITY_NAMED_IAM
      PermissionModel: SERVICE_MANAGED #Allowed Values[SERVICE_MANAGED | SELF_MANAGED]
      StackInstancesGroup: #[Array of StackInstances]
      - Regions: #[Array of String]
        - us-east-1
        DeploymentTargets:
          Accounts: #[Array of String]
          - !GetAtt TestingOUAccount20240413.AccountId #!RefTestingOUAccount20240411
        ParameterOverrides: #[Array of Parameter]
        - {ParameterKey: BucketName, ParameterValue: TestingBucketName,}
Nafiu
질문됨 한 달 전169회 조회
1개 답변
2
수락된 답변

Hello.

Try adding "OrganizationalUnitIds" to "DeploymentTargets" as shown below.
I think the error will disappear if you add the ID of the organizational unit where the stack set will be deployed.
https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-properties-cloudformation-stackset-deploymenttargets.html#cfn-cloudformation-stackset-deploymenttargets-organizationalunitids

  TestingStackSet20240413:
    Type: AWS::CloudFormation::StackSet
    DependsOn: [TestingOUAccount20240413]
    Properties:
      StackSetName: TestingOUAccount20240413
      TemplateURL: StackSetTemplate.yaml
      Parameters:
      - {ParameterKey: BucketName, ParameterValue: TestingBucketName}
      # Tags: #[Array of Tag]
      Capabilities: #[Array of String]
      - CAPABILITY_NAMED_IAM
      PermissionModel: SERVICE_MANAGED #Allowed Values[SERVICE_MANAGED | SELF_MANAGED]
      StackInstancesGroup: #[Array of StackInstances]
      - Regions: #[Array of String]
        - us-east-1
        DeploymentTargets:
          Accounts: #[Array of String]
            - !GetAtt TestingOUAccount20240413.AccountId #!RefTestingOUAccount20240411
          OrganizationalUnitIds:
            - "OU-ID" # add
        ParameterOverrides: #[Array of Parameter]
        - {ParameterKey: BucketName, ParameterValue: TestingBucketName,}
profile picture
전문가
답변함 한 달 전
profile picture
전문가
검토됨 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠