-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4305 from terraform-providers/f/marketplace-agree…
…ment New Resource: `azurerm_marketplace_agreement`
- Loading branch information
Showing
55 changed files
with
1,793 additions
and
6,765 deletions.
There are no files selected for viewing
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
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
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
8 changes: 6 additions & 2 deletions
8
azurerm/internal/common/client.go → azurerm/internal/clients/client.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 |
---|---|---|
@@ -1,8 +1,12 @@ | ||
package common | ||
package clients | ||
|
||
import "context" | ||
import ( | ||
"context" | ||
) | ||
|
||
type Client struct { | ||
// StopContext is used for propagating control from Terraform Core (e.g. Ctrl/Cmd+C) | ||
StopContext context.Context | ||
|
||
Compute ComputeClient | ||
} |
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,90 @@ | ||
package clients | ||
|
||
import ( | ||
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute" | ||
"github.com/Azure/azure-sdk-for-go/services/marketplaceordering/mgmt/2015-06-01/marketplaceordering" | ||
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/common" | ||
) | ||
|
||
type ComputeClient struct { | ||
AvailabilitySetsClient *compute.AvailabilitySetsClient | ||
DisksClient *compute.DisksClient | ||
GalleriesClient *compute.GalleriesClient | ||
GalleryImagesClient *compute.GalleryImagesClient | ||
GalleryImageVersionsClient *compute.GalleryImageVersionsClient | ||
ProximityPlacementGroupsClient *compute.ProximityPlacementGroupsClient | ||
MarketplaceAgreementsClient *marketplaceordering.MarketplaceAgreementsClient | ||
ImagesClient *compute.ImagesClient | ||
SnapshotsClient *compute.SnapshotsClient | ||
UsageClient *compute.UsageClient | ||
VMExtensionImageClient *compute.VirtualMachineExtensionImagesClient | ||
VMExtensionClient *compute.VirtualMachineExtensionsClient | ||
VMScaleSetClient *compute.VirtualMachineScaleSetsClient | ||
VMClient *compute.VirtualMachinesClient | ||
VMImageClient *compute.VirtualMachineImagesClient | ||
} | ||
|
||
func NewComputeClient(o *common.ClientOptions) *ComputeClient { | ||
availabilitySetsClient := compute.NewAvailabilitySetsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) | ||
o.ConfigureClient(&availabilitySetsClient.Client, o.ResourceManagerAuthorizer) | ||
|
||
disksClient := compute.NewDisksClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) | ||
o.ConfigureClient(&disksClient.Client, o.ResourceManagerAuthorizer) | ||
|
||
galleriesClient := compute.NewGalleriesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) | ||
o.ConfigureClient(&galleriesClient.Client, o.ResourceManagerAuthorizer) | ||
|
||
galleryImagesClient := compute.NewGalleryImagesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) | ||
o.ConfigureClient(&galleryImagesClient.Client, o.ResourceManagerAuthorizer) | ||
|
||
galleryImageVersionsClient := compute.NewGalleryImageVersionsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) | ||
o.ConfigureClient(&galleryImageVersionsClient.Client, o.ResourceManagerAuthorizer) | ||
|
||
imagesClient := compute.NewImagesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) | ||
o.ConfigureClient(&imagesClient.Client, o.ResourceManagerAuthorizer) | ||
|
||
marketplaceAgreementsClient := marketplaceordering.NewMarketplaceAgreementsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) | ||
o.ConfigureClient(&marketplaceAgreementsClient.Client, o.ResourceManagerAuthorizer) | ||
|
||
proximityPlacementGroupsClient := compute.NewProximityPlacementGroupsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) | ||
o.ConfigureClient(&proximityPlacementGroupsClient.Client, o.ResourceManagerAuthorizer) | ||
|
||
snapshotsClient := compute.NewSnapshotsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) | ||
o.ConfigureClient(&snapshotsClient.Client, o.ResourceManagerAuthorizer) | ||
|
||
usageClient := compute.NewUsageClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) | ||
o.ConfigureClient(&usageClient.Client, o.ResourceManagerAuthorizer) | ||
|
||
vmExtensionImageClient := compute.NewVirtualMachineExtensionImagesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) | ||
o.ConfigureClient(&vmExtensionImageClient.Client, o.ResourceManagerAuthorizer) | ||
|
||
vmExtensionClient := compute.NewVirtualMachineExtensionsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) | ||
o.ConfigureClient(&vmExtensionClient.Client, o.ResourceManagerAuthorizer) | ||
|
||
vmImageClient := compute.NewVirtualMachineImagesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) | ||
o.ConfigureClient(&vmImageClient.Client, o.ResourceManagerAuthorizer) | ||
|
||
vmScaleSetClient := compute.NewVirtualMachineScaleSetsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) | ||
o.ConfigureClient(&vmScaleSetClient.Client, o.ResourceManagerAuthorizer) | ||
|
||
vmClient := compute.NewVirtualMachinesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) | ||
o.ConfigureClient(&vmClient.Client, o.ResourceManagerAuthorizer) | ||
|
||
return &ComputeClient{ | ||
AvailabilitySetsClient: &availabilitySetsClient, | ||
DisksClient: &disksClient, | ||
GalleriesClient: &galleriesClient, | ||
GalleryImagesClient: &galleryImagesClient, | ||
GalleryImageVersionsClient: &galleryImageVersionsClient, | ||
ImagesClient: &imagesClient, | ||
MarketplaceAgreementsClient: &marketplaceAgreementsClient, | ||
ProximityPlacementGroupsClient: &proximityPlacementGroupsClient, | ||
SnapshotsClient: &snapshotsClient, | ||
UsageClient: &usageClient, | ||
VMExtensionImageClient: &vmExtensionImageClient, | ||
VMExtensionClient: &vmExtensionClient, | ||
VMScaleSetClient: &vmScaleSetClient, | ||
VMClient: &vmClient, | ||
VMImageClient: &vmImageClient, | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
package compute | ||
|
||
import ( | ||
"github.com/hashicorp/terraform/helper/schema" | ||
) | ||
|
||
type Registration struct{} | ||
|
||
// Name is the name of this Service | ||
func (r Registration) Name() string { | ||
return "Compute" | ||
} | ||
|
||
// SupportedDataSources returns the supported Data Sources supported by this Service | ||
func (r Registration) SupportedDataSources() map[string]*schema.Resource { | ||
return map[string]*schema.Resource{} | ||
} | ||
|
||
// SupportedResources returns the supported Resources supported by this Service | ||
func (r Registration) SupportedResources() map[string]*schema.Resource { | ||
return map[string]*schema.Resource{} | ||
} |
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
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
Oops, something went wrong.