这是indexloc提供的服务,不要输入任何密码
Skip to content

Implement vercel_edge_config_item #196

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

Conversation

LukeSheard
Copy link
Contributor

@LukeSheard LukeSheard commented Jul 29, 2024

Add a resource for managing individual edge_config_item resources. Each resource represents an individual (key, value) pair for an Edge Config.

resource "vercel_edge_config" "example" {
  name = "example"
}

resource "vercel_project" "example" {
  name = "edge-config-example"
}

resource "vercel_edge_config_item" "example": {
  edge_config_id = vercel_edge_config.example.id
  key            = "key"
  value          = "value"
}

I've essentially used the upsert API from the documentation for managing items.

Comment on lines +22 to +24
type edgeConfigItemResource struct {
client *client.Client
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This needs wiring up in the provider.go file. We could also do with tests, and given there's a fairly sane Read method I think we could add a data source too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've wired this up and added an equivalent data source.

@dglsparsons
Copy link
Collaborator

Hi @LukeSheard, is there a reason you closed this? Apologies for not getting back to you sooner on this too - I've been off on Paternity leave for a while. I can take over this PR though, and add support for this.

@LukeSheard
Copy link
Contributor Author

@dglsparsons I think it was by accident to be honest!

@LukeSheard LukeSheard reopened this Oct 10, 2024
@LukeSheard
Copy link
Contributor Author

@dglsparsons What is missing at this point to get this merged? 😄

@dglsparsons
Copy link
Collaborator

Just tests.

@dglsparsons
Copy link
Collaborator

FYI @LukeSheard i'll raise a PR in the morning with tests added. Code is complete and it seems to work like a charm with a couple of minor fixes. 🙌

@LukeSheard
Copy link
Contributor Author

@dglsparsons Thanks so much, I haven't had a chance to test the provider locally directly to validate that it works properly. Very appreciative of your support 🙇

@dglsparsons
Copy link
Collaborator

Closed in favour of #210

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.

2 participants