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

Added correct docker and terraform configuration command #53

Merged
merged 3 commits into from
Aug 4, 2023

Conversation

kiranchavala
Copy link
Collaborator

No description provided.

Below is an example configuration to initialize provider and create a Virtual Machine instance

```sh
$ cat provider.tf
terraform {
required_providers {
cloudstack = {
source = "cloudstack/cloudstack"
source = "localdomain/provider/cloudstack"
Copy link
Contributor

@harikrishna-patnala harikrishna-patnala Feb 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous one worked when I was testing locally @kiranchavala , may you want to add what localdomain/provider means ?

Copy link
Collaborator Author

@kiranchavala kiranchavala Feb 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@harikrishna-patnala

after building the terraform provider locally using "make build", the generated go binary will contain the new code changes

To test the changes we have to use
source = "localdomain/provider/cloudstack

If we use " source "cloudstack/cloudstack" ,

when "terraform init" is called terraform will download the binary from terraform registry https://registry.terraform.io/providers/cloudstack/cloudstack/latest

and place it /.terraform.d/plugins/registry.terraform.io/cloudstack/cloudstack/0.4.0/linux_amd64/terraform-provider-cloudstack_v0.4.0/

If replace the binary with the binary we had built in the same path and do a "terraform apply" , you will encounter a checksum error as terraform.lock.hcl will be different

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @kiranchavala I used to delete the lock file to test my changes, so that way it worked.

Copy link
Contributor

@harikrishna-patnala harikrishna-patnala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kiranchavala
Copy link
Collaborator Author

@rohityadavcloud @davidjumani @shwstppr

Could you please review this

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
rohityadavcloud and others added 2 commits August 4, 2023 21:41
Co-authored-by: David Jumani <[email protected]>
Co-authored-by: David Jumani <[email protected]>
@rohityadavcloud rohityadavcloud merged commit ea87939 into apache:main Aug 4, 2023
1 check passed
@rohityadavcloud
Copy link
Member

If there are any new changes @kiranchavala pl submit as separate PR cc @harikrishna-patnala

@harikrishna-patnala harikrishna-patnala added this to the v0.5.0 milestone Aug 7, 2023
poddm pushed a commit to poddm/cloudstack-terraform-provider that referenced this pull request Oct 31, 2023
* Added correct docker and terraform configuration commands

* Update README.md

Co-authored-by: David Jumani <[email protected]>

* Update README.md

Co-authored-by: David Jumani <[email protected]>

---------

Co-authored-by: Rohit Yadav <[email protected]>
Co-authored-by: David Jumani <[email protected]>
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

Successfully merging this pull request may close these issues.

4 participants