diff --git a/cmd/converter/main.go b/cmd/converter/main.go new file mode 100644 index 000000000..df25b9187 --- /dev/null +++ b/cmd/converter/main.go @@ -0,0 +1,23 @@ +package converter + +import ( + "context" + "testing" + + "github.com/crossplane/upjet/pkg/examples/conversion" + + "github.com/upbound/provider-azure/config" +) + +func Test(t *testing.T) { + pc, err := config.GetProvider(context.TODO(), false) + if err != nil { + panic(err) + } + + if err = conversion.ConvertSingletonListToEmbeddedObject(pc, + "../examples", + "../hack/boilerplate.go.txt"); err != nil { + panic(err) + } +} diff --git a/examples/cache/v1beta2/rediscache.yaml b/examples/cache/v1beta2/rediscache.yaml new file mode 100644 index 000000000..7cbffad84 --- /dev/null +++ b/examples/cache/v1beta2/rediscache.yaml @@ -0,0 +1,38 @@ +# SPDX-FileCopyrightText: 2024 The Crossplane Authors +# +# SPDX-License-Identifier: CC0-1.0 + +apiVersion: cache.azure.upbound.io/v1beta2 +kind: RedisCache +metadata: + annotations: + meta.upbound.io/example-id: cache/v1beta2/rediscache + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + capacity: 2 + enableNonSslPort: false + family: C + location: West Europe + minimumTlsVersion: "1.2" + redisConfiguration: {} + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + skuName: Standard + +--- + +apiVersion: azure.upbound.io/v1beta1 +kind: ResourceGroup +metadata: + annotations: + meta.upbound.io/example-id: cache/v1beta2/rediscache + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + location: West Europe diff --git a/examples/compute/virtualmachineruncommand.yaml b/examples/compute/v1beta1/virtualmachineruncommand.yaml similarity index 100% rename from examples/compute/virtualmachineruncommand.yaml rename to examples/compute/v1beta1/virtualmachineruncommand.yaml diff --git a/examples/compute/v1beta2/virtualmachineruncommand.yaml b/examples/compute/v1beta2/virtualmachineruncommand.yaml new file mode 100644 index 000000000..22d8ef6aa --- /dev/null +++ b/examples/compute/v1beta2/virtualmachineruncommand.yaml @@ -0,0 +1,266 @@ +# SPDX-FileCopyrightText: 2024 The Crossplane Authors +# +# SPDX-License-Identifier: CC0-1.0 + +apiVersion: compute.azure.upbound.io/v1beta2 +kind: VirtualMachineRunCommand +metadata: + annotations: + meta.upbound.io/example-id: compute/v1beta2/virtualmachineruncommand + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + location: West Europe + source: + - script: echo 'hello world' + virtualMachineIdSelector: + matchLabels: + testing.upbound.io/example-name: example + +--- + +apiVersion: compute.azure.upbound.io/v1beta2 +kind: LinuxVirtualMachine +metadata: + annotations: + meta.upbound.io/example-id: compute/v1beta2/virtualmachineruncommand + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + adminPasswordSecretRef: + key: example-key + name: example-secret + namespace: upbound-system + adminUsername: adminuser + disablePasswordAuthentication: false + identity: + - identityIds: + - ${azurerm_user_assigned_identity.example.id} + type: SystemAssigned, UserAssigned + location: West Europe + networkInterfaceIdsRefs: + - name: example + osDisk: + - caching: ReadWrite + storageAccountType: Premium_LRS + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + size: Standard_B2s + sourceImageReference: + - offer: 0001-com-ubuntu-server-jammy + publisher: Canonical + sku: 22_04-lts + version: latest + +--- + +apiVersion: network.azure.upbound.io/v1beta1 +kind: NetworkInterface +metadata: + annotations: + meta.upbound.io/example-id: compute/v1beta2/virtualmachineruncommand + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + ipConfiguration: + - name: internal + privateIpAddressAllocation: Dynamic + subnetIdSelector: + matchLabels: + testing.upbound.io/example-name: example + location: West Europe + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + +--- + +apiVersion: azure.upbound.io/v1beta1 +kind: ResourceGroup +metadata: + annotations: + meta.upbound.io/example-id: compute/v1beta2/virtualmachineruncommand + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + location: West Europe + +--- + +apiVersion: authorization.azure.upbound.io/v1beta1 +kind: RoleAssignment +metadata: + annotations: + meta.upbound.io/example-id: compute/v1beta2/virtualmachineruncommand + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + principalId: ${azurerm_user_assigned_identity.example.principal_id} + roleDefinitionName: Storage Blob Data Contributor + scope: ${azurerm_storage_account.example.id} + +--- + +apiVersion: storage.azure.upbound.io/v1beta2 +kind: Account +metadata: + annotations: + meta.upbound.io/example-id: compute/v1beta2/virtualmachineruncommand + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + accountReplicationType: LRS + accountTier: Standard + location: West Europe + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + +--- + +apiVersion: storage.azure.upbound.io/v1beta1 +kind: Blob +metadata: + annotations: + meta.upbound.io/example-id: compute/v1beta2/virtualmachineruncommand + labels: + testing.upbound.io/example-name: example1 + name: example1 +spec: + forProvider: + sourceContent: echo 'hello world' + storageAccountNameSelector: + matchLabels: + testing.upbound.io/example-name: example + storageContainerNameSelector: + matchLabels: + testing.upbound.io/example-name: example + type: Block + +--- + +apiVersion: storage.azure.upbound.io/v1beta1 +kind: Blob +metadata: + annotations: + meta.upbound.io/example-id: compute/v1beta2/virtualmachineruncommand + labels: + testing.upbound.io/example-name: example2 + name: example2 +spec: + forProvider: + storageAccountNameSelector: + matchLabels: + testing.upbound.io/example-name: example + storageContainerNameSelector: + matchLabels: + testing.upbound.io/example-name: example + type: Append + +--- + +apiVersion: storage.azure.upbound.io/v1beta1 +kind: Blob +metadata: + annotations: + meta.upbound.io/example-id: compute/v1beta2/virtualmachineruncommand + labels: + testing.upbound.io/example-name: example3 + name: example3 +spec: + forProvider: + storageAccountNameSelector: + matchLabels: + testing.upbound.io/example-name: example + storageContainerNameSelector: + matchLabels: + testing.upbound.io/example-name: example + type: Append + +--- + +apiVersion: storage.azure.upbound.io/v1beta1 +kind: Container +metadata: + annotations: + meta.upbound.io/example-id: compute/v1beta2/virtualmachineruncommand + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + containerAccessType: blob + storageAccountNameSelector: + matchLabels: + testing.upbound.io/example-name: example + +--- + +apiVersion: network.azure.upbound.io/v1beta2 +kind: Subnet +metadata: + annotations: + meta.upbound.io/example-id: compute/v1beta2/virtualmachineruncommand + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + addressPrefixes: + - 10.0.2.0/24 + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + virtualNetworkNameSelector: + matchLabels: + testing.upbound.io/example-name: example + +--- + +apiVersion: managedidentity.azure.upbound.io/v1beta1 +kind: UserAssignedIdentity +metadata: + annotations: + meta.upbound.io/example-id: compute/v1beta2/virtualmachineruncommand + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + location: West Europe + name: example-uai + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + +--- + +apiVersion: network.azure.upbound.io/v1beta2 +kind: VirtualNetwork +metadata: + annotations: + meta.upbound.io/example-id: compute/v1beta2/virtualmachineruncommand + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + addressSpace: + - 10.0.0.0/16 + location: West Europe + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example diff --git a/examples/cosmosdb/v1beta2/cassandracluster.yaml b/examples/cosmosdb/v1beta2/cassandracluster.yaml new file mode 100644 index 000000000..08e25a7b0 --- /dev/null +++ b/examples/cosmosdb/v1beta2/cassandracluster.yaml @@ -0,0 +1,95 @@ +# SPDX-FileCopyrightText: 2024 The Crossplane Authors +# +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: cosmosdb.azure.upbound.io/v1beta2 +kind: CassandraCluster +metadata: + annotations: + meta.upbound.io/example-id: cosmosdb/v1beta2/cassandracluster + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + defaultAdminPasswordSecretRef: + key: example-key + name: example-secret + namespace: upbound-system + delegatedManagementSubnetIdSelector: + matchLabels: + testing.upbound.io/example-name: example + location: West Europe + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + +--- + +apiVersion: azure.upbound.io/v1beta1 +kind: ResourceGroup +metadata: + annotations: + meta.upbound.io/example-id: cosmosdb/v1beta2/cassandracluster + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + location: West Europe + +--- + +apiVersion: authorization.azure.upbound.io/v1beta1 +kind: RoleAssignment +metadata: + annotations: + meta.upbound.io/example-id: cosmosdb/v1beta2/cassandracluster + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + principalId: ${data.azuread_service_principal.example.object_id} + roleDefinitionName: Network Contributor + scope: ${azurerm_virtual_network.example.id} + +--- + +apiVersion: network.azure.upbound.io/v1beta2 +kind: Subnet +metadata: + annotations: + meta.upbound.io/example-id: cosmosdb/v1beta2/cassandracluster + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + addressPrefixes: + - 10.0.1.0/24 + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + virtualNetworkNameSelector: + matchLabels: + testing.upbound.io/example-name: example + +--- + +apiVersion: network.azure.upbound.io/v1beta2 +kind: VirtualNetwork +metadata: + annotations: + meta.upbound.io/example-id: cosmosdb/v1beta2/cassandracluster + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + addressSpace: + - 10.0.0.0/16 + location: West Europe + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example diff --git a/examples/datashare/v1beta2/datashare.yaml b/examples/datashare/v1beta2/datashare.yaml new file mode 100644 index 000000000..888bb6d24 --- /dev/null +++ b/examples/datashare/v1beta2/datashare.yaml @@ -0,0 +1,59 @@ +# SPDX-FileCopyrightText: 2024 The Crossplane Authors +# +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: datashare.azure.upbound.io/v1beta2 +kind: DataShare +metadata: + annotations: + meta.upbound.io/example-id: datashare/v1beta2/datashare + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + accountIdSelector: + matchLabels: + testing.upbound.io/example-name: example + description: example desc + kind: CopyBased + snapshotSchedule: + name: example-ss + recurrence: Day + startTime: "2020-04-17T04:47:52.9614956Z" + terms: example terms + +--- + +apiVersion: datashare.azure.upbound.io/v1beta2 +kind: Account +metadata: + annotations: + meta.upbound.io/example-id: datashare/v1beta2/datashare + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + identity: + type: SystemAssigned + location: West Europe + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + tags: + foo: bar + +--- + +apiVersion: azure.upbound.io/v1beta1 +kind: ResourceGroup +metadata: + annotations: + meta.upbound.io/example-id: datashare/v1beta2/datashare + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + location: West Europe diff --git a/examples/dbforpostgresql/v1beta2/flexibleserver.yaml b/examples/dbforpostgresql/v1beta2/flexibleserver.yaml new file mode 100644 index 000000000..978268b2e --- /dev/null +++ b/examples/dbforpostgresql/v1beta2/flexibleserver.yaml @@ -0,0 +1,134 @@ +# SPDX-FileCopyrightText: 2024 The Crossplane Authors +# +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: dbforpostgresql.azure.upbound.io/v1beta2 +kind: FlexibleServer +metadata: + annotations: + meta.upbound.io/example-id: dbforpostgresql/v1beta2/flexibleserver + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + administratorLogin: psqladmin + administratorPasswordSecretRef: + key: example-key + name: example-secret + namespace: upbound-system + delegatedSubnetIdSelector: + matchLabels: + testing.upbound.io/example-name: example + location: West Europe + privateDnsZoneIdSelector: + matchLabels: + testing.upbound.io/example-name: example + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + skuName: GP_Standard_D4s_v3 + storageMb: 32768 + storageTier: P30 + version: "12" + zone: "1" + +--- + +apiVersion: network.azure.upbound.io/v1beta2 +kind: PrivateDNSZone +metadata: + annotations: + meta.upbound.io/example-id: dbforpostgresql/v1beta2/flexibleserver + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + +--- + +apiVersion: network.azure.upbound.io/v1beta1 +kind: PrivateDNSZoneVirtualNetworkLink +metadata: + annotations: + meta.upbound.io/example-id: dbforpostgresql/v1beta2/flexibleserver + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + privateDnsZoneNameSelector: + matchLabels: + testing.upbound.io/example-name: example + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + virtualNetworkIdSelector: + matchLabels: + testing.upbound.io/example-name: example + +--- + +apiVersion: azure.upbound.io/v1beta1 +kind: ResourceGroup +metadata: + annotations: + meta.upbound.io/example-id: dbforpostgresql/v1beta2/flexibleserver + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + location: West Europe + +--- + +apiVersion: network.azure.upbound.io/v1beta2 +kind: Subnet +metadata: + annotations: + meta.upbound.io/example-id: dbforpostgresql/v1beta2/flexibleserver + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + addressPrefixes: + - 10.0.2.0/24 + delegation: + - name: fs + serviceDelegation: + actions: + - Microsoft.Network/virtualNetworks/subnets/join/action + name: Microsoft.DBforPostgreSQL/flexibleServers + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + serviceEndpoints: + - Microsoft.Storage + virtualNetworkNameSelector: + matchLabels: + testing.upbound.io/example-name: example + +--- + +apiVersion: network.azure.upbound.io/v1beta2 +kind: VirtualNetwork +metadata: + annotations: + meta.upbound.io/example-id: dbforpostgresql/v1beta2/flexibleserver + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + addressSpace: + - 10.0.0.0/16 + location: West Europe + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example diff --git a/examples/devices/v1beta2/iothubdps.yaml b/examples/devices/v1beta2/iothubdps.yaml new file mode 100644 index 000000000..0415657e8 --- /dev/null +++ b/examples/devices/v1beta2/iothubdps.yaml @@ -0,0 +1,36 @@ +# SPDX-FileCopyrightText: 2024 The Crossplane Authors +# +# SPDX-License-Identifier: CC0-1.0 + +apiVersion: devices.azure.upbound.io/v1beta2 +kind: IOTHubDPS +metadata: + annotations: + meta.upbound.io/example-id: devices/v1beta2/iothubdps + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + allocationPolicy: Hashed + location: West Europe + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + sku: + capacity: "1" + name: S1 + +--- + +apiVersion: azure.upbound.io/v1beta1 +kind: ResourceGroup +metadata: + annotations: + meta.upbound.io/example-id: devices/v1beta2/iothubdps + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + location: West Europe diff --git a/examples/insights/v1beta2/monitormetricalert.yaml b/examples/insights/v1beta2/monitormetricalert.yaml new file mode 100644 index 000000000..b2917a02a --- /dev/null +++ b/examples/insights/v1beta2/monitormetricalert.yaml @@ -0,0 +1,89 @@ +# SPDX-FileCopyrightText: 2024 The Crossplane Authors +# +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: insights.azure.upbound.io/v1beta2 +kind: MonitorMetricAlert +metadata: + annotations: + meta.upbound.io/example-id: insights/v1beta2/monitormetricalert + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + action: + - actionGroupIdSelector: + matchLabels: + testing.upbound.io/example-name: main + criteria: + - aggregation: Total + dimension: + - name: ApiName + operator: Include + values: + - '*' + metricName: Transactions + metricNamespace: Microsoft.Storage/storageAccounts + operator: GreaterThan + threshold: 50 + description: Action will be triggered when Transactions count is greater than + 50. + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + scopesRefs: + - name: to_monitor + +--- + +apiVersion: insights.azure.upbound.io/v1beta2 +kind: MonitorActionGroup +metadata: + annotations: + meta.upbound.io/example-id: insights/v1beta2/monitormetricalert + labels: + testing.upbound.io/example-name: main + name: main +spec: + forProvider: + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + shortName: exampleact + webhookReceiver: + - name: callmyapi + serviceUri: http://example.com/alert + +--- + +apiVersion: azure.upbound.io/v1beta1 +kind: ResourceGroup +metadata: + annotations: + meta.upbound.io/example-id: insights/v1beta1/monitormetricalert + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + location: West Europe + +--- + +apiVersion: storage.azure.upbound.io/v1beta2 +kind: Account +metadata: + annotations: + meta.upbound.io/example-id: insights/v1beta2/monitormetricalert + labels: + testing.upbound.io/example-name: to_monitor + name: to-monitor +spec: + forProvider: + accountReplicationType: LRS + accountTier: Standard + location: West Europe + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example diff --git a/examples/keyvault/v1beta2/managedhardwaresecuritymodule.yaml b/examples/keyvault/v1beta2/managedhardwaresecuritymodule.yaml new file mode 100644 index 000000000..a80e3f38e --- /dev/null +++ b/examples/keyvault/v1beta2/managedhardwaresecuritymodule.yaml @@ -0,0 +1,40 @@ +# SPDX-FileCopyrightText: 2024 The Crossplane Authors +# +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: keyvault.azure.upbound.io/v1beta2 +kind: ManagedHardwareSecurityModule +metadata: + annotations: + meta.upbound.io/example-id: keyvault/v1beta2/managedhardwaresecuritymodule + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + adminObjectIds: + - ${data.azurerm_client_config.current.object_id} + location: West Europe + purgeProtectionEnabled: false + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + skuName: Standard_B1 + softDeleteRetentionDays: 90 + tags: + Env: Test + tenantId: ${data.azurerm_client_config.current.tenant_id} + +--- + +apiVersion: azure.upbound.io/v1beta1 +kind: ResourceGroup +metadata: + annotations: + meta.upbound.io/example-id: keyvault/v1beta2/managedhardwaresecuritymodule + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + location: West Europe diff --git a/examples/network/v1beta2/frontdoor.yaml b/examples/network/v1beta2/frontdoor.yaml new file mode 100644 index 000000000..9ff4d796b --- /dev/null +++ b/examples/network/v1beta2/frontdoor.yaml @@ -0,0 +1,59 @@ +# SPDX-FileCopyrightText: 2024 The Crossplane Authors +# +# SPDX-License-Identifier: CC0-1.0 + +apiVersion: network.azure.upbound.io/v1beta2 +kind: FrontDoor +metadata: + annotations: + meta.upbound.io/example-id: network/v1beta2/frontdoor + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + backendPool: + - backend: + - address: www.bing.com + hostHeader: www.bing.com + httpPort: 80 + httpsPort: 443 + healthProbeName: exampleHealthProbeSetting1 + loadBalancingName: exampleLoadBalancingSettings1 + name: exampleBackendBing + backendPoolHealthProbe: + - name: exampleHealthProbeSetting1 + backendPoolLoadBalancing: + - name: exampleLoadBalancingSettings1 + frontendEndpoint: + - hostName: example-FrontDoor.azurefd.net + name: exampleFrontendEndpoint1 + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + routingRule: + - acceptedProtocols: + - Http + - Https + forwardingConfiguration: + - backendPoolName: exampleBackendBing + forwardingProtocol: MatchRequest + frontendEndpoints: + - exampleFrontendEndpoint1 + name: exampleRoutingRule1 + patternsToMatch: + - /* + +--- + +apiVersion: azure.upbound.io/v1beta1 +kind: ResourceGroup +metadata: + annotations: + meta.upbound.io/example-id: network/v1beta2/frontdoor + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + location: West Europe diff --git a/examples/network/v1beta2/frontdoorcustomhttpsconfiguration.yaml b/examples/network/v1beta2/frontdoorcustomhttpsconfiguration.yaml new file mode 100644 index 000000000..1b591a765 --- /dev/null +++ b/examples/network/v1beta2/frontdoorcustomhttpsconfiguration.yaml @@ -0,0 +1,76 @@ +# SPDX-FileCopyrightText: 2024 The Crossplane Authors +# +# SPDX-License-Identifier: CC0-1.0 + +apiVersion: network.azure.upbound.io/v1beta2 +kind: FrontdoorCustomHTTPSConfiguration +metadata: + annotations: + meta.upbound.io/example-id: network/v1beta2/frontdoorcustomhttpsconfiguration + labels: + testing.upbound.io/example-name: example_custom_https_0 + name: example-custom-https-0 +spec: + forProvider: + customHttpsProvisioningEnabled: false + frontendEndpointId: ${azurerm_frontdoor.example.frontend_endpoints["exampleFrontendEndpoint1"]} + +--- + +apiVersion: network.azure.upbound.io/v1beta2 +kind: FrontDoor +metadata: + annotations: + meta.upbound.io/example-id: network/v1beta2/frontdoorcustomhttpsconfiguration + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + backendPool: + - backend: + - address: www.bing.com + hostHeader: www.bing.com + httpPort: 80 + httpsPort: 443 + healthProbeName: exampleHealthProbeSetting1 + loadBalancingName: exampleLoadBalancingSettings1 + name: exampleBackendBing + backendPoolHealthProbe: + - name: exampleHealthProbeSetting1 + backendPoolLoadBalancing: + - name: exampleLoadBalancingSettings1 + frontendEndpoint: + - hostName: example-FrontDoor.azurefd.net + name: exampleFrontendEndpoint1 + - hostName: examplefd1.examplefd.net + name: exampleFrontendEndpoint2 + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + routingRule: + - acceptedProtocols: + - Http + - Https + forwardingConfiguration: + - backendPoolName: exampleBackendBing + forwardingProtocol: MatchRequest + frontendEndpoints: + - exampleFrontendEndpoint1 + name: exampleRoutingRule1 + patternsToMatch: + - /* + +--- + +apiVersion: azure.upbound.io/v1beta1 +kind: ResourceGroup +metadata: + annotations: + meta.upbound.io/example-id: network/v1beta2/frontdoorcustomhttpsconfiguration + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + location: West Europe diff --git a/examples/network/v1beta2/frontdoorrulesengine.yaml b/examples/network/v1beta2/frontdoorrulesengine.yaml new file mode 100644 index 000000000..1f8c1397f --- /dev/null +++ b/examples/network/v1beta2/frontdoorrulesengine.yaml @@ -0,0 +1,99 @@ +# SPDX-FileCopyrightText: 2024 The Crossplane Authors +# +# SPDX-License-Identifier: CC0-1.0 + +apiVersion: network.azure.upbound.io/v1beta2 +kind: FrontdoorRulesEngine +metadata: + annotations: + meta.upbound.io/example-id: network/v1beta2/frontdoorrulesengine + labels: + testing.upbound.io/example-name: example_rules_engine + name: example-rules-engine +spec: + forProvider: + frontdoorNameSelector: + matchLabels: + testing.upbound.io/example-name: example + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + rule: + - action: + - responseHeader: + - headerActionType: Append + headerName: X-TEST-HEADER + value: Append Header Rule + name: debuggingoutput + priority: 1 + - action: + - responseHeader: + - headerActionType: Overwrite + headerName: Access-Control-Allow-Origin + value: '*' + - headerActionType: Overwrite + headerName: Access-Control-Allow-Credentials + value: "true" + matchCondition: + - operator: Equal + value: + - GET + - POST + variable: RequestMethod + name: overwriteorigin + priority: 2 + +--- + +apiVersion: network.azure.upbound.io/v1beta2 +kind: FrontDoor +metadata: + annotations: + meta.upbound.io/example-id: network/v1beta2/frontdoorrulesengine + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + backendPool: + - backend: + - address: www.bing.com + hostHeader: www.bing.com + httpPort: 80 + httpsPort: 443 + healthProbeName: exampleHealthProbeSetting1 + loadBalancingName: exampleLoadBalancingSettings1 + name: exampleBackendBing + backendPoolHealthProbe: + - name: exampleHealthProbeSetting1 + backendPoolLoadBalancing: + - name: exampleLoadBalancingSettings1 + frontendEndpoint: + - hostName: example-FrontDoor.azurefd.net + name: exampleFrontendEndpoint1 + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + routingRule: + - acceptedProtocols: + - Http + - Https + frontendEndpoints: + - exampleFrontendEndpoint1 + name: exampleRoutingRule1 + patternsToMatch: + - /* + +--- + +apiVersion: azure.upbound.io/v1beta1 +kind: ResourceGroup +metadata: + annotations: + meta.upbound.io/example-id: network/v1beta2/frontdoorrulesengine + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + location: West Europe diff --git a/examples/network/v1beta2/pointtositevpngateway.yaml b/examples/network/v1beta2/pointtositevpngateway.yaml new file mode 100644 index 000000000..54d9e62dc --- /dev/null +++ b/examples/network/v1beta2/pointtositevpngateway.yaml @@ -0,0 +1,124 @@ +# SPDX-FileCopyrightText: 2024 The Crossplane Authors +# +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: network.azure.upbound.io/v1beta2 +kind: PointToSiteVPNGateway +metadata: + annotations: + meta.upbound.io/example-id: network/v1beta2/pointtositevpngateway + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + connectionConfiguration: + - name: example-gateway-config + vpnClientAddressPool: + addressPrefixes: + - 10.0.2.0/24 + location: West Europe + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + scaleUnit: 1 + virtualHubIdSelector: + matchLabels: + testing.upbound.io/example-name: example + vpnServerConfigurationIdSelector: + matchLabels: + testing.upbound.io/example-name: example + +--- + +apiVersion: azure.upbound.io/v1beta1 +kind: ResourceGroup +metadata: + annotations: + meta.upbound.io/example-id: network/v1beta2/pointtositevpngateway + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + location: West Europe + +--- + +apiVersion: network.azure.upbound.io/v1beta1 +kind: VirtualHub +metadata: + annotations: + meta.upbound.io/example-id: network/v1beta2/pointtositevpngateway + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + addressPrefix: 10.0.0.0/23 + location: West Europe + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + virtualWanIdSelector: + matchLabels: + testing.upbound.io/example-name: example + +--- + +apiVersion: network.azure.upbound.io/v1beta1 +kind: VirtualWAN +metadata: + annotations: + meta.upbound.io/example-id: network/v1beta2/pointtositevpngateway + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + location: West Europe + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + +--- + +apiVersion: network.azure.upbound.io/v1beta2 +kind: VPNServerConfiguration +metadata: + annotations: + meta.upbound.io/example-id: network/v1beta2/pointtositevpngateway + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + clientRootCertificate: + - name: DigiCert-Federated-ID-Root-CA + publicCertData: | + MIIDuzCCAqOgAwIBAgIQCHTZWCM+IlfFIRXIvyKSrjANBgkqhkiG9w0BAQsFADBn + MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 + d3cuZGlnaWNlcnQuY29tMSYwJAYDVQQDEx1EaWdpQ2VydCBGZWRlcmF0ZWQgSUQg + Um9vdCBDQTAeFw0xMzAxMTUxMjAwMDBaFw0zMzAxMTUxMjAwMDBaMGcxCzAJBgNV + BAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdp + Y2VydC5jb20xJjAkBgNVBAMTHURpZ2lDZXJ0IEZlZGVyYXRlZCBJRCBSb290IENB + MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvAEB4pcCqnNNOWE6Ur5j + QPUH+1y1F9KdHTRSza6k5iDlXq1kGS1qAkuKtw9JsiNRrjltmFnzMZRBbX8Tlfl8 + zAhBmb6dDduDGED01kBsTkgywYPxXVTKec0WxYEEF0oMn4wSYNl0lt2eJAKHXjNf + GTwiibdP8CUR2ghSM2sUTI8Nt1Omfc4SMHhGhYD64uJMbX98THQ/4LMGuYegou+d + GTiahfHtjn7AboSEknwAMJHCh5RlYZZ6B1O4QbKJ+34Q0eKgnI3X6Vc9u0zf6DH8 + Dk+4zQDYRRTqTnVO3VT8jzqDlCRuNtq6YvryOWN74/dq8LQhUnXHvFyrsdMaE1X2 + DwIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNV + HQ4EFgQUGRdkFnbGt1EWjKwbUne+5OaZvRYwHwYDVR0jBBgwFoAUGRdkFnbGt1EW + jKwbUne+5OaZvRYwDQYJKoZIhvcNAQELBQADggEBAHcqsHkrjpESqfuVTRiptJfP + 9JbdtWqRTmOf6uJi2c8YVqI6XlKXsD8C1dUUaaHKLUJzvKiazibVuBwMIT84AyqR + QELn3e0BtgEymEygMU569b01ZPxoFSnNXc7qDZBDef8WfqAV/sxkTi8L9BkmFYfL + uGLOhRJOFprPdoDIUBB+tmCl3oDcBy3vnUeOEioz8zAkprcb3GHwHAK+vHmmfgcn + WsfMLH4JCLa/tRYL+Rw/N3ybCkDp00s0WUZ+AoDywSl0Q/ZEnNY0MsFiw6LyIdbq + M/s/1JRtO3bDSzD9TazRVzn2oBqzSa8VgIo5C1nOnoAKJTlsClJKvIhnRlaLQqk= + location: West Europe + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + vpnAuthenticationTypes: + - Certificate diff --git a/examples/sql/v1beta2/mssqldatabase.yaml b/examples/sql/v1beta2/mssqldatabase.yaml new file mode 100644 index 000000000..55d16f0b9 --- /dev/null +++ b/examples/sql/v1beta2/mssqldatabase.yaml @@ -0,0 +1,82 @@ +# SPDX-FileCopyrightText: 2024 The Crossplane Authors +# +# SPDX-License-Identifier: CC0-1.0 + +apiVersion: sql.azure.upbound.io/v1beta2 +kind: MSSQLDatabase +metadata: + annotations: + meta.upbound.io/example-id: sql/v1beta2/mssqldatabase + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + collation: SQL_Latin1_General_CP1_CI_AS + enclaveType: VBS + licenseType: LicenseIncluded + maxSizeGb: 4 + readScale: true + serverIdSelector: + matchLabels: + testing.upbound.io/example-name: example + skuName: S0 + tags: + foo: bar + zoneRedundant: true + +--- + +apiVersion: sql.azure.upbound.io/v1beta2 +kind: MSSQLServer +metadata: + annotations: + meta.upbound.io/example-id: sql/v1beta2/mssqldatabase + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + administratorLogin: 4dm1n157r470r + administratorLoginPasswordSecretRef: + key: example-key + name: example-secret + namespace: upbound-system + location: West Europe + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + version: "12.0" + +--- + +apiVersion: azure.upbound.io/v1beta1 +kind: ResourceGroup +metadata: + annotations: + meta.upbound.io/example-id: sql/v1beta2/mssqldatabase + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + location: West Europe + +--- + +apiVersion: storage.azure.upbound.io/v1beta2 +kind: Account +metadata: + annotations: + meta.upbound.io/example-id: sql/v1beta2/mssqldatabase + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + accountReplicationType: LRS + accountTier: Standard + location: West Europe + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example diff --git a/examples/sql/v1beta2/mssqlfailovergroup.yaml b/examples/sql/v1beta2/mssqlfailovergroup.yaml new file mode 100644 index 000000000..eb4d712ec --- /dev/null +++ b/examples/sql/v1beta2/mssqlfailovergroup.yaml @@ -0,0 +1,108 @@ +# SPDX-FileCopyrightText: 2024 The Crossplane Authors +# +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: sql.azure.upbound.io/v1beta2 +kind: MSSQLFailoverGroup +metadata: + annotations: + meta.upbound.io/example-id: sql/v1beta2/mssqlfailovergroup + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + databasesRefs: + - name: example + partnerServer: + - idSelector: + matchLabels: + testing.upbound.io/example-name: secondary + readWriteEndpointFailoverPolicy: + graceMinutes: 80 + mode: Automatic + serverIdSelector: + matchLabels: + testing.upbound.io/example-name: primary + tags: + database: example + environment: prod + +--- + +apiVersion: sql.azure.upbound.io/v1beta2 +kind: MSSQLDatabase +metadata: + annotations: + meta.upbound.io/example-id: sql/v1beta2/mssqlfailovergroup + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + collation: SQL_Latin1_General_CP1_CI_AS + maxSizeGb: "200" + serverIdSelector: + matchLabels: + testing.upbound.io/example-name: primary + skuName: S1 + +--- + +apiVersion: sql.azure.upbound.io/v1beta2 +kind: MSSQLServer +metadata: + annotations: + meta.upbound.io/example-id: sql/v1beta2/mssqlfailovergroup + labels: + testing.upbound.io/example-name: primary + name: primary +spec: + forProvider: + administratorLogin: missadministrator + administratorLoginPasswordSecretRef: + key: example-key + name: example-secret + namespace: upbound-system + location: West Europe + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + version: "12.0" + +--- + +apiVersion: sql.azure.upbound.io/v1beta2 +kind: MSSQLServer +metadata: + annotations: + meta.upbound.io/example-id: sql/v1beta2/mssqlfailovergroup + labels: + testing.upbound.io/example-name: secondary + name: secondary +spec: + forProvider: + administratorLogin: missadministrator + administratorLoginPasswordSecretRef: + key: example-key + name: example-secret + namespace: upbound-system + location: North Europe + resourceGroupNameSelector: + matchLabels: + testing.upbound.io/example-name: example + version: "12.0" + +--- + +apiVersion: azure.upbound.io/v1beta1 +kind: ResourceGroup +metadata: + annotations: + meta.upbound.io/example-id: sql/v1beta2/mssqlfailovergroup + labels: + testing.upbound.io/example-name: example + name: example +spec: + forProvider: + location: West Europe