By using the 1.9.7 version, while making any updates into my code (i.e. any update not related to the api) requires redeploying the API in order to reflect the API resource policy.
Therefore, my main issue lies in the API resource policy not working after any terraform apply, even if the change does not relate to the API. To fix this I must after each apply redeploy the API manually from the AWS console.
@Mohamed-Eleraki I am not sure if I fully understand your question. Are you saying that when you change the resource policy, it does not take into effect until you redeploy the API? According to Create and attach an API Gateway resource policy to an API, that is indeed required. If you are also managing deployment in Terraform, perhaps you need to use something like the triggers argument to put a dependency on the resource policy.
As well any changes to resources per Updates to REST APIs that require redeployment would also need redeployment. But you are saying that you are not changing API resources, so this may not be applicable to your scenario.
Thanks for your reply.
Yeah while updating the IaC with no change into the API resources requires a redeploy, I Have avoided this by removing the API resources from the state file