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 CRUD endpoints for infrastructure access endpoints #3184

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SaiDadireddy
Copy link

@SaiDadireddy SaiDadireddy commented Sep 19, 2024

Description

We are recently added new endpoints for infrastructure access. We are looking to get these endpoints reflected in the terraform provider documentation. This PR contains the client side changes necessary for that. It writes CRUDL functions for the terraform provider to interact with our new endpoints.

These endpoints are working in prod, we are planning to have the OpenAPI schema published to developers.cloudflare.com/api by end of day today.

Has your change been tested?

I've tested these changes through acceptance tests.

Screenshots (if appropriate):

Types of changes

What sort of change does your code introduce/modify?

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • This change is using publicly documented in cloudflare/api-schemas
    and relies on stable APIs.

}

type UpdateInfrastructureTargetParams struct {
ID string `json:"hostname"`

Choose a reason for hiding this comment

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

Don't need json field here

params.Page = 1
}

var applications []Target

Choose a reason for hiding this comment

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

nit: targets

Copy link
Member

Choose a reason for hiding this comment

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

generally you want a collection of singular names. i.e. things := []Thing

}

type UpdateInfrastructureTargetParams struct {
ID string `json:"hostname"`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ID string `json:"hostname"`
ID string `json:"-"`

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

Successfully merging this pull request may close these issues.

3 participants