Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions cfn-resources/README.md
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

All the resources we have support import because all resources have full CRUD support.

Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,20 @@ Note these are also hosted on AWS CloudFormation Public Registry under Third Par
| 47 | stream-connection | ![Build](https://img.shields.io/badge/GA-green) | [example](../examples/atlas-streams/stream-connection/stream-connection.json) | [./stream-connection/test](./stream-connection/test)
|47 | resource-policy | ![Build](https://img.shields.io/badge/Beta-yellow) | [example](../examples/resource-policy/resource-policy.json) | [./resource-policy/test](./resource-policy/test)

## Resource Import Operations

All MongoDB Atlas AWS CloudFormation resources support the import operation, allowing you to bring existing Atlas resources under CloudFormation management. When importing resources, please consider the following:
Copy link
Member

Choose a reason for hiding this comment

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

Our main README file calls out import as a limitation: https://github.com/mongodb/mongodbatlas-cloudformation-resources?tab=readme-ov-file#limitations

We can definitely adjust that content, also thinking if we do a brief mention of import functionality in the main readme and reference here for more visibility.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Addressed, thanks!

Copy link
Collaborator

@marcosuma marcosuma Mar 12, 2025

Choose a reason for hiding this comment

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

@oarbusi should we also mention that Import is available in the main readme and link to here, like Agustin suggested?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done in a514b82


### Import Requirements and Considerations

1. **DeletionPolicy Attribute**: Your resource template must include the [DeletionPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html) attribute in order to specify what happens to the resource when it is removed from the stack.

2. **UPDATE Operation Required**: The import operation executes the UPDATE operation behind the scenes. Therefore, UPDATE functionality must be properly implemented for the resource type to support import.
Copy link
Collaborator

Choose a reason for hiding this comment

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

thank you, the nit I have is that this should be linked to some AWS documentation or at least specify that it's how AWS CFN works

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added some link explaining the import flow where they explain the change set being created and when it is executed


3. **Outputs Restrictions**: As part of the import operation, you cannot modify or add [Outputs](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.html) to the template. However, you can add outputs after the import is complete.

For more details, refer to the [official AWS Resource Import documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resource-import.html).

Legend
---
| Badge | Meaning |
Expand Down
Loading