diff --git a/config/cosmosdb/config.go b/config/cosmosdb/config.go index 561b86aff..eb884e67a 100644 --- a/config/cosmosdb/config.go +++ b/config/cosmosdb/config.go @@ -293,7 +293,7 @@ func Configure(p *config.Provider) { r.ExternalName = config.NameAsIdentifier r.ExternalName.GetExternalNameFn = common.GetNameFromFullyQualifiedID // /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/account1 - r.ExternalName.GetIDFn = common.GetFullyQualifiedIDFn("Microsoft.DocumentDB", "databaseAccounts", "account_name") + r.ExternalName.GetIDFn = common.GetFullyQualifiedIDFn("Microsoft.DocumentDB", "databaseAccounts", "name") }) p.AddResourceConfigurator("azurerm_cosmosdb_notebook_workspace", func(r *config.Resource) { diff --git a/examples/cosmosdb/account.yaml b/examples/cosmosdb/account.yaml new file mode 100644 index 000000000..b08422592 --- /dev/null +++ b/examples/cosmosdb/account.yaml @@ -0,0 +1,28 @@ +apiVersion: cosmosdb.azure.jet.crossplane.io/v1alpha2 +kind: Account +metadata: + name: example-account +spec: + forProvider: + kind: MongoDB + location: "East US" + offerType: Standard + mongoServerVersion: "4.0" + backup: + - type: Continuous + consistencyPolicy: + - consistencyLevel: Session + resourceGroupNameRef: + name: example + geoLocation: + - failoverPriority: 0 + location: "East US" + zoneRedundant: False + capabilities: + - name: EnableMongo + - name: DisableRateLimitingResponses + providerConfigRef: + name: example + writeConnectionSecretToRef: + name: conn-example-cosmos + namespace: crossplane-system