Skip to content

Conversation

@adambarreiro
Copy link
Contributor

@adambarreiro adambarreiro commented Jan 14, 2025

This PR adds the basic elements to bootstrap the VCFA provider taken from original VCD Provider. A minimal set of core functions have been moved and refactored to make the new provider core to work.

A simple data source vcfa_tm_version has been also migrated, to test that everything works.

Tests

Both make testunit and make testacc work. Launching tests with the IDE also work.

Manual test

Clone the fork:

git clone https://github.com/adambarreiro/terraform-provider-vcfa.git
cd terraform-provider-vcfa
git checkout bootstrap
git tag v0.1.0 # Don't push this tag!
make install

Create a main.tf file with the following:

terraform {
  required_providers {
    vcfa = {
      source  = "vmware/vcfa"
      version = "= 0.1.0"
    }
  }
}

provider "vcfa" {
  user                 = "serviceadministrator"
  password             = "*******"
  token                = ""
  api_token            = ""
  auth_type            = "integrated"
  saml_adfs_rpt_id     = ""
  url                  = "https://vcd/tm/api"
  sysorg               = "System"
  org                  = "myorg"
  allow_unverified_ssl = "true"
  max_retry_timeout    = 600
  logging              = true
  logging_file         = "go-vcloud-director.log"
}

data "vcfa_tm_version" "version" {}

Then you can do terraform init and terraform apply as usual. The operation should succeed.

abarreiro added 2 commits January 14, 2025 11:16
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
@adambarreiro adambarreiro self-assigned this Jan 14, 2025
abarreiro added 13 commits January 14, 2025 11:22
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
#
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
#
Signed-off-by: abarreiro <[email protected]>
#
Signed-off-by: abarreiro <[email protected]>
#
Signed-off-by: abarreiro <[email protected]>
@adambarreiro adambarreiro marked this pull request as ready for review January 14, 2025 14:11
abarreiro added 6 commits January 15, 2025 11:21
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
abarreiro added 3 commits January 16, 2025 11:13
#
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
#
Signed-off-by: abarreiro <[email protected]>
nit
Signed-off-by: abarreiro <[email protected]>
#
Signed-off-by: abarreiro <[email protected]>
abarreiro added 3 commits January 16, 2025 12:09
#
Signed-off-by: abarreiro <[email protected]>
#
Signed-off-by: abarreiro <[email protected]>
#
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Copy link
Contributor

@Didainius Didainius left a comment

Choose a reason for hiding this comment

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

A few more leftovers

abarreiro added 6 commits January 16, 2025 14:14
#
Signed-off-by: abarreiro <[email protected]>
#
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Copy link
Contributor

@Didainius Didainius left a comment

Choose a reason for hiding this comment

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

🎆

Copy link

@lvirbalas lvirbalas left a comment

Choose a reason for hiding this comment

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

Great first PR!

abarreiro added 4 commits January 16, 2025 15:01
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
@adambarreiro adambarreiro merged commit 44f8c58 into vmware:main Jan 16, 2025
@adambarreiro adambarreiro deleted the bootstrap branch January 16, 2025 14:09
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.

3 participants