Comments (5)
@vinayakbhat24 to get your existing resources into your terraform statefile, you can use the import
functionality: https://www.terraform.io/docs/import/usage.html
A VPC consists of 4 OpenStack resources:
- openstack_networking_network_v2
- openstack_networking_router_v2
- openstack_networking_router_interface_v2
- openstack_networking_subnet_v2
As stated in the link I've provided, you have to create the resource definition by yourself, then import the existing resources. From that point on, they will be managed via terraform.
As it is right now, only the network and subnet resources are importable. But there are already PRs for router and router_interface that you can watch here:
As soon as they are merged (shouldn't take longer than a week) you can import the full VPC.
Cheers,
Christian
from terraform-otc.
You can see the subnet ID also in the OTC console. From the Home Screen you select "Virtual Private Cloud" and then "Subnets". Ich you have multiple VPCs you can choose one on the left in the dropdown menu. On the right you see your existing subnets, including the ID.
Cheers,
Christian
P.S.
The pull request I've linked are already merged and released. So you can update your plugins (it should work with openstack provider 0.2.2) and you are ready to go.
from terraform-otc.
Hi Christian,
Thanks, Is there any way to see subnet id in otc console.
Best Regards,
from terraform-otc.
Hi Vinayak,
you could use otc.sh from https://github.com/OpenTelekomCloud/otc-tools . There is a docker image you could use: https://hub.docker.com/r/tsiotc/otc-client . Then run:
./otc.sh subnet list
best regards
Oliver
from terraform-otc.
Hi Oliver,
Thanks, I was using docker image only. But there is some authentication issue. That's why just wanted to know is there any other way without using CLI commands. First, let me try to resolve authentication issue then.
Best Regards,
from terraform-otc.
Related Issues (10)
- Got error when creating an instance on OTC HOT 3
- Error while using SSH provisioner HOT 5
- Cannot import existing subnet with ID displayed on console HOT 2
- Terraform tries to change network settings of running compute instances if another is added HOT 1
- How to deploy a docker container to otc? HOT 8
- provider.openstack: Authentication failed HOT 1
- terraform crashes at first plan (not apply) HOT 2
- issues integrating VPC with compute instance or network resource with elastic loadbalancer(classic)
- variables.tf is incomplete HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-otc.