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
gefragt vor 2 Monaten114 Aufrufe
1 Antwort
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
EXPERTE
beantwortet vor 2 Monaten
  • I've updated the question with the cloudformation JSON

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen