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

Update dbshapes_list.tf #419

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
25 changes: 11 additions & 14 deletions Multicloud/Azure/dbshapes_list.tf
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
// List an Oracle Exadata Database Shape

// Fetch location ID for Oracle Exadata shapes
data "azapi_resource_id" "location" {
type = "Oracle.Database/locations@2023-12-12"
parent_id = data.azapi_resource.subscription.id
name = "eastus"
type = "Microsoft.Resources/subscriptions@2023-12-12" // Correcting the parent type
parent_id = "/subscriptions/${data.azapi_resource.subscription.id}" // Subscription reference
name = "eastus" // Location name
}

// OperationId: DbSystemShapes_Get
// GET /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename}
// Get a specific Oracle Exadata Database Shape
data "azapi_resource" "dbSystemShape" {
type = "Oracle.Database/locations/dbSystemShapes@2023-09-01-preview"
parent_id = data.azapi_resource_id.location.id
name = var.resource_name
parent_id = data.azapi_resource_id.location.id // Reference to location ID
name = var.resource_name // Variable for specific resource name
depends_on = [data.azapi_resource_id.location] // Ensuring proper dependency
}

// List Oracle Exadata Database Shapes by Location

// OperationId: DbSystemShapes_ListByLocation
// GET /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes
// List all Oracle Exadata Database Shapes by Location
data "azapi_resource_list" "listDbSystemShapesByLocation" {
type = "Oracle.Database/locations/dbSystemShapes@2023-09-01-preview"
parent_id = data.azapi_resource_id.location.id
parent_id = data.azapi_resource_id.location.id // Reference to location ID
depends_on = [data.azapi_resource_id.location] // Ensuring proper dependency
}