Why does ApiGatewayV2 DomainName in Cloudformation Syntax specify list of Tags, but rejects list in favor of single object?

0

The JSON config below generates the error message: Properties validation failed for resource apiDomainName with message: #/Tags: expected type: JSONObject, found: JSONArray

"apiDomainName": {
    "Type": "AWS::ApiGatewayV2::DomainName",
    "Properties": {
      "DomainName": { "Fn::Join": [ "", [ "api.", { "Fn::FindInMap": [ "variable", { "Ref": "env" }, "domain" ] } ] ] },
      "DomainNameConfigurations": [
        {
          "EndpointType": "REGIONAL",
          "SecurityPolicy": "TLS_1_2",
          "CertificateArn": { "Fn::FindInMap": [ "resource", { "Ref": "env" }, "apiCert" ] }
        }
      ],
      "Tags" : [
        { "Key": "managedBy", "Value": "cloudformation" }
      ]
    }
  }
dasch
asked 2 months ago96 views
1 Answer
0

Hello.

I haven't seen the CloudFormation template you're using, so I don't know the details, but you can use it as follows.
https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-domainname.html

      Tags:
        - Key: SystemName
          Value: !Ref SystemName
        - Key: Env
          Value: !Ref Env
profile picture
EXPERT
answered 2 months ago
  • I've updated the question with the cloudformation JSON

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions