Skip to content

Commit

Permalink
Nginx: embed nginx configuration into deployment resource (hashicor…
Browse files Browse the repository at this point in the history
…p#24276)

* embed nginx configuration into deployment resource

* return deprecate in favour of resource

* ignore not found error for configuration get operation

* format
  • Loading branch information
wuxu92 authored Mar 22, 2024
1 parent 1b52a90 commit 7a1f9f7
Show file tree
Hide file tree
Showing 8 changed files with 402 additions and 521 deletions.
39 changes: 0 additions & 39 deletions internal/services/nginx/nginx_configuration_data_source_test.go

This file was deleted.

8 changes: 8 additions & 0 deletions internal/services/nginx/nginx_configuration_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,15 @@ func (c ConfigurationModel) ToSDKModel() nginxconfiguration.NginxConfiguration {

type ConfigurationResource struct{}

// This resource has been deprecated and will be removed in the next major release.
// Default Nginx Configuration cannot be created anymore for service API breaking change created it automatically
// nginx configuration block is now embedded into nginx deployment resource
func (m *ConfigurationResource) DeprecatedInFavourOfResource() string {
return "azurerm_nginx_deployment"
}

var _ sdk.Resource = (*ConfigurationResource)(nil)
var _ sdk.ResourceWithDeprecationReplacedBy = &ConfigurationResource{}

func (m ConfigurationResource) Arguments() map[string]*pluginsdk.Schema {
return map[string]*pluginsdk.Schema{
Expand Down
257 changes: 0 additions & 257 deletions internal/services/nginx/nginx_configuration_resource_test.go

This file was deleted.

Loading

0 comments on commit 7a1f9f7

Please sign in to comment.