aws-openai
aws-openai copied to clipboard
🐛 No Instructions for CloudWatch and ARN configuration during terraform apply
Description
No Instructions for CloudWatch and ARN configuration during terraform apply. Had to create a conda environment to isolate terraform to get it to behave, then was able to proceed with terraform init and terraform plan, but terraform apply gives a cloudwatch ARN error that I can't resolve
Reproduction URL
https://github.com/williamtbarker/aws-openai
Reproduction steps
1. created terraform conda environment and activated it, conda install terraform
2. cd terraform && terraform init
3. terraform plan
4. terraform apply gives error
Screenshots

Logs
aws_api_gateway_stage.openai: Modifying... [id=ags-zwu2mfsjzj-v1]
aws_api_gateway_stage.openai: Modifications complete after 1s [id=ags-zwu2mfsjzj-v1]
aws_api_gateway_method_settings.openai: Creating...
╷
│ Error: updating API Gateway Stage failed: BadRequestException: CloudWatch Logs role ARN must be set in account settings to enable logging
│
│ with aws_api_gateway_method_settings.openai,
│ on apigateway.tf line 117, in resource "aws_api_gateway_method_settings" "openai":
│ 117: resource "aws_api_gateway_method_settings" "openai" {
│
╵
Browsers
Chrome
OS
Mac
@williamtbarker the screen shot image didn't upload for some reason. I'm guessing there's something wrong w my policy configuration for GitHub Issues. But while I investigate you can email it to me if you'd like, at [email protected], and i'll ensure that it gets uploaded.
I should also mention that I am running an M2 mac (hence the problems with terraform installed by brew, had to run terraform through conda to resolve dependency issues)
That's interesting. I'm also running on M2; a 2022 MacBook Air. I didn't run into this problem, but I'm unsure what the difference might be between our two seemingly similar environments.
Adding depends_on seems solving the problem
@jmontagne thanks. that kind of makes sense in that ApiGatewayAccountSetting might not be an explicit dependent. but i'm still curious about why similar hardware/os would lead to different results.
Just thinking out loud: it seems that wiping the project from your dev environment, and re-cloning, and re-initializing "from scratch" isn't enough, possibly bc hcl also caches artifacts in your home folder. but having said, my M2 is now more than a year old, and I can't image any hcl artifact surviving this long inside of a caching environment.
i'll continue to research.