Skip to content
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

Migration to glueckkanja Org #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ generate:
go fmt

build:
go build -o ~/.terraform.d/plugins/github.com/glueckkanja-gab/aztools/0.1.0/linux_amd64/terraform-provider-aztools
go build -o ${GOBIN}/terraform-provider-aztools #-o ~/.terraform.d/plugins/github.com/glueckkanja/aztools/0.7.0/linux_amd64/terraform-provider-aztools

test: generate build
cd ./examples && rm -f .terraform.lock.hcl && terraform init -upgrade && TF_REATTACH_PROVIDERS='{"registry.terraform.io/my-org/my-provider":{"Protocol":"grpc","Pid":3382870,"Test":true,"Addr":{"Network":"unix","String":"/tmp/plugin713096927"}}}' terraform apply -auto-approve
init:
cd ./examples && terraform init -upgrade

test: generate build init
cd ./examples && terraform plan

plan: generate build
cd ./examples && rm -f .terraform.lock.hcl && terraform init -upgrade && terraform plan
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Requirements
Using the provider
----------------------

See [Terraform Registry](https://registry.terraform.io/providers/glueckkanja-gab/aztools/latest).
See [Terraform Registry](https://registry.terraform.io/providers/glueckkanja/aztools/latest).

Building The Provider
---------------------
Expand Down
3 changes: 3 additions & 0 deletions examples/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
terraform.tfstate.*
.terraform.lock.hcl
.terraform/
22 changes: 13 additions & 9 deletions examples/main.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
terraform {
required_providers {
//azurerm = {
// source = "hashicorp/azurerm"
//}
azurerm = {
source = "hashicorp/azurerm"
version = "4.0.1"
}
aztools = {
source = "github.com/glueckkanja-gab/aztools"
source = "glueckkanja/aztools"
# version = "0.7.0"
}
}
}
Expand All @@ -14,17 +16,19 @@ locals {
environment = "dev"
}

//rovider "azurerm" {
// features {}
//
provider "azurerm" {
features {}
subscription_id = "97803141-f358-4068-9a12-1af5afe57364"
}


provider "aztools" {
environment = local.environment
separator = local.separator
convention = "default"
lowercase = true
schema_naming_path = "./naming_schema/schema.naming.json"
# schema_naming_url = "https://raw.githubusercontent.com/glueckkanja-gab/terraform-provider-aztools/main/examples/naming_schema/schema.naming.json"
# schema_naming_url = "https://raw.githubusercontent.com/glueckkanja/terraform-provider-aztools/main/examples/naming_schema/schema.naming.json"
schema_locations_path = "./naming_schema/schema.locations.json"
# schema_locations_url = "https://raw.githubusercontent.com/glueckkanja-gab/terraform-provider-aztools/main/examples/naming_schema/schema.locations.json"
# schema_locations_url = "https://raw.githubusercontent.com/glueckkanja/terraform-provider-aztools/main/examples/naming_schema/schema.locations.json"
}
12 changes: 12 additions & 0 deletions examples/resource_group.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
resource "aztools_resource_name" "rg" {
resource_type = "azurerm_resource_group"
name = "example_rg"
location = "westeurope"
prefixes = ["rg"]
suffixes = ["test", "001"]
}

resource "azurerm_resource_group" "rg" {
location = "westeurope"
name = aztools_resource_name.rg.result
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/glueckkanja-gab/terraform-provider-aztools
module github.com/glueckkanja/terraform-provider-aztools

go 1.17

Expand Down
2 changes: 1 addition & 1 deletion internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"net/http"
"os"

"github.com/glueckkanja-gab/terraform-provider-aztools/internal/provider/models"
"github.com/glueckkanja/terraform-provider-aztools/internal/provider/models"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/mitchellh/go-homedir"
Expand Down
6 changes: 3 additions & 3 deletions internal/provider/resource_name.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"fmt"
"strings"

"github.com/glueckkanja-gab/terraform-provider-aztools/internal/provider/common"
"github.com/glueckkanja-gab/terraform-provider-aztools/internal/provider/models"
"github.com/glueckkanja-gab/terraform-provider-aztools/internal/provider/validate"
"github.com/glueckkanja/terraform-provider-aztools/internal/provider/common"
"github.com/glueckkanja/terraform-provider-aztools/internal/provider/models"
"github.com/glueckkanja/terraform-provider-aztools/internal/provider/validate"
"github.com/google/uuid"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff"
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"flag"
"log"

"github.com/glueckkanja-gab/terraform-provider-aztools/internal/provider"
"github.com/glueckkanja/terraform-provider-aztools/internal/provider"
"github.com/hashicorp/terraform-plugin-sdk/v2/plugin"
)

Expand All @@ -25,7 +25,7 @@ func main() {
flag.Parse()

if debugMode {
err := plugin.Debug(context.Background(), "github.com/glueckkanja-gab/terraform-provider-aztools/internal/provider",
err := plugin.Debug(context.Background(), "github.com/glueckkanja/terraform-provider-aztools/internal/provider",
&plugin.ServeOpts{
ProviderFunc: provider.AzTools(version),
})
Expand Down
4 changes: 2 additions & 2 deletions website/docs/index.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ provider "aztools" {
convention = "default"
lowercase = true
hash_length = 2
schema_naming_url = "https://raw.githubusercontent.com/glueckkanja-gab/terraform-provider-aztools/main/examples/naming_schema/schema.naming.json"
schema_locations_url = "https://raw.githubusercontent.com/glueckkanja-gab/terraform-provider-aztools/main/examples/naming_schema/schema.locations.json"
schema_naming_url = "https://raw.githubusercontent.com/glueckkanja/terraform-provider-aztools/main/examples/naming_schema/schema.naming.json"
schema_locations_url = "https://raw.githubusercontent.com/glueckkanja/terraform-provider-aztools/main/examples/naming_schema/schema.locations.json"
}
```

Expand Down