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

lbrlabs migration guide, how to replace DomainZoneRecord and CloudProjectUser #194

Closed
idrissneumann opened this issue Jul 31, 2024 · 4 comments

Comments

@idrissneumann
Copy link
Contributor

Hi.

We are planing to replace the lbrlabs legacy provider by this ovh provider.

We followed this guide: https://github.com/ovh/pulumi-ovh/blob/main/docs/how-to-guides/migration-from-lbrlabs-package.md

But we got this error:

AttributeError: module 'pulumi_ovh' has no attribute 'DomainZoneRecord'

The function which is raising this exception:

def register_ovh_domain(record_name, environment, instance_ip, root_dns_zone):
    dns_zone = "{}.{}".format(environment, root_dns_zone)
    sub_domain = "{}.{}".format(record_name, environment)
    log_msg("INFO", "[register_domain][ovh] register domain {}.{}".format(record_name, dns_zone))
    ovh.DomainZoneRecord(sub_domain,
        fieldtype = "A",
        subdomain = sub_domain,
        target = instance_ip,
        ttl = 3600,
        zone = root_dns_zone)

DomainZoneRecord did exists on the lbrlabs provider: https://github.com/lbrlabs/pulumi-ovh/blob/839a4bf77e56f48fb5942e8ea44aa4df93e63472/sdk/python/lbrlabs_ovh/domain_zone_record.py#L187

What is the replacement for this instruction ?

Same question for this instruction:

user = ovh.CloudProjectUser(hashed_bucket_name, service_name = service_name, description = hashed_bucket_name, role_name = "objectstore_operator")

Thanks in advance.

@idrissneumann
Copy link
Contributor Author

In order to add a bit of context, we're using a driver for cwcloud1 which is using both the OpenStack and lbrlabs ovh provider.

And the idea is to first replace completely the lbrlabs provider which is deprecated from by its official successor, then if possible stop combining two providers but make a complete rewrite of our driver only using this provider which looks great.

Footnotes

  1. a platform which provide a Deploymant as a service API, we presented-it here

@idrissneumann
Copy link
Contributor Author

idrissneumann commented Sep 13, 2024

Hi.

So we succeed to migrate replacing ovh.DomainZoneRecord by ovh.domain.ZoneRecord :)

I've opened this pull request to add this to the migration guide here: #228

Thanks

@idrissneumann
Copy link
Contributor Author

Fixed with the merge of #228

Thanks @scraly

@scraly
Copy link
Collaborator

scraly commented Sep 20, 2024

My pleasure :)
And now with version 0.50 you have the first bricks of KMS product and more to come ;).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants