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 azure_rm_publicipprefix relate modules #1403

Merged

Conversation

Fred-sun
Copy link
Collaborator

SUMMARY

Add azure_rm_publicipprefix relate modules, fixes #1398

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

azure_rm_publicipprefix.py
azure_rm_publicipprefix_info.py

ADDITIONAL INFORMATION

@Fred-sun Fred-sun added ready_for_review The PR has been modified and can be reviewed and merged new_module_pr Add new modules medium_priority Medium priority labels Jan 11, 2024
@Nothing4You
Copy link

I just tested azure_rm_publicipprefix_info, that is missing the prefix itself currently:

{
    "changed": false,
    "failed": false,
    "publicipprefixes": [
        {
            "custom_ip_prefix": {},
            "etag": "W/\"some-etag-uuid\"",
            "extended_location": null,
            "id": "/subscriptions/subscription-uuid/resourceGroups/my-resource-group/providers/Microsoft.Network/publicIPPrefixes/my-prefix-name",
            "ip_tags": {},
            "location": "westeurope",
            "name": "my-prefix-name",
            "prefix_length": 29,
            "provisioning_state": "Succeeded",
            "public_ip_address_version": "IPv4",
            "sku": {
                "name": "Standard",
                "tier": "Regional"
            },
            "tags": {},
            "type": "Microsoft.Network/publicIPPrefixes",
            "zones": [
                "1",
                "2",
                "3"
            ]
        }
    ]
}

compare to az network public-ip prefix show --resource-group my-resource-group --name my-prefix-name:

{
    "etag": "W/\"some-etag-uuid\"",
    "id": "/subscriptions/subscription-uuid/resourceGroups/my-resource-group/providers/Microsoft.Network/publicIPPrefixes/my-prefix-name",
    "ipPrefix": "a.b.c.d/29",
    "ipTags": [],
    "location": "westeurope",
    "name": "my-prefix-name",
    "prefixLength": 29,
    "provisioningState": "Succeeded",
    "publicIPAddressVersion": "IPv4",
    "publicIPAddresses": [
        {
            "id": "/subscriptions/subscription-uuid/resourceGroups/my-resource-group/providers/Microsoft.Network/publicIPAddresses/vgnwepa01-eth1pip01",
            "resourceGroup": "my-resource-group"
        }
    ],
    "resourceGroup": "my-resource-group",
    "resourceGuid": "some-uuid",
    "sku": {
        "name": "Standard",
        "tier": "Regional"
    },
    "tags": {},
    "type": "Microsoft.Network/publicIPPrefixes",
    "zones": [
        "1",
        "2",
        "3"
    ]
}

@Nothing4You
Copy link

Creation and deletion of a prefix works, but it exhibits the same issue as the info module, where it doesn't display the prefix itself.

@Fred-sun
Copy link
Collaborator Author

@Nothing4You Thanks for your feedback! I will recheck it!

@Nothing4You
Copy link

azure_rm_publicipprefix_info seems to be fine now, thanks.

the changes that were done to azure_rm_publicipprefix_info now just need to be synced to azure_rm_publicipprefix as well, as that is still missing some of them, at least the following:

  • missing:
    • ip_prefix
    • public_ip_addresses
    • resource_guid
  • incorrect defaults:
    • ip_tags defaulting to {} instead of []
    • tags defaulting to null instead of {}

@Fred-sun
Copy link
Collaborator Author

@Nothing4You It has been changed, thanks for your suggestion!

@xuzhang3 xuzhang3 merged commit a4bff3e into ansible-collections:dev Jan 22, 2024
@Fred-sun Fred-sun deleted the Add_azure_rm_publicipprefix_module branch January 23, 2024 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium_priority Medium priority new_module_pr Add new modules ready_for_review The PR has been modified and can be reviewed and merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add azure_rm_publicipprefix
3 participants