Giter VIP home page Giter VIP logo

terraform-provider-shared's Introduction

Terraform Provider Shared module

terraform-provider-shared is a helper module for JFrog's Terraform providers.

Versioning

In general, this repository follows Terraform's Versioning Specification as closely as we can for tagging releases of the module.

License

Copyright (c) 2024 JFrog.

Apache 2.0 licensed, see LICENSE file.

terraform-provider-shared's People

Contributors

alexhung avatar apr-1985 avatar chb0github avatar danielmkn avatar dependabot[bot] avatar kaitimmer avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

terraform-provider-shared's Issues

Enable DEBUG dump of request response payloads

Is your feature request related to a problem? Please describe.
When debugging, it's often very useful to see what went to the server and what can back - and specifically, tying it to TF_LOG. Resty has SetLogger() which is appropriate, but I don't believe resty has a native means to turn this on

Describe the solution you'd like
Install a OnBeforeRequest and an OnAfterResponse that will do this based on TF_LOG=debug and output to the TF log stram

ProjectKey does not accept a hyphen where UI does.

Describe the bug
The client only accepts alphanumerics where the AF UI accepts hyphens. This needs to be loosened to allow project_key to take hyphens.

validation.StringMatch(regexp.MustCompile(`^[a-z0-9]{3,10}$`), "project_key must be 3 - 10 lowercase alphanumeric characters"),

Requirements for and issue

  • A description of the bug
  • A fully functioning terraform snippet that can be copy&pasted (no outside files or ENV vars unless that's part of the issue). If this is not supplied, this issue will likely be closed without any effort expended.
project_key = "depart-bu"

you receive the error `Error: invalid value for project_key (project_key must be 3 - 10 lowercase alphanumeric characters)`
  • Your version of artifactory (you can curl it at $host/artifactory/api/system/version
  • Artifactory SaaS
  • Your version of terraform
  • 1.0.6
  • Your version of terraform provider
  • 6.11.2

Expected behavior
Hyphens can be used in the project_key property

Additional context
We follow a naming scheme of DEPARTMENT-BUSINESSUNIT for our project keys. This is blocking our migration to projects and AF SaaS

Default resty client hard coded to report user agent as terraform-provider-artifactory

Describe the bug
The default resty client is hard coded to report user agent as terraform-provider-artifactory - obviously, this is a left over from it's origins.

Expected behavior
The user agent should match the provider using it

Additional context

SetHeader("content-type", "application/json").
SetHeader("accept", "*/*").
SetHeader("user-agent", "jfrog/terraform-provider-artifactory:"+version).

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.