Questions tagged [terraform-provider]
45 questions
8
votes
1 answer
go install github.com/dmacvicar/terraform-provider-libvirt@latest - shows error
I am trying to Provision VMs on KVM with Terraform.
one of the steps in installations is to download and install the provider buy the command:
go install github.com/dmacvicar/terraform-provider-libvirt@latest
but it errors:
The go.mod file for the…

Orly Orly
- 367
- 5
- 16
3
votes
2 answers
Terraform Custom Provider - Data Source Schema
I am working on creating a custom terraform provider by using terraform sdk. I am trying to read data from the existing API GET call. I am finding it difficult to map the JSON response from an API to terraform schema. This is my data source…

Raman Balyan
- 983
- 2
- 16
- 32
3
votes
1 answer
Issue using third party providers in terraform for azure-devops and mysql provider
While doing terraform init getting error, following the terraform official documentation, I am trying to create azure-pipeline via terraform and have created modules for it, but unable to initialize, its working fine if i am passing it directly in…

Devops-Learner
- 451
- 1
- 4
- 16
2
votes
1 answer
Itherate through MapNestedAtribute in Terraform
I have list nested attribute spec defined in main.tf and it looks like this:
di_name = [
{
source_name = "test1"
new_d_name = "test2"
new_di_name = "test3"
di_type = "test4"
},
{
source_name = "test1"
…

starskiin3d
- 37
- 4
2
votes
1 answer
Terraform dynamic/conditional resource creation
I'm using terraform with the libvirt provider and generate 4 guests (index: 0,1,2,3) using this snippet:
[...]
resource "libvirt_domain" "worker" {
count = var.worker["count"]
name = "${var.cluster_id}-worker-${count.index}"
memory …

MaGi
- 171
- 1
- 1
- 10
2
votes
2 answers
Terraform - how to use exported attributes?
I'm learning terraform, in the example below the first section puts a VM and returns the id of that VM. The second section adds an extra disk to vm. I have to enter an id in the virtual_machine_id parameter, but I don't know how…

Agryppa
- 33
- 4
1
vote
0 answers
Accessing provider configuration in custom terraform provider
I am currently working on implementing my own terraform provider. In my use case I have some static properties that I have to set for all of my resources, like the region the resource is living in.
To avoid working with variables and having to copy…

NanoBug
- 11
- 1
1
vote
1 answer
How to get Terraform providers on GitLab CI runners in an air-gapped environment
I am running a Gitlab CI runner on an Azure Red Hat Linux 7.9 VM which is air-gapped and cannot communicate with the outside world due to our network restrictions. In the .gitlab-ci.yml file of my GitLab pipeline, I run some Terraform commands…

hitman126
- 699
- 1
- 12
- 43
1
vote
1 answer
Terraform Cloud private provider registry authentication signature from unknown issuer
We are trying to leverage the Terraform Cloud private provider registry to consume custom providers within our org away from public view. However, after following all of the gpg upload steps, version creation, platform creation and upload for the…

Devon Harris
- 11
- 1
1
vote
0 answers
Custom Terraform provider out of sync on Terraform Registry
I am facing some issues with the synchronization of my new Terraform provider.
I created a Terraform provider (available at https://github.com/just1not2/terraform-provider-haproxy) and I started publishing it on the Terraform registry (available at…

Justin
- 11
- 1
1
vote
3 answers
How do I conditionally create an S3 bucket
Is there a way I can use a terraform data call for a bucket (perhaps created and stored in a different state file) and then in the event nothing is in data, create the resource by setting a count?
I've been doing some experiments and continually get…

keeer
- 783
- 1
- 5
- 11
1
vote
1 answer
How to allow an ordered list in a custom terraform provider resource?
I have a custom terraform provider with a resource that takes a list as one of its inputs.
Here is the list in question:…

Alex Cohen
- 5,596
- 16
- 54
- 104
1
vote
2 answers
Terraform Problem to define cyrilgdn/postgresql provider properly
I have the exact same problem as here Terraform tries to load old defunct provider and the solution posted there does not work for me.
Problem is that i define in the terraform config:
required_providers {
postgresql = {
source =…

Marius
- 11
- 3
0
votes
1 answer
Terraform Dynamic Provider Options
I'm using the fortios provider to configure my FortiGate firewalls through Terraform, and the hostname and API access token must be hardcoded directly into the provider, similar to below:
terraform {
required_providers {
fortios = {
…

AndyB
- 29
- 7
0
votes
1 answer
I don't know how to make as many origin_servers as I need to have
I am using the Incapsula provider for Terraform. Specifically the resource: incapsula_data_centers_configuration. As you can see in the documentation it indicates that:
You can configure as many origin_servers, as you need. In my case I have a…

Jorge
- 27
- 4