-
Notifications
You must be signed in to change notification settings - Fork 14
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
Added the backend configuration for the terraform #636
Added the backend configuration for the terraform #636
Conversation
@@ -28,7 +28,7 @@ def lambda_handler(event, context): | |||
index_id = f"{account}-{current_date}" | |||
es_data = es_operations.get_es_data_by_id(index_id) | |||
if es_data: | |||
email_body += f"<h2>{es_data.get('_source', {}).get('subject')}</h2>" | |||
email_body += f"<h2>Cloud Report: Long running instances in the @{account} account</h2>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be Weekly Cloud Report: Long running instances in the Perf&Scale AWS Accounts
Per line https://github.com/redhat-performance/cloud-governance/blob/main/cloudsensei/agg_lambda/lambda_function.py#L25
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mentioned in the Subject, I think no need for every account.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this be a daily or weekly report?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weekly report.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, lgtm
0298df9
to
fa73f90
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
fa73f90
to
c3fd77c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@krishvoor some changes are added.
i.e env. conf to env.sh
ptlk
c3fd77c
to
da7bb07
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@athiruma, did you add rule against bucket to store data up to 3 monthes, otherwise we will pay on old data?
I am using the cloud-governance s3 bucket. |
@athiruma I think we should add deletion rule for this bucket, what do you think keep only last 3 months ? |
We can implement a lifecycle policy for the cloud-governance bucket. So it will move the data to s3 glacier after 3 months. WDYT? |
Why do you think we need this data in s3 glacier ? |
It is used for databackup. |
@athiruma Ok lets do it, pls let me know if you need my help |
@athiruma I assume, we will store Terraform state file change in the S3 bucket, |
@krishvoor We always need to retain the terraform state file until we delete the services. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/LGTM - Let me know when you add the s3 rule so I will merge it
Added, waiting for the @krishvoor reply and approval. |
/lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/LGTM
Changed the env.conf to env.sh to export the variables from local env.
Added the terraform backend to s3
Why?
terraform s3 backend configuration gives us the flexibility of storing the state file in s3_bucket. If further runs happen, it will directly restore the state file from s3 and made changes to the current state.
Pros
No need to manage the terraform state file.