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

daily_sync_time does not get updated in Fivetran #3

Open
solomonshorser opened this issue May 31, 2023 · 5 comments
Open

daily_sync_time does not get updated in Fivetran #3

solomonshorser opened this issue May 31, 2023 · 5 comments

Comments

@solomonshorser
Copy link

When I change the daily_sync_time for a connector using this pulumi provider, it does not get updated in Fivetran. Running pulumi up will continue to show diffs on this property, and if I look at the Fivetran UI, it is not updated there either.

If I try to update a connector's daily_sync_time with Terraform, the update takes and the change is visible in Fivetran.

@benesch
Copy link
Member

benesch commented May 31, 2023 via email

@solomonshorser
Copy link
Author

solomonshorser commented Jun 9, 2023

From what I can see, fivetran_connector_schedule (https://github.com/fivetran/terraform-provider-fivetran/blob/3c225786a50fe1679955500ebab79c3de85d7c56/fivetran/provider.go#L27) is a new object that will manage schedule info for a connector - I think this is missing in the pulumi-fivetran code. I added "fivetran_connector_schedule": {Tok: makeResource(mainMod, "ConnectorSchedule")}, to provider/provider.go (in the Resources map) and it now builds without errors, though it still doesn't seem to have an effect on the actual schedule time in Fivetran when I use it, but I think there are few more pieces missing. I'm not familiar with golang, or how these Pulumi plugins work, but if I can get things working, I'll put it into a PR.

@solomonshorser
Copy link
Author

solomonshorser commented Jul 19, 2023

@benesch I had started working on this, but then I saw you released v0.1.12 and I realise you beat me to it!
I tried the new version out, using the new ConnectorSchedule class, but I get a weird error:

     Type                          Name                                                                                Plan       Info
     pulumi:pulumi:Stack           my_stack
 ~   ├─ pulumi:providers:fivetran  provider                                                                            update     [diff: ~pluginDownloadURL,version]
     └─ pulumi:providers:fivetran  default_0_1_12_https_/github.com/benesch/pulumi-fivetran/releases/download/v0.1.12             1 error


Diagnostics:
  pulumi:providers:fivetran (default_0_1_12_https_/github.com/benesch/pulumi-fivetran/releases/download/v0.1.12):
    error: rpc error: code = InvalidArgument desc = required configuration keys were missing

The code looks like this:

        connector = Connector(resource_name=target_name,
                              destination_schema=destination_schema,
                              opts=opts,
                              group_id=self.group_id,
                              service="s3",
                              run_setup_tests="true",
                              config=connector_config,
                              trust_certificates=False,
                              )
        
        schedule = ConnectorSchedule(resource_name= self.db_name.upper() + "_s3_schedule",
                                    args=ConnectorScheduleArgs(
                                            connector_id=connector.id,
                                            daily_sync_time=self.s3_sync_time,
                                            paused=self.start_paused,
                                            pause_after_trial=self.pause_after_trial,
                                            schedule_type="AUTO",
                                            sync_frequency=self.sync_frequency,
                                        ),
                                     opts=ResourceOptions(depends_on=[connector]))

Any ideas about what code = InvalidArgument desc = required configuration keys were missing might mean?

@benesch
Copy link
Member

benesch commented Jul 19, 2023

Afraid not, sorry! Maybe the new version of the provider requires an argument that you're not passing?

@solomonshorser
Copy link
Author

I thought I set everything that there was to set. It's frustrating that pulumi won't say which required keys are missing.

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