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

Set tag/branch version of a module #20

Closed
manuelver opened this issue Sep 13, 2023 · 5 comments
Closed

Set tag/branch version of a module #20

manuelver opened this issue Sep 13, 2023 · 5 comments
Assignees

Comments

@manuelver
Copy link

How to set a git repository tag/branch when adding a module

Example of aws rds module

@d-vm d-vm self-assigned this Sep 19, 2023
@d-vm
Copy link
Collaborator

d-vm commented Sep 19, 2023

Currently this functionality is not implemented in the addon.

Issue is opened in the addon repository, asking, if possible, to include in its roadmap the development for this functionality.

#kubevela/terraform-controller#378

@d-vm
Copy link
Collaborator

d-vm commented Sep 26, 2023

Features have been added by the KubeVela team, in process of verification.

#kubevela/terraform-controller#382

@d-vm
Copy link
Collaborator

d-vm commented Sep 28, 2023

The changes introduced in the PR have been tested:
#kubevela/terraform-controller#382

Indeed, a new functionality has been implemented that allows to define the branch, tag and commit of the repository as shown in the following example and in the PR itself.

apiVersion: terraform.core.oam.dev/v1beta1
kind: Configuration
metadata:
  name: aws-rds-testgitref
spec:
  remote: https://github.com/activa-prefapp/oam-terraform-gitRef-test.git
  gitRef:
    branch: gitref-rds

  components:
    - name: activaprefapp-sample-db
      type: aws-rds
      properties:
        identifier: activaprefapp-db-testgitref
        engine: mysql   #required
        family: mysql8.0    #required
        engine_version: '8.0.33'
        major_engine_version: '8.0'   #required
        instance_class: db.m5d.large    #required
        allocated_storage: 5    #required
        db_name: activaprefappdbtestgitref
        username: activa
        port: 3306
        iam_database_authentication_enabled: true
        tags: 
          Owner: user
          Environment: dev

  providerRef:
    name: aws
    namespace: default

  writeConnectionSecretToRef:
    name: s3-rds-gitref
    namespace: default

We found a limitation when defining the module by generating a new ComponentDefinition.

Error from server (BadRequest): error when creating "/modules-definition/terraform-aws-s3.yml": ComponentDefinition in version "v1beta1" cannot be handled as a ComponentDefinition: strict decoding error: unknown field "spec.schematic.terraform.gitRef"

We are waiting for an answer from the KubeVela team

@d-vm
Copy link
Collaborator

d-vm commented Oct 2, 2023

It will be necessary to wait for the release of a new version of KubeVela to see the new features implemented in:

#kubevela/kubevela#6363

@manuelver
Copy link
Author

I think the issue is finished. Thanks

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

No branches or pull requests

2 participants