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

feat: Adds support for future_inbound and future_outbound in mongodbatlas_project_ip_addresses data source #2934

Merged
merged 4 commits into from
Jan 7, 2025

Conversation

maastha
Copy link
Collaborator

@maastha maastha commented Dec 30, 2024

Description

Adds support for future_inbound and future_outbound in mongodbatlas_project_ip_addresses data source

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

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 fmt and formatted 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

Config:

output "ipAddr_inbound" {
  value = data.mongodbatlas_project_ip_addresses.test.services.clusters[0].future_inbound[0]
}

output "ipAddr_outbound" {
  value = data.mongodbatlas_project_ip_addresses.test.services.clusters[0].future_outbound[1]
}

TF console output:

terraform plan -target data.mongodbatlas_project_ip_addresses.test
data.mongodbatlas_project_ip_addresses.test: Reading...
data.mongodbatlas_project_ip_addresses.test: Read complete after 3s

Changes to Outputs:
  + ipAddr_inbound  = "1.2.3.4"
  + ipAddr_outbound = "5.6.7.8"

You can apply this plan to save these new output values to the Terraform state, without changing any real infrastructure.

@maastha
Copy link
Collaborator Author

maastha commented Jan 2, 2025

Acceptance Tests:
The new attributes have not been included in acceptance tests as it needed to be manually tested by adjusting futureInbound and futureOutbound values from the backend with the help of upstream team.

@maastha maastha marked this pull request as ready for review January 3, 2025 15:23
@maastha maastha requested review from a team as code owners January 3, 2025 15:23
Copy link
Contributor

github-actions bot commented Jan 3, 2025

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

Copy link
Collaborator

@EspenAlbert EspenAlbert left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@lmkerbey-mdb lmkerbey-mdb left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Member

@AgustinBettati AgustinBettati left a comment

Choose a reason for hiding this comment

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

LGTM

"future_inbound": schema.ListAttribute{
ElementType: types.StringType,
Computed: true,
MarkdownDescription: "List of future inbound IP addresses associated with the cluster. If your network allows outbound HTTP requests only to specific IP addresses, you must allow access to the following IP addresses so that your application can connect to your Atlas cluster.",
Copy link
Member

Choose a reason for hiding this comment

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

Should we clarify these fields are temporal and only relevant for AWS clusters? Worth mentioning in the changelog entry as well so there is less friction when they are eventually removed.
If you agree we could also gives the feedback to the upstream team to mention in the API docs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We did share this concern with upstream (see ticket). Happy to sync more on this offline.

@maastha maastha merged commit 67a44c8 into master Jan 7, 2025
44 checks passed
@maastha maastha deleted the CLOUDP-279222-getAllIpAddresses branch January 7, 2025 10:30
svc-apix-Bot added a commit that referenced this pull request Jan 7, 2025
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.

4 participants