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

Updating API usage of IPsec tunnels #908

Merged
merged 1 commit into from Jun 7, 2022

Conversation

lungiman
Copy link

@lungiman lungiman commented May 26, 2022

Signed-off-by: Amos Paul amos@cloudflare.com

Description

Cloudflare-go is used by Terraform resource provider for Cloudflare. Updating API calls to Magic Transit IPsec Tunnels to support Terraform.

Has your change been tested?

The changes are mostly w.r.t parsing response objects from API calls to cloudflare. This has been tested using unit tests.

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 (api.cloudflare.com or developers.cloudflare.com) and stable APIs.

@@ -16,70 +16,97 @@ const (
errMagicTransitIPsecTunnelNotDeleted = "When trying to delete IPsec tunnel, API returned deleted: false"
)

// MagicTransitIPsecTunnelPskMetadata contains metadata associated with PSK
type MagicTransitIPsecTunnelPskMetadata struct {
LastGeneratedOn time.Time `json:"last_generated_on,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

you will want the time.Time to be a pointer

Suggested change
LastGeneratedOn time.Time `json:"last_generated_on,omitempty"`
LastGeneratedOn *time.Time `json:"last_generated_on,omitempty"`

magic_transit_ipsec_tunnel.go Outdated Show resolved Hide resolved
@lungiman lungiman changed the title Updating API usage of IPsec tunnels {wip} Updating API usage of IPsec tunnels May 31, 2022
@lungiman lungiman force-pushed the master branch 2 times, most recently from 9d25618 to c3f6d5f Compare June 1, 2022 19:56
@jacobbednarz
Copy link
Member

pending some UI/API changes before we merge this one.

@lungiman lungiman changed the title {wip} Updating API usage of IPsec tunnels Updating API usage of IPsec tunnels Jun 6, 2022
@lungiman
Copy link
Author

lungiman commented Jun 7, 2022

pending some UI/API changes before we merge this one.

We are good to go

@jacobbednarz jacobbednarz merged commit c49a828 into cloudflare:master Jun 7, 2022
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.

None yet

2 participants