-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support OpenStack provider #7
Support OpenStack provider #7
Conversation
* networking_secgroup_v2 * networking_secgroup_rule_v2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks you!!! good job, fast time,
Please check my comments, I don't worked with openstack, but look good
Please add "github.com/gophercloud/gophercloud" to gomod files
openstack_terraforming/compute.go
Outdated
"openstack_compute_instance_v2", | ||
"openstack", | ||
map[string]string{ | ||
"name": s.Name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think no needed "name", openstack provider use only ID for extract data
https://github.com/terraform-providers/terraform-provider-openstack/blob/master/openstack/resource_openstack_compute_instance_v2.go#L548
|
||
// Rename "all_metadata" to "metadata" | ||
// because "all_metadata" field cannot be set as resource argument | ||
for k, v := range g.Resources[i].InstanceState.Attributes { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You tested this? InstanceState.Attributes it same data from provider and from Attributes terraformer create tfstate.
I don't know if you need replace in tftstate "all_metadata" => "metadata". I see in tf this metadata, but I think in tfstate this all_metadata
https://github.com/terraform-providers/terraform-provider-openstack/blob/master/openstack/resource_openstack_compute_instance_v2.go#L597
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have reconfirm the exported files of terraform-provider-openstack. I created a tf
file containing "openstack_compute_instance_v2" and "metadata" field. As a result of terraform apply
, both "metadata" and "all_metadata" fields were recorded in terraform.tfstate
.
"resources": {
"openstack_compute_instance_v2.test01": {
"type": "openstack_compute_instance_v2",
"depends_on": [],
"primary": {
"id": "f29e21b5-47b6-40b1-ae78-cd4993bd39aa",
"attributes": {
...
"all_metadata.%": "2",
"all_metadata.foo": "bar",
"all_metadata.terraformer": "test",
...
"metadata.%": "2",
"metadata.foo": "bar",
"metadata.terraformer": "test",
I will fix the code to record both fields to tfstate
.
Replacing field name is still necessary for tf
files, because "openstack_compute_instance_v2" resource does not supports "all_metadata" field.
https://www.terraform.io/docs/providers/openstack/r/compute_instance_v2.html#argument-reference
openstack_terraforming/networking.go
Outdated
"openstack_networking_secgroup_v2", | ||
"openstack", | ||
map[string]string{ | ||
"name": grp.Name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same not needed "name", only ID it's ok here
https://github.com/terraform-providers/terraform-provider-openstack/blob/master/openstack/resource_openstack_networking_secgroup_v2.go#L134
openstack_terraforming/networking.go
Outdated
"openstack_networking_secgroup_rule_v2", | ||
"openstack", | ||
map[string]string{ | ||
"id": r.ID, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yukirii Thank you! |
* added support in azurerm_app_service * backup storage_blob.go * backup storage_blob.go * use azure-storage-blob-go * backup * created storage_blob.go and storage_container.go * updated README.md * fixed linter error * removed licence * merged security_center_contact and fixed storage_container.go (cherry picked from commit bc8306a)
* [WIP] add ionoscloud support * [WIP] add ionoscloud support * fix: fix set dcId for servers and lan * vendor update * docs: added documentations for ionoscloud * feat: add nic and volume * fix: remove unnecessary prints from server.go file (#3) * feat: implement IP Block (#4) * feat: implement backup unit (#2) * feat: Implement K8s cluster (#5) * feat: implement Kubernetes Nodepool (#6) * fix: resolve import inconsistency (#7) * fix: fix IONOS_TOKEN authentication (#9) * feat: add extra checks for resources (#10) * feat: implement target group (#8) * fix: remove unnecessary check and test statement (#13) * feat: implement network load balancer (#14) * feat: implement NAT gateway (#12) * feat: implement group (#11) * feat: implement application load balancer (#15) * feat: fix server corner cases. k8s server should not be written to plan. * Implement firewall resource, fix name typo, change nic logic (#16) * implement NLB forwarding rule (#17) * Implement load balancer (#18) * feat: implement NAT gateway rule (#19) * fix: rename generator string (#20) * feat: rename variable, add condition if server valid, firewall link to other resources * feat: improve doc * feat: use variables for hardcoded strings * feat: link remaining resources * doc: update README.md * fix: add links to supported resources * fix: add links to supported resources * fix: remove 'Printf' calls from utils.go (#23) * refactor: fix linter errors (#24) --------- Co-authored-by: iblindu <iuliaioana.blindu@gmail.com> Co-authored-by: cristi <cristian.mihai.guran@ionos.com> Co-authored-by: cguran-ionos <cristian-mihai.guran@ionos.com>
This PR adds support OpenStack provider. Currently this provider supports the following resources: