https://pulumi.com logo
#general
Title
# general
s

straight-fireman-55591

03/16/2023, 12:18 PM
Hi, I'm trying to create gcp api gw with below yaml.
Copy code
name: Vega
runtime: yaml
resources:
  pulumi-api-gw-api:
    type: gcp:apigateway:Api
    properties:
      apiId: api-gw-dev-id
  pulumi-api-gw-service-account:
    type: gcp:serviceAccount:Account
    properties:
      accountId: pulumi-api-gw-service-account
      displayName: pulumi-api-gw-service-account
  pulumi-api-gw-config:
    type: gcp:apigateway:ApiConfig
    properties:
      api: ${pulumi-api-gw-api.id}
      apiConfigId: pulumi-api-gw-config1
      openapiDocuments:
        document:
          path: spec.yaml
• type: gcpapigatewayApi - is being created • type: gcpserviceAccountAccount - is being created • type: gcpapigatewayApiConfig - is not being created with below error:
Copy code
Diagnostics:
  pulumi:pulumi:Stack (Vega-dev):
    Error: gcp:apigateway/apiConfig:ApiConfig is not assignable from {api: string, apiConfigId: string, openapiDocuments: {document: {path: string}}}
      on Pulumi.yaml line 24:
      24:         document:
      25:           path: spec.yaml
    Cannot assign '{api: string, apiConfigId: string, openapiDocuments: {document: {path: string}}}' to 'gcp:apigateway/apiConfig:ApiConfig':
      openapiDocuments: Cannot assign '{document: {path: string}}' to 'List<gcp:apigateway/ApiConfigOpenapiDocument:ApiConfigOpenapiDocument>'
I'm confused of how to inject the api gw swagger here.
or am I doing this completely wrong ?