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

Adopt import-only resources #2875

Closed
sidekick-eimantas opened this issue Oct 24, 2023 · 5 comments
Closed

Adopt import-only resources #2875

sidekick-eimantas opened this issue Oct 24, 2023 · 5 comments
Labels
triage/unresolved Indicates an issue that can not or will not be resolved.

Comments

@sidekick-eimantas
Copy link

Current Terraform and Cloudflare provider version

4.17.0

Description

Just setting up a cf deployment for the first time and some of the resources like cloudflare_access_organization that are import only are a bit of a PITA to deal with. It would be great if this provider could adopt the resources in question at apply time so import is not required.
See https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_proxy_default_target_group for example

Use cases

Easier to set up initial cf deployment

Potential Terraform configuration

...

References

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_proxy_default_target_group
https://registry.terraform.io/providers/hashicorp/aws/3.9.0/docs/resources/default_network_acl
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/default_route_table

@sidekick-eimantas sidekick-eimantas added kind/enhancement Categorizes issue or PR as related to improving an existing feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 24, 2023
@github-actions
Copy link
Contributor

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@jacobbednarz
Copy link
Member

thanks for the issue! unfortunately, this isn't something we're interested in replicating or solving in the provider design itself. as an alternative, you can use cf-terraforming or manually import the resources using the inbuilt primitives.

@jacobbednarz jacobbednarz closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2023
@jacobbednarz jacobbednarz added triage/unresolved Indicates an issue that can not or will not be resolved. and removed kind/enhancement Categorizes issue or PR as related to improving an existing feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 24, 2023
@sidekick-eimantas
Copy link
Author

That's a very interesting reply from a vendor trying to sell their services. I would have expected that this would be left up, to gauge customer interest in the feature before making a decision.
Has this already been discussed somewhere else before?

@jacobbednarz
Copy link
Member

jacobbednarz commented Oct 25, 2023

interesting in what way? it has nothing to do with selling services or gauging interest. the pattern used by those "import only" resources is not something that exists in Cloudflare so there is no reason why we would replicate it or include it as part of the provider.

all resources in the provider can be edited and maintained (including access organizations), unlike your AWS examples. it is up to the user to determine which resources they manage and by which integration.

if you want to get the state of resources that were created automatically on your behalf (such as access organization), you can either manually import the resource with the default configuration from the API or use cf-terraforming to do it for you.

@sidekick-eimantas
Copy link
Author

The reason the AWS provider adopts some of the resources is because they're pre-created by default by AWS. They're not import-only - they're pre-created but the expectation is for the consumer to manage them. Which makes it inconvenient to manage them in IAC, hence the adoption pattern. My understanding is that Cloudflare likewise pre-creates some resources, such as the cloudflare_access_organization, when a customer signs up.

Ofcourse, we can manually import the resources or use cf-terraforming (which is great btw, more companies should provide such tools), but this provider adopting them would provide much higher QOL than the alternative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/unresolved Indicates an issue that can not or will not be resolved.
Projects
None yet
Development

No branches or pull requests

2 participants