Skip to content

Commit

Permalink
Add examples for Secure Connect Bundle reference (#329)
Browse files Browse the repository at this point in the history
Fixes #218
  • Loading branch information
emerkle826 authored Dec 1, 2023
1 parent 202c28e commit 9aa8848
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/data-sources/secure_connect_bundle_url.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ description: |-
data "astra_secure_connect_bundle_url" "scb" {
database_id = "f9f4b1e0-4c05-451e-9bba-d631295a7f73"
}
// Output for SCB reference
output "scb" {
value = data.astra_secure_connect_bundle_url.scb.secure_bundles[0].url
}
// For mult-DC databases, specify the datacenter ID
// Example 1: Hard-coded IDs
Expand All @@ -35,6 +39,16 @@ data "astra_secure_connect_bundle_url" "scb3" {
database_id = "f9f4b1e0-4c05-451e-9bba-d631295a7f73"
datacenter_id = "f9f4b1e0-4c05-451e-9bba-d631295a7f73-3"
}
// Output for SCB reference
output "scb1" {
value = data.astra_secure_connect_bundle_url.scb1.secure_bundles[0].url
}
output "scb2" {
value = data.astra_secure_connect_bundle_url.scb2.secure_bundles[0].url
}
output "scb3" {
value = data.astra_secure_connect_bundle_url.scb3.secure_bundles[0].url
}
// Example 2: Referenced IDs
// Database example for referencing
Expand Down Expand Up @@ -64,6 +78,16 @@ data "astra_secure_connect_bundle_url" "scb3" {
database_id = astra_database.mydb.id
datacenter_id = astra_database.mydb.datacenters["${astra_database.mydb.cloud_provider}.${astra_database.mydb.regions[2]}"]
}
// Output for SCB reference
output "scb1" {
value = data.astra_secure_connect_bundle_url.scb1.secure_bundles[0].url
}
output "scb2" {
value = data.astra_secure_connect_bundle_url.scb2.secure_bundles[0].url
}
output "scb3" {
value = data.astra_secure_connect_bundle_url.scb3.secure_bundles[0].url
}
```

<!-- schema generated by tfplugindocs -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
data "astra_secure_connect_bundle_url" "scb" {
database_id = "f9f4b1e0-4c05-451e-9bba-d631295a7f73"
}
// Output for SCB reference
output "scb" {
value = data.astra_secure_connect_bundle_url.scb.secure_bundles[0].url
}

// For mult-DC databases, specify the datacenter ID
// Example 1: Hard-coded IDs
Expand All @@ -20,6 +24,16 @@ data "astra_secure_connect_bundle_url" "scb3" {
database_id = "f9f4b1e0-4c05-451e-9bba-d631295a7f73"
datacenter_id = "f9f4b1e0-4c05-451e-9bba-d631295a7f73-3"
}
// Output for SCB reference
output "scb1" {
value = data.astra_secure_connect_bundle_url.scb1.secure_bundles[0].url
}
output "scb2" {
value = data.astra_secure_connect_bundle_url.scb2.secure_bundles[0].url
}
output "scb3" {
value = data.astra_secure_connect_bundle_url.scb3.secure_bundles[0].url
}

// Example 2: Referenced IDs
// Database example for referencing
Expand Down Expand Up @@ -49,3 +63,13 @@ data "astra_secure_connect_bundle_url" "scb3" {
database_id = astra_database.mydb.id
datacenter_id = astra_database.mydb.datacenters["${astra_database.mydb.cloud_provider}.${astra_database.mydb.regions[2]}"]
}
// Output for SCB reference
output "scb1" {
value = data.astra_secure_connect_bundle_url.scb1.secure_bundles[0].url
}
output "scb2" {
value = data.astra_secure_connect_bundle_url.scb2.secure_bundles[0].url
}
output "scb3" {
value = data.astra_secure_connect_bundle_url.scb3.secure_bundles[0].url
}

0 comments on commit 9aa8848

Please sign in to comment.