I am trying to setup a private API Gateway, I am g...
# general
h
I am trying to setup a private API Gateway, I am getting this error when building a DomainName
Copy code
BadRequestException: /endpointConfiguration/types/0 Invalid request input
the code
Copy code
domain_name_resource = aws.apigateway.DomainName(f"api-{stage}-domain",
                domain_name=custom_domain_name,
                regional_certificate_arn=certificate.arn,
                endpoint_configuration=aws.apigateway.DomainNameEndpointConfigurationArgs(
                    types="PRIVATE",
                ),
                opts=pulumi.ResourceOptions(parent=self)
            )
it works when types is set to "REGIONAL", but then the DomanNameAccessAssociation fails
Copy code
domain_name_access = aws.apigateway.DomainNameAccessAssociation(f"api-{stage}-domain-name-access-association",
                domain_name_arn=domain_name_resource.arn,
                access_association_source_type="VPCE",
                access_association_source=vpc_endpoint_id,
            )
with the following error
Copy code
BadRequestException: Invalid private custom domain name arn.
q
Hey @hundreds-printer-10986, does the apigateway domain already exist and you're trying to update it from
REGIONAL
to
PRIVATE
? The
UpdateDomainName
API doesn't support
replace
operations for the
endpointConfiguration
. (see docs).