Skip to content

feat: Private Link Online Archive add Azure support#4355

Closed
marcabreracast wants to merge 43 commits intomasterfrom
clean/azure-support
Closed

feat: Private Link Online Archive add Azure support#4355
marcabreracast wants to merge 43 commits intomasterfrom
clean/azure-support

Conversation

@marcabreracast
Copy link
Copy Markdown
Collaborator

@marcabreracast marcabreracast commented Mar 31, 2026

Description

This PR adds Azure support for mongodbatlas_privatelink_endpoint_service_data_federation_online_archive.

Azure fields introduced (already present in autogen code)

As part of Azure support, we are documenting fields that are already defined in the autogenerated implementation.
The following fields are already present in autogen schema/model.

  • customer_endpoint_ip_address: IP address used to connect to the Azure private endpoint.
  • azure_link_id: Link ID that identifies the Azure private endpoint connection.
  • error_message: Error message returned when private endpoint approval/connection fails.
  • status: Current status of the private endpoint connection request.

Additional changes:

  • Adds Azure acceptance coverage for the resource
  • Adds Azure data source acceptance (singular and plural) mirroring the AWS behavior checks.
  • Adds/refactors test config helpers to keep AWS/Azure test config generation consistent.
  • Adds a full Azure example for Data Federation + Online Archive.

Link to related issue(s):

Blocker

This PR is pending https://jira.mongodb.org/browse/CLOUDP-391704.

We should not merge this PR until CLOUDP-391704 is resolved and behaviour is verified as expected.

Link to any related issue(s): CLOUDP-329593

Type of change:

  • Bug fix (non-breaking change which fixes an issue). Please, add the "bug" label to the PR.
  • New feature (non-breaking change which adds functionality). Please, add the "enhancement" label to the PR. A migration guide must be created or updated if the new feature will go in a major version.
  • Breaking change (fix or feature that would cause existing functionality to not work as expected). Please, add the "breaking change" label to the PR. A migration guide must be created or updated.
  • This change requires a documentation update
  • Documentation fix/enhancement

Required Checklist:

  • I have signed the MongoDB CLA
  • I have read the contributing guides
  • I have checked that this change does not generate any credentials and that they are NOT accidentally logged anywhere.
  • I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
  • I have added any necessary documentation (if appropriate)
  • I have run make fix and verified my code
  • If changes include deprecations or removals I have added appropriate changelog entries.
  • If changes include removal or addition of 3rd party GitHub actions, I updated our internal document. Reach out to the APIx Integration slack channel to get access to the internal document.

Further comments

MONGODB_ATLAS_PRIVATE_ENDPOINT_DNS_NAME: ${{ secrets.mongodb_atlas_private_endpoint_dns_name }}
MONGODB_ATLAS_PRIVATE_ENDPOINT_ID: ${{ secrets.mongodb_atlas_private_endpoint_id }}
MONGODB_ATLAS_PRIVATE_ENDPOINT_ID_REPLACE: ${{ secrets.mongodb_atlas_private_endpoint_id_replace }}
MONGODB_ATLAS_PRIVATE_ENDPOINT_ID_AZURE: ${{ secrets.mongodb_atlas_private_endpoint_id_azure }}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

These variables are still not wired to the repo, however would like confirmation whether we have a pre-Azure setup that I can use for this, or use my own instead.

Would prefer the first option as we might risk having the endpoint_id removed at some point.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see we have some azure resources used in our ci (azure_vnet_name, azure_key_vault_name, azure_resource_group_name), would suggesting seeing where those resources live and stay as consistent as possible

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yep correct, got the info I needed doing a bit of digging and added the vars for the test

@marcabreracast marcabreracast marked this pull request as ready for review March 31, 2026 16:39
@marcabreracast marcabreracast requested review from a team as code owners March 31, 2026 16:39
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 31, 2026

APIx bot: a message has been sent to Docs Slack channel
APIx bot: a message has been sent to Docs Slack channel

marcabreracast and others added 10 commits April 1, 2026 15:54
…online archive resource with autogen (#4351)

* Remove _api naming from autogen resource

* Register autogen resource on provider

* Deregister manual resource from provider

* Add migration test to autogen repo

* Update acceptance test naming for autogen resource

* With new endpoint ID added to repo, readding test in order to be able to run in CI and adjust autogen testing

* feat: Add privatelink endpoint service data federation online archive model

* Add missing secret to avoid lint issue

* Add missing secret to acceptance tests workflow

* Fix status field to keep being Computed

* Remove api autogen file to avoid test errors

* Add changelog for new supported import format

* Strip status field from CREATE request

* Fix tests pointing to wrong resource

* Update docs to reflect on import support behaviour

* Fix changelog

* Address doc comments

* Rename test files to match autogen pattern

* Remove manual resource, as it's no longer used

* Send status field hardcoded on CREATE

* Remove manual acceptance tests from network block

* Refactor acceptance tests

* Move config to top of file
Comment thread .changelog/4355.txt
@@ -0,0 +1,5 @@
```release-note:enhancement
resource/mongodbatlas_privatelink_endpoint_service_data_federation_online_archive: Adds Azure support, including `customer_endpoint_ip_address`, `azure_link_id`, `error_message`, and `status`
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

should be three different entries

Comment thread tools/codegen/config.yml
status:
computability:
computed: true
azure_link_id:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe add a quick why this is necessary?


func (r *rs) PreImport(id string) (string, error) {
if strings.Contains(id, "/") {
// Normalized format: project_id/endpoint_id (AWS only).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this comment accurate?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, currently normalized import is only supported on AWS, not for Azure as noted in the docs. We will be keeping legacy support for both Azure and AWS though.

%[11]s
%[12]s
`,
acc.ConfigAzurermProvider(subscriptionID, clientID, clientSecret, tenantID),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this list is very long. Is it worth splitting up and instead using + between the strings?


private_service_connection {
name = "atlas-df-connection"
private_connection_resource_id = %[7]q
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

where is this coming from? Is there no way we can create it within the test?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I've opened a thread with upstream team regarding this value, as I have not identify a way of retrieving this field through the Atlas Admin API so far

`, projectID, endpointID, comment, optionalFields, singularDataSourceConfig, pluralDataSourceConfig)
}

const singularDataSourceConfig = `
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[nit] why moved from the top?

),
},
Check: resource.ComposeAggregateTestCheckFunc(
checkExists(resourceName),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

refactor to use CheckRSAndDS in internal/testutil/acc/attribute_checks.go

Base automatically changed from dev/PrivateLink_OnlineArchive_FinalStep to master April 13, 2026 07:06
@svc-apix-Bot
Copy link
Copy Markdown
Collaborator

This PR has gone 7 days without any activity and meets the project’s definition of "stale". This will be auto-closed if there is no new activity over the next 7 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy!

@marcabreracast
Copy link
Copy Markdown
Collaborator Author

Closed in favor of blocked status for CLOUDP-389847

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants