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

Add examples for Secure Connect Bundle reference #329

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
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
}
Loading