-
Notifications
You must be signed in to change notification settings - Fork 61
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
show tf-state for AWS and GCP #859
Conversation
Codecov Report
@@ Coverage Diff @@
## main #859 +/- ##
==========================================
- Coverage 73.73% 73.72% -0.01%
==========================================
Files 121 121
Lines 7976 8099 +123
==========================================
+ Hits 5881 5971 +90
- Misses 2095 2128 +33
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
def get_remote_state(self) -> str: | ||
bucket = self.layer.state_storage() | ||
s3_client = boto3.client("s3", config=Config(region_name=self.region)) | ||
tf_state = self._download_remote_blob(s3_client, bucket, self.layer.name) |
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 works? I thought the path to the object started with /tfstate
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.
I took this path from the delete_remote_state
method here
Line 144 in 63934b7
s3_client.delete_object(Bucket=bucket, Key=self.layer.name, VersionId=version) |
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.
can you run the show command to make sure it works?
Description
Get the Terraform State for the given Opta configuration.
Safety checklist
How has this change been tested, beside unit tests?
Tested Manually