Giter Site home page Giter Site logo

rework-space-com / terraform-provider-apisix Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 98 KB

Terraform provider for Apache APISIX

Home Page: https://registry.terraform.io/providers/rework-space-com/apisix/latest

License: Mozilla Public License 2.0

Makefile 0.11% Go 99.89%
api-gateway apisix terraform-provider

terraform-provider-apisix's People

Contributors

holubovskyi avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

terraform-provider-apisix's Issues

Updating upstream's "service_name" requires recreation of upstream

Hey,

when using this terraform-provider, changing the service_name of an existing upstream that is in use (referenced by a service) doesn't work. Terraform complains, that it can't replace the upstream, as it's in use by a service (which is correct), but changing the service_name shouldn't require a replacement anyway, because you can change that on the fly. The following curl command can serve as example:

curl http://127.0.0.1:9180/apisix/admin/upstreams/1 -H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PATCH -d '{"service_name":"new.service.name"}'

Reference: https://apisix.apache.org/docs/apisix/admin-api/#upstream

Terraform Version, Provider Version and APISIX Version

Terraform version: Terraform v1.6.6
APISIX provider version: 1.1.0
APISIX version: 3.8.0

Affected Resource(s)

  • apisix_upstream

Terraform Configuration Files

# provider configuration excluded

resource "apisix_upstream" "example_upstream" {
    name           = "example-service-upstream"
    discovery_type = "dns"
    service_name   = "example.service.local"
    scheme         = "http"
    type           = "roundrobin"
}

resource "apisix_service" "example_service" {
    name        = "example-service"
    upstream_id = apisix_upstream.example_upstream.id
}

Steps to Reproduce

  1. terraform apply --> do the initial apply
  2. change the service_name of the example_upstream - anything will do
  3. terraform apply --> trigger another apply to update the upstream's service_name

Expected Behavior

When changing the service_name the resource should get a simple update, like the curl command show at the top.

Actual Behavior

When changing the service_name the resource gets replaced, which doesn't work, because it's referenced by a service.

Community Note

  • Please vote on this issue by adding a ๐Ÿ‘ reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Fix compatibility issue with resource `apisix_ssl_certificate`

Description

Resource apisix_ssl_certificate isn't compatible with the Apisix versions >= 3.6.0. Version 3.6.0 added strict schema validation for the core resources.
The error cause is usage on the custom schema fields validity_end and validity_start. These fields were introduced to show the certificate creation and expiration dates on the Apisix dashboard.

=== RUN   TestSSLResource
    ssl_resource_test.go:10: Step 1/3 error: Error running apply: exit status 1
        
        Error: Error creating SSL certificate
        
          with apisix_ssl_certificate.test,
          on terraform_plugin_test.tf line 7, in resource "apisix_ssl_certificate" "test":
           7: resource "apisix_ssl_certificate" "test" {
        
        Could not create SSL certificate, unexpected error: status: 400, body:
        {"error_msg":"invalid configuration: additional properties forbidden, found
        validity_start"}
        
--- FAIL: TestSSLResource (0.22s)

References

Community Note

  • Please vote on this issue by adding a ๐Ÿ‘ reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Remove validity_start and validity_end attributes of the ssl_certificate resource

Description

Remove the validity_start and validity_end attributes of the ssl_certificate resource because their usage incompatible with APISIX 3.6.0.

References

Community Note

  • Please vote on this issue by adding a ๐Ÿ‘ reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Update provider to support Apisix v3.8.0

Description

Ensure that the provider supports Apisix v3.8.0

  • Update the Apisix version used in the docker-compose configuration
  • Update versions of the GitHub actions
  • #12
  • Add newer terraform versions to the acceptance test
  • #10

References

Community Note

  • Please vote on this issue by adding a ๐Ÿ‘ reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Fix vulnerability issues (by updating the terraform-provider-framework)

Description

Update the version of the terraform-provider-framework to resolve vulnerability issues

References

Community Note

  • Please vote on this issue by adding a ๐Ÿ‘ reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.