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

azurerm_nginx_deployment - support for the configuration block #24276

Merged
merged 4 commits into from
Mar 22, 2024

Conversation

wuxu92
Copy link
Contributor

@wuxu92 wuxu92 commented Dec 19, 2023

deprecate independent azurerm_nginx_configuration resource and skip exists AccTests for it. This PR supersedes #24041.

--- PASS: TestAccNginxDeployment_withConfiguration (511.17s)
--- PASS: TestAccNginxDeployment_updateWithConfiguration (484.44s)
PASS

@@ -32,6 +32,7 @@ func (a ConfigurationResource) Exists(ctx context.Context, client *clients.Clien
}

func TestAccConfiguration_basic(t *testing.T) {
t.Skipf("Skipping test due to deprecated nginx_configuration resource")
Copy link
Collaborator

Choose a reason for hiding this comment

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

since these are broken and never will be fixed should we just remove them,?

@@ -10,6 +10,8 @@ description: |-

Manages the configuration for a Nginx Deployment.

~> **NOTE** Do not use the independent `azurerm_nginx_configuration` resource anymore due to a [known API issue](https://docs.nginx.com/nginxaas/azure/known-issues/#i-classfa-solid-fa-bug-stylecolore4002bi-terraform-shows-an-error-while-trying-to-manage-configuration-of-a-fresh-deployment-id-891). Use the `configuration` block of [azurerm_nginx_deployment](./nginx_deployment#configuration) instead.
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we just remove this resource documentation entirely as it no longer works on creation & deprecate the resouce?

@wuxu92
Copy link
Contributor Author

wuxu92 commented Mar 5, 2024

AccTest pass
image

Comment on lines 169 to 256




Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

@@ -17,6 +17,10 @@ import (
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation"
)

// This resource has been deprecated and will be removed in the next major release.
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should mark this resource as deprecated with instructions to use the new resource?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated.

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

LGTM 🎫

@katbyte
Copy link
Collaborator

katbyte commented Mar 21, 2024

good to mege once merge conflicts are resolved

@wuxu92
Copy link
Contributor Author

wuxu92 commented Mar 22, 2024

@katbyte rebased main.

image

@katbyte katbyte merged commit 7a1f9f7 into hashicorp:main Mar 22, 2024
32 checks passed
@github-actions github-actions bot added this to the v3.98.0 milestone Mar 22, 2024
@katbyte katbyte changed the title Nginx: embed nginx configuration into deployment resource azurerm_nginx_deployment - support for the configuration block Mar 22, 2024
katbyte added a commit that referenced this pull request Mar 22, 2024
@wuxu92 wuxu92 deleted the nginx/config branch March 22, 2024 07:03
@tombuildsstuff tombuildsstuff modified the milestones: v3.98.0, v3.97.1 Mar 22, 2024
Copy link

This functionality has been released in v3.97.1 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@puneetsarna
Copy link
Contributor

Hi @katbyte @wuxu92 https://docs.nginx.com/nginxaas/azure/changelog/#march-13-2024 mentions that the issue with the default configuration was fixed. Can we please restore the azurerm_nginx_configuration resource?

lemeurherve pushed a commit to jenkins-infra/azure that referenced this pull request Mar 25, 2024
<Actions>
<action
id="f410411e63aff4bb73a81c2aec1d373cf8a903e63b30dee2006b0030d8a94cc8">
        <h3>Bump Terraform `azurerm` provider version</h3>
<details
id="1d9343c012f5434ac9fe8a98135bae3667b399259be16d9b14302ea3bd424a24">
            <summary>Update Terraform lock file</summary>
<p>changes detected:&#xA;&#x9;&#34;hashicorp/azurerm&#34; updated from
&#34;3.96.0&#34; to &#34;3.97.1&#34; in file
&#34;.terraform.lock.hcl&#34;</p>
            <details>
                <summary>3.97.1</summary>
<pre>Changelog retrieved
from:&#xA;&#x9;https://github.com/hashicorp/terraform-provider-azurerm/releases/tag/v3.97.1&#xA;ENHANCEMENTS:&#xA;&#xA;*
`azurerm_nginx_deployment` - support for the `configuration` block
([#24276](https://github.com/hashicorp/terraform-provider-azurerm/issues/24276))&#xA;&#xA;BUG
FIXES:&#xA;&#xA;* `azurerm_data_factory_integration_runtime_self_hosted`
- ensure that autorizationh keys are exported
([#25246](https://github.com/hashicorp/terraform-provider-azurerm/issues/25246))&#xA;*
`azurerm_storage_account` - defaulting the value for `dns_endpoint_type`
to `Standard` when it&#39;s not returned from the Azure API
([#25367](https://github.com/hashicorp/terraform-provider-azurerm/issues/25367))&#xA;&#xA;&#xA;&#xA;</pre>
            </details>
        </details>
<a
href="https://infra.ci.jenkins.io/job/updatecli/job/azure/job/main/69/">Jenkins
pipeline link</a>
    </action>
</Actions>

---

<table>
  <tr>
    <td width="77">
<img src="https://www.updatecli.io/images/updatecli.png" alt="Updatecli
logo" width="50" height="50">
    </td>
    <td>
      <p>
Created automatically by <a
href="https://www.updatecli.io/">Updatecli</a>
      </p>
      <details><summary>Options:</summary>
        <br />
<p>Most of Updatecli configuration is done via <a
href="https://www.updatecli.io/docs/prologue/quick-start/">its
manifest(s)</a>.</p>
        <ul>
<li>If you close this pull request, Updatecli will automatically reopen
it, the next time it runs.</li>
<li>If you close this pull request and delete the base branch, Updatecli
will automatically recreate it, erasing all previous commits made.</li>
        </ul>
        <p>
Feel free to report any issues at <a
href="https://github.com/updatecli/updatecli/issues">github.com/updatecli/updatecli</a>.<br
/>
If you find this tool useful, do not hesitate to star <a
href="https://github.com/updatecli/updatecli/stargazers">our GitHub
repository</a> as a sign of appreciation, and/or to tell us directly on
our <a
href="https://matrix.to/#/#Updatecli_community:gitter.im">chat</a>!
        </p>
      </details>
    </td>
  </tr>
</table>

Co-authored-by: Jenkins Infra Bot (updatecli) <60776566+jenkins-infra-bot@users.noreply.github.com>
puneetsarna added a commit to puneetsarna/terraform-provider-azurerm that referenced this pull request Mar 25, 2024
@wuxu92
Copy link
Contributor Author

wuxu92 commented Mar 26, 2024

@puneetsarna The azurerm_nginx_configuration can be used until the next major release. Since only one default configuration can be created, it makes more sense to embed it into the nginx deployment resource rather than using a separate resource.

@puneetsarna
Copy link
Contributor

@wuxu92 I see what you mean here around the config resource being a singleton. I have called out the explanation around why having the separate resource is very useful for us (see PR description here #25402). Let's continue to discuss it over the other PR.

I understand that the resource was only deprecated and not removed but the users upgrading to the latest terraform won't see any documentation either thinking that the resource was retired (or will be soon). I believe this will also cause user panic as they would have to migrate to the new embedded resource if they want to use the latest provider. Lastly, users might see issues while transitioning to this new embedded resource as the transition would involve downtime:

  • User removes TF resource and tries to use embedded resource.
  • Apply would trigger a conf destruction (🔴 ) and re-application.
  • Config destruction would cause downtime for the user.

Let's continue these discussions over here: #25402

valyria257 added a commit to valyria257/terraform-provider-azurerm that referenced this pull request Apr 24, 2024
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants