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

feat: render provider file skeleton #64

Merged
merged 21 commits into from
Apr 24, 2024

Commits on Apr 13, 2024

  1. Configuration menu
    Copy the full SHA
    ee89b54 View commit details
    Browse the repository at this point in the history
  2. removing unused "regexp"

    shinmog committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    f07c005 View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2024

  1. add resource feature

    pimielowski committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    091e310 View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2024

  1. Remove unnecessary array and bool files from translate/normalized pac…

    …kage
    
    In this update, the "array.go" and "bool.go" files from the "translate/normalized" package were deleted. These updates streamline the overall structure and improve code readability.
    pimielowski committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    186f421 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    533cd4e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    65a3049 View commit details
    Browse the repository at this point in the history
  4. Remove unused naming functions and constants

    Removed unused functions and constants in the `names.go` file under the naming package. These include `PathNameToSdkPath`, `AsPackageName`, `SchemaNameToSdkPath`, `MakePathFrom` functions and `DelayNaming` constant. The deletion resulted in a cleaner and leaner code base.
    pimielowski committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    45245e9 View commit details
    Browse the repository at this point in the history
  5. Refactor terraform resource implementation in golang package

    The refactoring simplifies the usage of template functions in terraform_resource.go by utilizing camel casing and restructuring resource object. Also, methods for creating, updating, reading, and deleting of the Terraform state were introduced, preparing for future data operations and error handling. Placeholder structs and functions were added for future completion.
    pimielowski committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    def31ff View commit details
    Browse the repository at this point in the history
  6. Refactor generator.go and prepare for datasource integration

    The code in generator.go has been modularized into more specific functions for creating a file path and writing to a file. These modifications enhance the readability of the code and conform with the single-responsibility principle. Comment placeholders were also added in codegen.go to earmark places for future integration with datasources. Moreover, the fixed class name 'ExampleResource' was replaced with a dynamic one in terraform_resource.go.
    pimielowski committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    5a5af4a View commit details
    Browse the repository at this point in the history
  7. Refactor Terraform resource generation in generator

    Changed the process involved in generating a Terraform resource. This specifically involved renaming the `Resource` function to `GenerateTerraformResource` for clarity, and implementing a new template string for better structuring and future modifications. This makes the code more maintainable and improves resource creation's overall robustness.
    pimielowski committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    8b4a5e2 View commit details
    Browse the repository at this point in the history
  8. Add data source support and refactor Terraform code generation

    This commit introduces builds to support data sources in the Terraform code generation pathway. The data source list logic is no longer commented out, suggesting it's functioning as intended. Simultaneously, the code generator for resources has been significantly refactored. The file 'terraform_resource.go' was deleted and instead implementation for resource generation was moved into the 'terraform_provider.go' file with appropriate changes.
    pimielowski committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    210213b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    081cddd View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2024

  1. Configuration menu
    Copy the full SHA
    206e0ec View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2024

  1. Improve generation of Terraform resources and data sources

    This update enhances the process of generating Terraform resources and data sources by refining the template generation function and introducing a new naming convention structure. It adds a new function that generates a Terraform provider file. Additionally, it expands cases and imports in the 'RenderImports' function, maximizing its utility and robustness.
    pimielowski committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    ee24252 View commit details
    Browse the repository at this point in the history
  2. Add test for Terraform provider generation

    A test has been added to ensure the successful generation of a Terraform resource using valid inputs. Additionally, a null check was added to the generateTemplate function to prevent errors when the Terraform provider's code is not initialized.
    pimielowski committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    979e17b View commit details
    Browse the repository at this point in the history
  3. Refactor Terraform provider and specification generation process

    This commit primarily changes the process of generating Terraform providers and specs. It introduces options to skip the process for certain data types and reorganizes the generation sequence. Additionally, it updates various resource and data source templates and modifies import paths to adhere to the new generation logic. Tests are also updated to check these modifications. It streamlines the system by controlling which Terraform resources/data source entities to generate.
    pimielowski committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    9e2e0f9 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2024

  1. Refactor terraform generation parameters into a struct

    The terraform generation parameters 'skip_generate_terraform_resource', 'skip_generate_terraform_datasource', and 'skip_generate_terraform_datasource_listing' have been refactored into a single struct 'SkipGenerateTerraform'. This change affects multiple YAML specifications and related code. This makes the terraform generation configuration more organized within the codebase.
    pimielowski committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    8e7990a View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2024

  1. Refactor Terraform provider config structure

    The Terraform provider configuration has been refactored for better organization. The 'terraform_provider_suffix' and 'skip_generate_terraform' attributes have been combined into a new attribute called 'terraform_provider_config'. This group includes the 'suffix' attribute, as well as boolean attributes for resource, datasource, and datasource listing. The code has been updated accordingly across the package, tests, and specifications.
    pimielowski committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    ca86c24 View commit details
    Browse the repository at this point in the history
  2. Optimize import management and update boolean checks

    This update simplifies the management of imports by directly using AddHashicorpImport/AddSdkImport, eliminating the need for a separate ImportManager object for each section. It also replaces null checks on Resource, Datasource, and DatasourceListing with straightforward boolean checks. Additional cleanup includes updating test cases and fixing minor discrepancies in some data structures' definitions.
    pimielowski committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    913bc88 View commit details
    Browse the repository at this point in the history
  3. Rename Terraform configuration fields

    The Terraform configuration fields "resource", "datasource", and "datasource_listing" were renamed to "skip_resource", "skip_datasource", and "skip_datasource_listing", respectively, in the TerraformProviderConfig struct. These changes were reflected in the generate Terraform functions and tests. Additionally, the field "suffix" was updated in multiple object specification files.
    pimielowski committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    91861fe View commit details
    Browse the repository at this point in the history
  4. Refactor terraform provider configuration structure

    The 'terraform_provider_suffix' field has been replaced with more flexible 'terraform_provider_config' dictionary. This accommodates boolean fields 'skip_resource', 'skip_datasource', and 'skip_datasource_listing' in addition to the 'suffix' field previously provided under 'terraform_provider_suffix'. The changes have been applied across all test and YAML specification files.
    pimielowski committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    4797543 View commit details
    Browse the repository at this point in the history