-
Notifications
You must be signed in to change notification settings - Fork 49
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
Add basic secrets processing for GitHub integration #246
Conversation
cloud/gcp/bin/clean
Outdated
|
||
echo Cleaning existing state... | ||
|
||
terraform state rm `terraform state list` |
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.
The terraform state is kept in the remote backend bucket, it must not be erased
This is just a utility function (clean) -- if you don't call it then it
won't be used/removed! Maybe it's not useful... I still can't get my
system to work so it's not clear to me what *does* need to be cleaned out
to get to stable state.
…On Thu, Feb 17, 2022 at 3:08 PM Francesco Anselmo ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In cloud/gcp/bin/clean
<#246 (comment)>:
> @@ -0,0 +1,5 @@
+#!/bin/bash -e
+
+echo Cleaning existing state...
+
+terraform state rm `terraform state list`
The terraform state is kept in the remote backend bucket, it must not be
erased
—
Reply to this email directly, view it on GitHub
<#246 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIEPD2GSE7PXZSNDPBQTV3U3V5WDANCNFSM5OPRVPPQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
cloud/gcp/bin/init
Outdated
|
||
terraform init $* | ||
|
||
terraform import google_project.udmi-project ${GCP_PROJECT_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 must be removed because the state already includes the project
cloud/gcp/bin/init
Outdated
|
||
terraform import google_project.udmi-project ${GCP_PROJECT_NAME:?} | ||
|
||
terraform import google_storage_bucket.tf-bucket ${GCP_PROJECT_NAME}-terraform |
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 must be removed because the state already includes the storage bucket
OK -- this was what you had in the readme!
…On Thu, Feb 17, 2022 at 3:30 PM Francesco Anselmo ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In cloud/gcp/bin/init
<#246 (comment)>:
> +#!/bin/bash -ex
+
+cd $(realpath $(dirname $0)/..)
+
+echo Initializing terraform for project ${GCP_PROJECT_NAME}
+
+for file in main.tf udmi-sites.tf terraform.tfvars; do
+ if [[ ! -f $file ]]; then
+ echo Configuration file $file does not exist, did you run bin/setup?
+ false
+ fi
+done
+
+terraform init $*
+
+terraform import google_project.udmi-project ${GCP_PROJECT_NAME:?}
This must be removed because the state already includes the project
—
Reply to this email directly, view it on GitHub
<#246 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIEPD2KQQU3VFUIMLCZUQLU3WAKBANCNFSM5OPRVPPQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
It looks dangerous to me. If we lose the state, we must start from scratch, which is not what we want. I would remove it to avoid misuse. |
Ok -- I took it out for now, but at some state we'll need something that
cleans out the local state on a machine -- not sure what that would be,
exactly. Maybe it's removing the ".terraform" directory? Basically, it
needs to undo whatever might have been done with the local setup... (but
that can be added later)
…On Thu, Feb 17, 2022 at 3:37 PM Francesco Anselmo ***@***.***> wrote:
This is just a utility function (clean) -- if you don't call it then it
won't be used/removed! Maybe it's not useful... I still can't get my system
to work so it's not clear to me what *does* need to be cleaned out to get
to stable state.
It looks dangerous to me. If we lose the state, we must start from
scratch, which is not what we want. I would remove it to avoid misuse.
—
Reply to this email directly, view it on GitHub
<#246 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIEPD7IV3FQZVILRYBGEKDU3WBBPANCNFSM5OPRVPPQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
No description provided.