Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 No Instructions for CloudWatch and ARN configuration during terraform apply #175

Open
williamtbarker opened this issue Dec 7, 2023 · 6 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@williamtbarker
Copy link

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

![DESCRIPTION](LINK.png)

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 williamtbarker added the bug Something isn't working label Dec 7, 2023
@lpm0073 lpm0073 self-assigned this Dec 7, 2023
@lpm0073
Copy link
Member

lpm0073 commented Dec 7, 2023

@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.

@williamtbarker
Copy link
Author

Screenshot 2023-12-07 at 3 58 30 PM

@williamtbarker
Copy link
Author

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)

@lpm0073
Copy link
Member

lpm0073 commented Dec 7, 2023

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.

@lpm0073 lpm0073 added good first issue Good for newcomers help wanted Extra attention is needed labels Dec 7, 2023
@jmontagne
Copy link

jmontagne commented Dec 9, 2023

Adding depends_on seems solving the problem
image

@lpm0073
Copy link
Member

lpm0073 commented Dec 10, 2023

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants