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

Add support for Object Storage Gen. 2 #647

Merged
merged 2 commits into from
Feb 18, 2025

Conversation

lgarber-akamai
Copy link
Contributor

@lgarber-akamai lgarber-akamai commented Feb 12, 2025

📝 Description

This pull request implements modules relating to Object Storage Gen. 2. Because the Linode Ansible collection does not implement Object Storage bucket and object modules (instead expecting users to use the aws_s3 module), this PR only implements the linode.cloud.object_storage_endpoint_list module.

Open Questions:

  • Is it worth implementing a linode.cloud.object_storage_bucket_access_info module? I think the same info can be obtained directly using S3 but I'm not 100% sure.

✔️ How to Test

The following test steps assume you have pulled down this PR locally and run make install.

Integration Testing

make TEST_ARGS="-v object_storage_endpoint_list" test-int

Manual Testing

  1. In an ansible_linode sandbox environment (e.g. dx-devenv), run the following playbook:
---
- name: ansible_linode Sandbox Playbook
  hosts: localhost
  tasks:
    - name: List all Object Storage endpoints
      linode.cloud.object_storage_endpoint_list: {}
      register: list_endpoints

    - debug:
        var: list_endpoints
  1. Ensure the output of the debug task looks similar to the following:
ok: [localhost] => {
    "list_endpoints": {
        "changed": false,
        "endpoints": [
            {
                "endpoint_type": "E1",
                "region": "jp-osa",
                "s3_endpoint": "jp-osa-1.linodeobjects.com"
            },
            {
                "endpoint_type": "E1",
                "region": "nl-ams",
                "s3_endpoint": "nl-ams-1.linodeobjects.com"
            },
            {
                "endpoint_type": "E1",
                "region": "us-sea",
                "s3_endpoint": "us-sea-1.linodeobjects.com"
            },
            {
                "endpoint_type": "E1",
                "region": "fr-par",
                "s3_endpoint": "fr-par-1.linodeobjects.com"
            },
            {
                "endpoint_type": "E1",
                "region": "us-lax",
                "s3_endpoint": "us-lax-1.linodeobjects.com"
            },
            {
                "endpoint_type": "E1",
                "region": "us-ord",
                "s3_endpoint": "us-ord-1.linodeobjects.com"
            },
            {
                "endpoint_type": "E0",
                "region": "eu-central",
                "s3_endpoint": "eu-central-1.linodeobjects.com"
            },
            {
                "endpoint_type": "E1",
                "region": "it-mil",
                "s3_endpoint": "it-mil-1.linodeobjects.com"
            },
            {
                "endpoint_type": "E1",
                "region": "es-mad",
                "s3_endpoint": "es-mad-1.linodeobjects.com"
            },
            {
                "endpoint_type": "E1",
                "region": "us-mia",
                "s3_endpoint": "us-mia-1.linodeobjects.com"
            },
            {
                "endpoint_type": "E3",
                "region": "gb-lon",
                "s3_endpoint": "gb-lon-1.linodeobjects.com"
            },
            {
                "endpoint_type": "E1",
                "region": "id-cgk",
                "s3_endpoint": "id-cgk-1.linodeobjects.com"
            },
            {
                "endpoint_type": "E1",
                "region": "se-sto",
                "s3_endpoint": "se-sto-1.linodeobjects.com"
            },
            {
                "endpoint_type": "E1",
                "region": "us-iad",
                "s3_endpoint": "us-iad-1.linodeobjects.com"
            },
            {
                "endpoint_type": "E1",
                "region": "in-maa",
                "s3_endpoint": "in-maa-1.linodeobjects.com"
            },
            {
                "endpoint_type": "E2",
                "region": "au-mel",
                "s3_endpoint": "au-mel-1.linodeobjects.com"
            },
            {
                "endpoint_type": "E0",
                "region": "us-southeast",
                "s3_endpoint": "us-southeast-1.linodeobjects.com"
            },
            {
                "endpoint_type": "E0",
                "region": "ap-south",
                "s3_endpoint": "ap-south-1.linodeobjects.com"
            },
            {
                "endpoint_type": "E0",
                "region": "us-east",
                "s3_endpoint": "us-east-1.linodeobjects.com"
            },
            {
                "endpoint_type": "E2",
                "region": "sg-sin-2",
                "s3_endpoint": "sg-sin-1.linodeobjects.com"
            },
            {
                "endpoint_type": "E1",
                "region": "br-gru",
                "s3_endpoint": "br-gru-1.linodeobjects.com"
            }
        ],
        "failed": false
    }
}

@lgarber-akamai lgarber-akamai added the new-feature for new features in the changelog. label Feb 12, 2025
@lgarber-akamai lgarber-akamai marked this pull request as ready for review February 12, 2025 19:26
@lgarber-akamai lgarber-akamai requested a review from a team as a code owner February 12, 2025 19:26
@lgarber-akamai lgarber-akamai requested review from yec-akamai and ezilber-akamai and removed request for a team February 12, 2025 19:26
Copy link
Contributor

@ezilber-akamai ezilber-akamai left a comment

Choose a reason for hiding this comment

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

LGTM! Integration and manual tests working as expected.

Copy link
Contributor

@yec-akamai yec-akamai left a comment

Choose a reason for hiding this comment

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

Nice work! Agree that we don't have to implement the info module since user can use S3 directly.

@lgarber-akamai lgarber-akamai merged commit 8a17a9a into linode:dev Feb 18, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature for new features in the changelog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants