Skip to content

Commit

Permalink
feat: Expose GCP_PUBSUB_SERVICE_ACCOUNT attribute in notification int…
Browse files Browse the repository at this point in the history
…egration (#871)
  • Loading branch information
zapo authored Feb 22, 2022
1 parent 537428d commit 9cb863c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/resources/notification_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ resource snowflake_notification_integration integration {
- **aws_sqs_external_id** (String) The external ID that Snowflake will use when assuming the AWS role
- **aws_sqs_iam_user_arn** (String) The Snowflake user that will attempt to assume the AWS role.
- **created_on** (String) Date and time when the notification integration was created.
- **gcp_pubsub_service_account** (String) The GCP service account identifier that Snowflake will use when assuming the GCP role

## Import

Expand Down
9 changes: 9 additions & 0 deletions pkg/resources/notification_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ var notificationIntegrationSchema = map[string]*schema.Schema{
Optional: true,
Description: "The subscription id that Snowflake will listen to when using the GCP_PUBSUB provider.",
},
"gcp_pubsub_service_account": &schema.Schema{
Type: schema.TypeString,
Computed: true,
Description: "The GCP service account identifier that Snowflake will use when assuming the GCP role",
},
}

// NotificationIntegration returns a pointer to the resource representing a notification integration
Expand Down Expand Up @@ -294,6 +299,10 @@ func ReadNotificationIntegration(data *schema.ResourceData, meta interface{}) er
if err = data.Set("gcp_pubsub_subscription_name", v.(string)); err != nil {
return err
}
case "GCP_PUBSUB_SERVICE_ACCOUNT":
if err = data.Set("gcp_pubsub_service_account", v.(string)); err != nil {
return err
}
default:
log.Printf("[WARN] unexpected property %v returned from Snowflake", k)
}
Expand Down

0 comments on commit 9cb863c

Please sign in to comment.