-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools/importer-rest-api-specs: adding Common IDs for App Service / Ap…
…p Service Plan / App Service Environment
- Loading branch information
1 parent
cd392f6
commit d767bac
Showing
4 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
tools/importer-rest-api-specs/components/parser/resourceids/common_id_app_service.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package resourceids | ||
|
||
import ( | ||
"github.com/hashicorp/pandora/tools/importer-rest-api-specs/models" | ||
"github.com/hashicorp/pandora/tools/sdk/resourcemanager" | ||
) | ||
|
||
var _ commonIdMatcher = commonIdAppService{} | ||
|
||
type commonIdAppService struct{} | ||
|
||
func (c commonIdAppService) id() models.ParsedResourceId { | ||
name := "AppService" | ||
return models.ParsedResourceId{ | ||
CommonAlias: &name, | ||
Constants: map[string]resourcemanager.ConstantDetails{}, | ||
Segments: []resourcemanager.ResourceIdSegment{ | ||
models.StaticResourceIDSegment("subscriptions", "subscriptions"), | ||
models.SubscriptionIDResourceIDSegment("subscriptionId"), | ||
models.StaticResourceIDSegment("resourceGroups", "resourceGroups"), | ||
models.ResourceGroupResourceIDSegment("resourceGroupName"), | ||
models.StaticResourceIDSegment("providers", "providers"), | ||
models.ResourceProviderResourceIDSegment("resourceProvider", "Microsoft.Web"), | ||
models.StaticResourceIDSegment("sites", "sites"), | ||
models.UserSpecifiedResourceIDSegment("siteName"), | ||
}, | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...mporter-rest-api-specs/components/parser/resourceids/common_id_app_service_environment.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package resourceids | ||
|
||
import ( | ||
"github.com/hashicorp/pandora/tools/importer-rest-api-specs/models" | ||
"github.com/hashicorp/pandora/tools/sdk/resourcemanager" | ||
) | ||
|
||
var _ commonIdMatcher = commonIdAppServiceEnvironment{} | ||
|
||
type commonIdAppServiceEnvironment struct{} | ||
|
||
func (c commonIdAppServiceEnvironment) id() models.ParsedResourceId { | ||
name := "AppServiceEnvironment" | ||
return models.ParsedResourceId{ | ||
CommonAlias: &name, | ||
Constants: map[string]resourcemanager.ConstantDetails{}, | ||
Segments: []resourcemanager.ResourceIdSegment{ | ||
models.StaticResourceIDSegment("subscriptions", "subscriptions"), | ||
models.SubscriptionIDResourceIDSegment("subscriptionId"), | ||
models.StaticResourceIDSegment("resourceGroups", "resourceGroups"), | ||
models.ResourceGroupResourceIDSegment("resourceGroupName"), | ||
models.StaticResourceIDSegment("providers", "providers"), | ||
models.ResourceProviderResourceIDSegment("resourceProvider", "Microsoft.Web"), | ||
models.StaticResourceIDSegment("hostingEnvironments", "hostingEnvironments"), | ||
models.UserSpecifiedResourceIDSegment("hostingEnvironmentName"), | ||
}, | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
tools/importer-rest-api-specs/components/parser/resourceids/common_id_app_service_plan.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package resourceids | ||
|
||
import ( | ||
"github.com/hashicorp/pandora/tools/importer-rest-api-specs/models" | ||
"github.com/hashicorp/pandora/tools/sdk/resourcemanager" | ||
) | ||
|
||
var _ commonIdMatcher = commonIdAppServicePlan{} | ||
|
||
type commonIdAppServicePlan struct{} | ||
|
||
func (c commonIdAppServicePlan) id() models.ParsedResourceId { | ||
name := "AppServicePlan" | ||
return models.ParsedResourceId{ | ||
CommonAlias: &name, | ||
Constants: map[string]resourcemanager.ConstantDetails{}, | ||
Segments: []resourcemanager.ResourceIdSegment{ | ||
models.StaticResourceIDSegment("subscriptions", "subscriptions"), | ||
models.SubscriptionIDResourceIDSegment("subscriptionId"), | ||
models.StaticResourceIDSegment("resourceGroups", "resourceGroups"), | ||
models.ResourceGroupResourceIDSegment("resourceGroupName"), | ||
models.StaticResourceIDSegment("providers", "providers"), | ||
models.ResourceProviderResourceIDSegment("resourceProvider", "Microsoft.Web"), | ||
models.StaticResourceIDSegment("serverFarms", "serverFarms"), | ||
models.UserSpecifiedResourceIDSegment("serverFarmName"), | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters