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

refactor: import state bucket via tf import block #220

Merged
merged 2 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions examples/gcp/bin/prep-inception.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ EOF
sleep 5

terraform init
terraform state show module.inception.google_storage_bucket.tf_state || \
terraform import module.inception.google_storage_bucket.tf_state ${tf_state_bucket_name}
terraform state show module.inception.google_storage_bucket.tf_state
Copy link
Member

@bodymindarts bodymindarts Sep 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line can go away too if it works


terraform state show module.inception.google_project_iam_custom_role.inception_destroy || \
terraform apply \
Expand Down
4 changes: 4 additions & 0 deletions modules/inception/gcp/import.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import {
id = var.tf_state_bucket_name
to = google_storage_bucket.tf_state
}
Loading