-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Support BigQuery Omni external connection for AWS s3 #11459
Comments
Are there any updates on how this works in practice? Specifically I can't see a way to define the connection role and the Example: resource "google_bigquery_connection" "connection" {
provider = google-beta
connection_id = "bq-connection"
location = "aws-ap-southeast-1"
friendly_name = "👋"
description = "BQ Omni Connection"
aws {
access_role {
iam_role_id = aws_iam_role.bigquery-omni-connection-role.arn
}
}
}
resource "aws_iam_role" "bigquery-omni-connection-role" {
name = "bigquery-omni-connection"
max_session_duration = 43200
assume_role_policy = <<-EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Federated": "accounts.google.com"
},
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"accounts.google.com:sub": ${google_bigquery_connection.connection.id}
}
}
}
]
}
EOF
}
|
rileykarson i think this can be closed. voycey i think you will need to extract the name and "manually" construct the iam role arn when passing to the connection resource. |
I can confirm, there's really no way around the cycle. Because Omni is using web identity under the hood to make the auth connection between the two clouds it requires a bi-directional configuration. This is by definition always going to be a cycle. Unfortunately the best you can do is use string building for 1 direction and resource reference in the other direction. Here's how I've modeled and e2e AWS Omni connection: https://gist.github.com/chrisst/314d131aa42db685938dee24dea0f912, setting up the references this way, and throwing a sleep in there for IAM propagation, allows terraform to succeed in a single apply. |
@voycey If you pick Omni back up let me know and I'm happy to help get it working. I think it's even picked up a few new features in the 2 years since you last tackle it 😅 |
…orp#11459) [upstream:d821caafb9ff3ce845aca8b09b35de2b32d55335] Signed-off-by: Modular Magician <[email protected]>
#19258) [upstream:d821caafb9ff3ce845aca8b09b35de2b32d55335] Signed-off-by: Modular Magician <[email protected]>
This is available https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/bigquery_connection#nested_aws since GoogleCloudPlatform/magic-modules#6025. Requesting the current terraform-team-oncall @roaks3 to close this issue. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Description
As we can create BigQuery external connections with Cloud SQL for federated query, we should support that with AWS as well.
similar request #11053
New or Affected Resource(s)
Potential Terraform Configuration
References
b/374162343
The text was updated successfully, but these errors were encountered: