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

[API Center] azure-api-center-create #13985

Merged
merged 9 commits into from May 2, 2024
Merged

[API Center] azure-api-center-create #13985

merged 9 commits into from May 2, 2024

Conversation

dlepow
Copy link
Contributor

@dlepow dlepow commented Apr 17, 2024

PR Checklist

Check these items before submitting a PR...

Contribution Guide

Best Practice Guide

  • [X ] - Please check this box once you've submitted the PR if you've read through the Contribution Guide and best practices checklist.

Changelog

  • v1 of basic template to deploy an instance of API Center service and add a sample API resource. I plan to use this as the basis of an ARM/bicep quickstart

@azure-quickstarts
Copy link
Collaborator

@dlepow - check this PR for updates that may be needed to documentation that references this sample. [This is an automated message. You are receiving it because you are listed as the docOwner in metadata.json.]

@azure-quickstarts
Copy link
Collaborator

@dlepow - check this PR for updates that may be needed to documentation that references this sample. [This is an automated message. You are receiving it because you are listed as the docOwner in metadata.json.]

@dlepow
Copy link
Contributor Author

dlepow commented Apr 18, 2024

@mumian - FYI, this is a basic quickstart template for the API Center service, which will GA in early May. I plan to create ARM/bicep quickstarts around this. If you have suggestions for improving it, please let me know. Thanks!

@mumian
Copy link
Collaborator

mumian commented Apr 19, 2024

@dlepow - As you may already know, Bicep sits over ARM templates. All Bicep files undergo compilation into ARM templates before deployment. Creating Bicep files is considerably easier compared to crafting ARM templates. VSCode offers additional validation and intelligent features that simplify the creation of Bicep files. In the quickstart repository, you only need to provide a Bicep file, as the repository automatically generates an ARM template based on it. I've included the Bicep file for the template. To utilize the Bicep file, you'll need to rename the parameters in the parameter file and add some extra settings in the readme file. Please feel free to schedule a 30-minute session with me next week. I can guide you through the process of creating a Bicep file or converting an ARM template to a Bicep file.

@description('Specifies the location for resources.')
param location string = 'eastus'

param apiCenterName string = 'apicenter${uniqueString(resourceGroup().id)}'
param apiName string = 'first-api'

@Allowed([
'rest'
'soap'
'graphql'
'grpc'
'webhook'
'websocket'
])
param apiType string = 'rest'

resource apiCenterService 'Microsoft.ApiCenter/services@2024-03-01' = {
name: apiCenterName
location: location
properties: {}
}

resource apiCenterWorkspace 'Microsoft.ApiCenter/services/workspaces@2024-03-01' = {
parent: apiCenterService
name: 'default'
properties: {
title: 'Default workspace'
description: 'Default workspace'
}
}

resource api_center_name_default_api_name 'Microsoft.ApiCenter/services/workspaces/apis@2024-03-01' = {
parent: apiCenterWorkspace
name: apiName
properties: {
title: apiName
kind: apiType
externalDocumentation: []
contacts: []
customProperties: {}
}
}

@dlepow
Copy link
Contributor Author

dlepow commented Apr 19, 2024

@mumian - thanks for the help here. I got the order wrong, clearly :). Before troubling you further, et me try updating first with a bicep file and resubmit. :)

@azure-quickstarts
Copy link
Collaborator

@dlepow - check this PR for updates that may be needed to documentation that references this sample. [This is an automated message. You are receiving it because you are listed as the docOwner in metadata.json.]

"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the extra empty line. Also set tab=2 if it is possible.

@dlepow
Copy link
Contributor Author

dlepow commented Apr 22, 2024

@mumian - Fixed formatting. Thanks again for reviewing!

@azure-quickstarts
Copy link
Collaborator

@dlepow - check this PR for updates that may be needed to documentation that references this sample. [This is an automated message. You are receiving it because you are listed as the docOwner in metadata.json.]

@dlepow
Copy link
Contributor Author

dlepow commented Apr 25, 2024

@mumian - Could you please merge this at your convenience, assuming no more changes needed? I'm creating quickstarts that depend on the templates. Many thanks!

Actually, please hold off til I retest. I've found some issues with the resource deployment.

@@ -0,0 +1,43 @@
@description('Specifies the location for resources.')
param location string = 'eastus'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change 'eastus' to resourceGroup().location.

@azure-quickstarts
Copy link
Collaborator

@dlepow - check this PR for updates that may be needed to documentation that references this sample. [This is an automated message. You are receiving it because you are listed as the docOwner in metadata.json.]

@mumian
Copy link
Collaborator

mumian commented Apr 26, 2024

@dlepow - line 21 - The property "sku" does not exist in the resource or type definition.

@azure-quickstarts
Copy link
Collaborator

@dlepow - check this PR for updates that may be needed to documentation that references this sample. [This is an automated message. You are receiving it because you are listed as the docOwner in metadata.json.]

@dlepow
Copy link
Contributor Author

dlepow commented May 1, 2024

@dlepow - line 21 - The property "sku" does not exist in the resource or type definition.

@mumian - Thanks, removed. The property will be added in a forthcoming API version. Happy to incorporate any further suggestions, otherwise I think this is ready to merge.

@mumian mumian merged commit 3678026 into Azure:master May 2, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants