pulumi / pulumi-aws-apigateway

Apache License 2.0
10 stars 5 forks source link

Please expose 'disableExecuteApiEndpoint' in the aws-apigateway:RestAPI provider #117

Closed jamest-pin closed 4 months ago

jamest-pin commented 7 months ago

Hello!

Issue details

I need to access this property https://www.pulumi.com/registry/packages/aws/api-docs/apigateway/restapi/#disableexecuteapiendpoint_yaml

It would suck to have to build out my whole setup using the manual provider, that is working so nicely with the Crosswalk provider, just to use this one property. 😃

In fact, I wish there could be a way to access any input property of the underlying resource dynamically. For example something like this maybe

resources:
  ##
  # Payments
  # A REST API to route requests to the payments Lambda functions
  api_payments:
    type: aws-apigateway:RestAPI
    options:
      version: 2.0.1
    properties:
      stageName: ${pulumi.stack}
      routes:
        ##
        # Lambda targets
        ##
        - eventHandler: ${lambda_test_cde} #${lambda_payment_auth_callback}
          method: GET
          path: api/auth/callback
       indexIntoAPI: # modify the underlying api resource directly
         description: "Rest API Description"
         disableExecuteApiEndpoint: true

Alternatively, give a way to take the object in yaml, that updates the object after creation. Something like this maybe:

resources:
  # https://www.pulumi.com/registry/packages/aws-apigateway/api-docs/restapi/
  api_payments:
    [...]

  # https://www.pulumi.com/registry/packages/aws/api-docs/apigateway/restapi/
  api_payments_modification:
    type: aws:apigateway:RestApi
    uses: ${api_payments.api}
    properties:
      description: "My RestAPI description"
      disableExecuteApiEndpoint: true

Thanks in advance

Affected area/feature

mjeffryes commented 7 months ago

Yes, I agree, it would be really helpful to have a way to pass through arbitrary arguments to the underlying resources. That will probably require some thoughtful design to get right, but in the meantime, we're definitely open to adding individual parameters to make these components more configurable.

thomas11 commented 4 months ago

Hi @jamest-pin, the new release v2.3.0 has the disableExecuteApiEndpoint parameter.

I would have loved to add a generic way of optionally passing any parameter of the underlying pulumi-aws ApiGateway resource, but the right way of doing that is currently blocked by pulumi/pulumi/issues/8104.

jamest-pin commented 4 months ago

Amazing, thanks @thomas11 ! This is really a big partial block removed for us going to production with our app. We would have had to do a manual workflow after each deployment.

jamest-pin commented 4 months ago

Also related: https://github.com/pulumi/pulumi-aws-apigateway/issues/116