-
Notifications
You must be signed in to change notification settings - Fork 135
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
Add resource & data source instance #696
base: master
Are you sure you want to change the base?
Conversation
Type: schema.TypeString, | ||
Description: "Instance id", | ||
Required: true, | ||
ForceNew: true, |
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 guess ForceNew
's are not really needed here
}, | ||
// computed | ||
"addresses": { | ||
Type: schema.TypeList, |
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.
Type: schema.TypeList, | |
Type: schema.TypeSet, |
no ?
Description: " Volumes attached to the instance", | ||
Elem: &schema.Resource{ | ||
Schema: map[string]*schema.Schema{ | ||
"ip": { |
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.
"ip": { | |
"id": { |
}, | ||
}, | ||
"attached_volumes": { | ||
Type: schema.TypeList, |
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.
Type: schema.TypeList, | |
Type: schema.TypeSet, |
serviceName := d.Get("service_name").(string) | ||
region := d.Get("region").(string) | ||
instanceId := d.Get("instance_id").(string) | ||
log.Printf("[DEBUG] SCROUTCH") |
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.
log.Printf("[DEBUG] SCROUTCH") |
d.Set("region", r.Region) | ||
d.Set("task_state", r.TaskState) | ||
d.Set("name", d.Get("name").(string)) | ||
// d.Set("name", r.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.
// d.Set("name", r.Name) |
Steps: []resource.TestStep{ | ||
{ | ||
Config: testCreateLoadBalancerLogSubscription, | ||
Check: resource.ComposeTestCheckFunc( |
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.
please check values of several field
|
||
## Example Usage | ||
|
||
To get information of an instance: |
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.
To get information of an instance: | |
To list your instances: |
|
||
# ovh_cloud_project_instance | ||
**This datasource uses a Beta API** | ||
Use this data source to get the list instance in a region of a public cloud project. |
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.
Use this data source to get the list instance in a region of a public cloud project. | |
Use this data source to get the list of instance in a region of a public cloud project. |
|
||
The following arguments are supported: | ||
|
||
* `service_name` - (Required, Forces new resource) The id of the public cloud project. If omitted, |
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.
* `service_name` - (Required, Forces new resource) The id of the public cloud project. If omitted, | |
* `service_name` - (Required) The id of the public cloud project. If omitted, |
not sure this makes sense in a datasource
Description
Add resource and datasource for instance(s)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Test Configuration:
terraform version
: Terraform vx.y.zChecklist:
go mod vendor
if I added or modifygo.mod
file