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

HCL code block provider vcf { } is common between day0 and day1 operations #251

Closed
4 tasks done
pradeep17j opened this issue Oct 30, 2024 · 1 comment
Closed
4 tasks done
Assignees
Labels
provider Provider user-error User Error
Milestone

Comments

@pradeep17j
Copy link

Code of Conduct

  • I have read and agree to the Code of Conduct.
  • Vote on this issue by adding a 👍 reaction to the original issue initial description to help the maintainers prioritize.
  • Do not leave "+1" or other comments that do not add relevant information or questions.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Terraform

v1.7.2

Terraform Provider

0.11.0

VMware Cloud Foundation

5.2.1

Description

When doing bringup , the code block

provider "vcf" {
    cloud builder details
}

When doing day1 operations like wld create

provider "vcf" {
   sddc manager details
}

If we want to build one tf file which does all workflows like bringup , host commission , WLD create etc
we cannot do so because after bringup complete , we need to change the content of provider "vcf" with sddc_m details.
Is there a work around for this ?

Affected Resources or Data Sources

r/vcf_instance
r/vcf_workload_domain

Terraform Configuration

Full stack VCF build

Debug Output

This is a design issue . So no debug output

Panic Output

No response

Expected Behavior

Create full stack VCF

Actual Behavior

Not possible now because mid way we need to change the contents of block provider "vcf" {}

Steps to Reproduce

It is a design issue

Environment Details

No response

Screenshots

No response

References

No response

@pradeep17j pradeep17j added bug Bug needs-triage Needs Triage labels Oct 30, 2024
@github-actions github-actions bot added the pending-review Pending Review label Oct 30, 2024
@tenthirtyam
Copy link
Collaborator

tenthirtyam commented Oct 30, 2024

This can be done with provider aliases.

provider "vcf" {
  alias = "cloud_builder"
  # Cloud builder details configuration
}

provider "vcf" {
  alias = "sddc_manager"
  # SDDC manager details configuration
}

resource "vcf_some_resource" "foo" {
  provider = vcf.cloud_builder
  # Resource configuration for Cloud Builder.
}

resource "vcf_some_resource" "bar" {
  provider = vcf.sddc_manager
  # Resource configuration for SDDC Manager.
}

@tenthirtyam tenthirtyam added user-error User Error provider Provider and removed bug Bug needs-triage Needs Triage pending-review Pending Review labels Oct 30, 2024
@tenthirtyam tenthirtyam self-assigned this Oct 30, 2024
@tenthirtyam tenthirtyam added this to the Backlog milestone Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
provider Provider user-error User Error
Projects
None yet
Development

No branches or pull requests

2 participants