Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
Khyme committed Dec 5, 2023
1 parent 91625ba commit 696ffd8
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 9 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ it will still be charged for the full hour of usage.
go install .
```

#### Generating the provider documentation

```shell
go generate
```


### Local provider development override
To use the locally built provider, create a `~/.terraformrc` file with the following content

Expand All @@ -119,4 +126,4 @@ In order to run the full suite of Acceptance tests, run `make testacc`.

```shell
make testacc
```
```
4 changes: 2 additions & 2 deletions docs/data-sources/vpc.md → docs/data-sources/vpcs.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "timescale_vpc Data Source - terraform-provider-timescale"
page_title: "timescale_vpcs Data Source - terraform-provider-timescale"
subcategory: ""
description: |-
---

# timescale_vpc (Data Source)
# timescale_vpcs (Data Source)



Expand Down
4 changes: 2 additions & 2 deletions docs/resources/vpc.md → docs/resources/vpcs.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "timescale_vpc Resource - terraform-provider-timescale"
page_title: "timescale_vpcs Resource - terraform-provider-timescale"
subcategory: ""
description: |-
---

# timescale_vpc (Resource)
# timescale_vpcs (Resource)



Expand Down
4 changes: 2 additions & 2 deletions examples/data-sources/vpcs/vpcs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ provider "timescale" {
project_id = var.ts_project_id
}

data "timescale_vpc" "vpcs" {
data "timescale_vpcs" "vpcs" {
}

output "vpc_list" {
value = data.timescale_vpc.vpcs
value = data.timescale_vpcs.vpcs
}
2 changes: 1 addition & 1 deletion internal/provider/vpcs_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ type peerVpcModel struct {

// Metadata returns the data source type name.
func (d *vpcsDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
resp.TypeName = req.ProviderTypeName + "_vpc"
resp.TypeName = req.ProviderTypeName + "_vpcs"
}

// Read refreshes the Terraform state with the latest data.
Expand Down
3 changes: 2 additions & 1 deletion internal/provider/vpcs_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type vpcsResourceModel struct {

// Metadata returns the data source type name.
func (d *vpcsResource) Metadata(_ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) {
resp.TypeName = req.ProviderTypeName + "_vpc"
resp.TypeName = req.ProviderTypeName + "_vpcs"
}

// Read refreshes the Terraform state with the latest data.
Expand All @@ -69,6 +69,7 @@ func (d *vpcsResource) Read(ctx context.Context, req resource.ReadRequest, resp
ID: types.Int64Value(vpcId),
Name: types.StringValue(vpc.Name),
ProvisionedID: types.StringValue(vpc.ProvisionedID),
ProjectID: types.StringValue(vpc.ProjectID),
CIDR: types.StringValue(vpc.CIDR),
RegionCode: types.StringValue(vpc.RegionCode),
Status: types.StringValue(vpc.Status),
Expand Down

0 comments on commit 696ffd8

Please sign in to comment.