-
Notifications
You must be signed in to change notification settings - Fork 727
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
fix!: use bootstrap.outputs.common_config as default region #1181
fix!: use bootstrap.outputs.common_config as default region #1181
Conversation
e0e224c
to
3833e0b
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
eca67c3
to
a0397ec
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.
The same fix will be needed in the locals default for 3-networks-hub-and-spoke
a0397ec
to
7c4409f
Compare
Good catch @fmichaelobrien ! Fixed in this commit: 7c4409f |
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
1e0f446
to
332b503
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.
Thanks for your contribution! Could you re-source the network module to the published version now that v9.1.0 is available?
3-networks-dual-svpc/modules/base_shared_vpc/private_service_connect.tf
Outdated
Show resolved
Hide resolved
3-networks-dual-svpc/modules/restricted_shared_vpc/private_service_connect.tf
Outdated
Show resolved
Hide resolved
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.
requested changes are related to the integration tests and deployment flows (helper, TFE)
b8a8241
to
b8e66b6
Compare
@gtsorbo @daniel-cit I believe I've addressed everything in your change requests. Can you review. |
@nbugden the PR should also be renamed to |
@nbugden is the documentation still reflected in the code based on the changes in the subnetwork ? |
Done
@daniel-cit Yes, the changes to the subnets are still inline with the documentation. The doc you shared states |
/gcbrun |
/gcbrun |
both CI pipelines failed once more 😢 |
@daniel-cit - Already opened GoogleCloudPlatform/cloud-foundation-toolkit#2371 |
It is better to wait for #1251 to be merged before trying again |
we're excited to get this one in! |
Using the same value for If I don't set any values, these are the plan changes: # module.logs_export.module.destination_storage[0].google_storage_bucket.bucket must be replaced
-/+ resource "google_storage_bucket" "bucket" {
- default_event_based_hold = false -> null
~ effective_labels = {} -> (known after apply)
- enable_object_retention = false -> null
~ id = "bkt-prj-c-logging-hcia-org-logs-h6nd" -> (known after apply)
- labels = {} -> null
~ location = "US" -> "US-EAST1" # forces replacement
name = "bkt-prj-c-logging-1234-org-logs-5678"
~ project_number = 123456789101 -> (known after apply)
- requester_pays = false -> null
~ rpo = "DEFAULT" -> (known after apply)
~ self_link = "https://www.googleapis.com/storage/v1/b/bkt-prj-c-logging-1234-org-logs-5678" -> (known after apply)
~ terraform_labels = {} -> (known after apply)
~ url = "gs://bkt-prj-c-logging-1234-org-logs-5678" -> (known after apply)
# (5 unchanged attributes hidden)
- soft_delete_policy {
- effective_time = "2024-05-08T14:43:32.090Z" -> null
- retention_duration_seconds = 604800 -> null
}
# (2 unchanged blocks hidden)
} And if I set # module.logs_export.module.destination_aggregated_logs[0].google_logging_linked_dataset.linked_dataset[0] must be replaced
-/+ resource "google_logging_linked_dataset" "linked_dataset" {
~ bucket = "AggregatedLogs" # forces replacement -> (known after apply) # forces replacement
~ create_time = "2024-05-08T14:45:06.171132597Z" -> (known after apply)
~ id = "projects/prj-c-logging-hcia/locations/us-east1/buckets/AggregatedLogs/links/ds_c_prj_aggregated_logs_analytics" -> (known after apply)
~ lifecycle_state = "ACTIVE" -> (known after apply)
~ location = "us-east1" -> "US" # forces replacement
~ name = "projects/prj-c-logging-hcia/locations/us-east1/buckets/AggregatedLogs/links/ds_c_prj_aggregated_logs_analytics" -> (known after apply)
# (3 unchanged attributes hidden)
- bigquery_dataset {
- dataset_id = "bigquery.googleapis.com/projects/854274779945/datasets/ds_c_prj_aggregated_logs_analytics" -> null
}
}
# module.logs_export.module.destination_aggregated_logs[0].google_logging_project_bucket_config.bucket must be replaced
-/+ resource "google_logging_project_bucket_config" "bucket" {
+ description = (known after apply)
~ id = "projects/prj-c-logging-hcia/locations/us-east1/buckets/AggregatedLogs" -> (known after apply)
~ lifecycle_state = "ACTIVE" -> (known after apply)
~ location = "us-east1" -> "US" # forces replacement
- locked = false -> null
~ name = "projects/prj-c-logging-hcia/locations/us-east1/buckets/AggregatedLogs" -> (known after apply)
# (4 unchanged attributes hidden)
}
# module.logs_export.module.internal_project_log_export[0].google_logging_project_sink.sink[0] will be updated in-place
~ resource "google_logging_project_sink" "sink" {
~ destination = "logging.googleapis.com/projects/prj-c-logging-hcia/locations/us-east1/buckets/AggregatedLogs" -> "logging.googleapis.com/projects/prj-c-logging-hcia/locations/US/buckets/AggregatedLogs"
id = "projects/prj-c-logging-hcia/sinks/sk-c-logging-prj-la"
name = "sk-c-logging-prj-la"
# (4 unchanged attributes hidden)
} which results in these errors: │ Error: googleapi: Error 400: Sink.destination uses not supported location: US, badRequest
│
│ with module.logs_export.module.internal_project_log_export[0].google_logging_project_sink.sink[0],
│ on .terraform/modules/logs_export.internal_project_log_export/main.tf line 41, in resource "google_logging_project_sink" "sink":
│ 41: resource "google_logging_project_sink" "sink" {
│
╵
╷
│ Error: Error creating Bucket: googleapi: Error 404: Cloud Logging does not support location: US
│
│ with module.logs_export.module.destination_aggregated_logs[0].google_logging_project_bucket_config.bucket,
│ on .terraform/modules/logs_export.destination_aggregated_logs/modules/logbucket/main.tf line 36, in resource "google_logging_project_bucket_config" "bucket":
│ 36: resource "google_logging_project_bucket_config" "bucket" { If we want to support multi-region buckets, like the old default, we should change the |
@bdashrad Good catch. the
should still be
since it already reads from the remote state. And
Should also be added to the |
thanks @bdashrad and @daniel-cit |
/gcbrun |
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
/gcbrun |
@daniel-cit ci failed again, can you /gcbrun once more please |
/gcbrun |
build failing because of missing Access Context Manager Policy ID |
/gcbrun |
@daniel-cit one of the CI workflows failed... are we still waiting on #1252? |
Test failing with
|
/gcbrun |
/gcbrun |
Grant is OOO for the month, but we've had additional reviews since the initial requested changes
This PR adds some additional outputs
bootstrap.outputs.common_config
and uses these values by default. This fixes the issue of resources being deployed inus-central1
andus-west1
which was caused by module defaults (set in variables.tf) not being overridden when modules invoked. It also maintains the ability to override the defaults using theauto.tfvars
should that be desired.Issue(s) Resolved:
#1172
BEGIN_COMMIT_OVERRIDE
fix: use bootstrap.outputs.common_config as default region (#1181)
END_COMMIT_OVERRIDE