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

Pushing a custom branch fails #96

Closed
Falinor opened this issue Dec 24, 2024 · 3 comments · Fixed by #101 or #102
Closed

Pushing a custom branch fails #96

Falinor opened this issue Dec 24, 2024 · 3 comments · Fixed by #101 or #102
Assignees

Comments

@Falinor
Copy link

Falinor commented Dec 24, 2024

Hi there,

Pushing a custom branch, for instance main, fails.
CleverCloud enforces the use of a master branch on its git repositories, which is a limitation.
Like pushing manually using git push clever main:master, it should be possible to deploy a custom branch using Terraform.

Terraform Version

$ terraform -v
Terraform v1.10.3
on darwin_arm64
provider registry.terraform.io/clevercloud/clevercloud v0.5.0

Affected Resource(s)

  • clevercloud_nodejs (and anything git-related)

Terraform Configuration Files

resource "clevercloud_nodejs" "api" {
  name               = "terraform-test"
  region             = var.region
  build_flavor       = "M"
  min_instance_count = 1
  max_instance_count = 1
  smallest_flavor    = "XS"
  biggest_flavor     = "XS"

  package_manager = "npm"

  deployment {
    repository = "https://github.com/Falinor/clevercloud-terraform-provider-issue"
    commit     = "main"
  }
}

A reproduction repository is available there.

Debug Output

https://gist.github.com/Falinor/944a327da412faaeabe86310830e1762

Expected Behavior

CleverCloud should retrieve a custom branch (for instance main) on its master branch.

Actual Behavior

CleverCloud declined the branch main to be pushed to the repository.

Steps to Reproduce

  1. terraform init
  2. terraform apply

Important Factoids

None

References

My reproduction repository there to help.

@miton18
Copy link
Collaborator

miton18 commented Dec 26, 2024

First, thanks for this perfect bug report, I will work on it soon

@miton18
Copy link
Collaborator

miton18 commented Dec 27, 2024

@Falinor can you test v0.5.1 with refs/heads/main as value for commit ?

@Falinor
Copy link
Author

Falinor commented Dec 30, 2024

I can confirm that pushing main or another branch is now working 😄
Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants