Skip to content

Commit

Permalink
calling terraform provider doit instead of doit-console
Browse files Browse the repository at this point in the history
  • Loading branch information
dianibar committed Nov 30, 2023
1 parent 811bb1f commit 05948d1
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 110 deletions.
12 changes: 6 additions & 6 deletions docs/index.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: "doit-console Provider"
page_title: "doit Provider"
subcategory: ""
description: |-
---

# doit-console Provider
# doit Provider



Expand All @@ -15,14 +15,14 @@ description: |-
```terraform
terraform {
required_providers {
doit-console = {
source = "doitintl/doit-console"
version = "0.3.1"
doit = {
source = "doitintl/doit"
version = "0.2.1"
}
}
}
provider "doit-console" {
provider "doit" {
# Configuration options prefer to use environment variables
# DOIT_API_TOKEN, DOIT_HOST=https://api.doit.com and DOIT_CUSTOMER_CONTEXT
}
Expand Down
14 changes: 2 additions & 12 deletions docs/resources/attribution.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "doit-console_attribution Resource - terraform-provider-doit-console"
page_title: "doit_attribution Resource - terraform-provider-doit"
subcategory: ""
description: |-
---

# doit-console_attribution (Resource)
# doit_attribution (Resource)



## Example Usage

```terraform
# Manage Attribution group
resource "doit-console_attribution" "attri" {
name = "attritestnewname9"
description = "attritestdiana8"
formula = "A"
components = [{ type = "label", key = "iris_location", values = ["us"] }]
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
13 changes: 2 additions & 11 deletions docs/resources/attribution_group.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "doit-console_attribution_group Resource - terraform-provider-doit-console"
page_title: "doit_attribution_group Resource - terraform-provider-doit"
subcategory: ""
description: |-
---

# doit-console_attribution_group (Resource)
# doit_attribution_group (Resource)



## Example Usage

```terraform
# Manage Attribution group
resource "doit-console_attribution_group" "attributeGroup" {
name = "attritestnewgroup"
description = "attritestgroup"
attributions = [doit_attribution.attribute1.id, doit_attribution.attribute2.id]
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
73 changes: 6 additions & 67 deletions docs/resources/report.md
Original file line number Diff line number Diff line change
@@ -1,77 +1,16 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "doit-console_report Resource - terraform-provider-doit-console"
page_title: "doit_report Resource - terraform-provider-doit"
subcategory: ""
description: |-
---

# doit-console_report (Resource)



## Example Usage

```terraform
resource "doit-console_report" "my-report" {
name = "test10"
description = "test10"
config = {
metric = {
type = "basic"
value = "cost"
}
include_promotional_credits = false
advanced_analysis = {
trending_up = false
trending_down = false
not_trending = false
forecast = false
}
aggregation = "total"
time_interval = "month"
dimensions = [
{
id = "year"
type = "datetime"
},
{
id = "month"
type = "datetime"
}
]
time_range = {
mode = "last"
amount = 12
include_current = true
unit = "month"
}
filters = [
{
inverse = false
id = "attribution"
type = "attribution"
values = [
"1CE699ZdwN5CRBw0tInY"
]
}
]
group = [
{
id = "BSQZmvX6hvuKGPDHX7R3"
type = "attribution_group"
},
{
id = "cloud_provider"
type = "fixed"
}
]
layout = "table"
display_values = "actuals_only"
currency = "USD"
}
}
```
# doit_report (Resource)





<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
8 changes: 4 additions & 4 deletions examples/main.tf
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
terraform {
required_providers {
doit-console = {
source = "doitintl/doit-console"
doit = {
source = "doitintl/doit"
version = "0.3.1"
}
}
}

resource "doit-console_report" "my-report" {
resource "doit_report" "my-report" {
name = "test10"
config = {
metric = {
Expand Down Expand Up @@ -65,5 +65,5 @@ resource "doit-console_report" "my-report" {
}
}

provider "doit-console" {
provider "doit" {
}
6 changes: 3 additions & 3 deletions examples/provider/provider.tf
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
terraform {
required_providers {
doit-console = {
source = "doitintl/doit-console"
doit = {
source = "doitintl/doit"
version = "0.2.1"
}
}
}

provider "doit-console" {
provider "doit" {
# Configuration options prefer to use environment variables
# DOIT_API_TOKEN, DOIT_HOST=https://api.doit.com and DOIT_CUSTOMER_CONTEXT
}
2 changes: 1 addition & 1 deletion examples/resources/doit-console_attribution/resource.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Manage Attribution group
resource "doit-console_attribution" "attri" {
resource "doit_attribution" "attri" {
name = "attritestnewname9"
description = "attritestdiana8"
formula = "A"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Manage Attribution group
resource "doit-console_attribution_group" "attributeGroup" {
resource "doit_attribution_group" "attributeGroup" {
name = "attritestnewgroup"
description = "attritestgroup"
attributions = [doit_attribution.attribute1.id, doit_attribution.attribute2.id]
Expand Down
2 changes: 1 addition & 1 deletion examples/resources/doit-console_report/resource.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "doit-console_report" "my-report" {
resource "doit_report" "my-report" {
name = "test10"
description = "test10"
config = {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module terraform-provider-doit-console
module terraform-provider-doit

go 1.19

Expand Down
2 changes: 1 addition & 1 deletion internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type doitProvider struct {
// Metadata returns the provider type name.
func (p *doitProvider) Metadata(ctx context.Context, _ provider.MetadataRequest, resp *provider.MetadataResponse) {
tflog.Debug(ctx, "provider Metadata")
resp.TypeName = "doit-console"
resp.TypeName = "doit"
resp.Version = p.version
}

Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"flag"
"log"

"terraform-provider-doit-console/internal/provider"
"terraform-provider-doit/internal/provider"

"github.com/hashicorp/terraform-plugin-framework/providerserver"
)
Expand Down Expand Up @@ -43,7 +43,7 @@ func main() {
// provider address is used in these tutorials in conjunction with a
// specific Terraform CLI configuration for manual development testing
// of this provider.
Address: "registry.terraform.io/doitintl/doit-console",
Address: "registry.terraform.io/doitintl/doit",
Debug: debug,
}
err := providerserver.Serve(context.Background(), provider.New(version), opts)
Expand Down

0 comments on commit 05948d1

Please sign in to comment.