pulumi / pulumi-aws

An Amazon Web Services (AWS) Pulumi resource package, providing multi-language access to AWS
Apache License 2.0
466 stars 157 forks source link

apigateway.Stage required deployment but in documentation it don't have it #4408

Open christrt9 opened 3 months ago

christrt9 commented 3 months ago

From Website it said and the example for stage deployment is optional

Also from Deployment Page it recommended to use Stage only.

WARNING: It is recommended to use the aws.apigateway.Stage resource instead of managing an API Gateway Stage via the stage_name argument of this resource

Code:

from pulumi_aws import apigateway,lambda_
..

self.stage = apigateway.Stage(
    "apiStage",
    rest_api=self.api.id,
    #deployment=self.deployment.id,
    #stage_name="prod"
)

Error :

venv/lib/python3.10/site-packages/pulumi_aws/apigateway/stage.py", line 686, in _internal_init
        raise TypeError("Missing required property 'deployment'")
    TypeError: Missing required property 'deployment'

requirements.txt

pulumi>=3.0.0,<4.0.0
pulumi-aws>=6.0.0

Reference:

corymhall commented 3 months ago

@christrt9 thanks for letting us know. Looks like this is due to the upstream docs being incorrect https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/apigatewayv2_stage