Skip to content

Commit

Permalink
pkg/terraform/exec/plugins: vendor in random and local tf provider
Browse files Browse the repository at this point in the history
The random provider is needed for azure to generate a storage
account name that is unique across azure.
storage account names also have extra naming restrictions.
is used to keep this in the package and avoid passing an extra
parameter as a variable.

The local provider is necessary to upload the ignition file to
azure storage because the azure provider does not support
binary upload. we need to create a file and pass it to the blob
upload resource instead.

tf blob storage resource : https://www.terraform.io/docs/providers/azurerm/r/storage_blob.html
storage naming limits : https://docs.microsoft.com/en-us/azure/architecture/best-practices/naming-conventions#storage
  • Loading branch information
serbrech committed Apr 24, 2019
1 parent 47b9ca1 commit 6dcdb2e
Show file tree
Hide file tree
Showing 22 changed files with 1,999 additions and 2 deletions.
26 changes: 26 additions & 0 deletions pkg/terraform/exec/plugins/Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions pkg/terraform/exec/plugins/Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ ignored = [
name = "github.com/terraform-providers/terraform-provider-azurerm"
version = "=1.25.0"

[[constraint]]
name = "github.com/terraform-providers/terraform-provider-random"
version = "2.1.1"

[[constraint]]
name = "github.com/terraform-providers/terraform-provider-local"
version = "1.2.1"

[[override]]
name = "github.com/Azure/azure-sdk-for-go"
version = "26.7.0"
Expand Down
4 changes: 2 additions & 2 deletions pkg/terraform/exec/plugins/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
)

func init() {
exec := func() {
azurermProvider := func() {
plugin.Serve(&plugin.ServeOpts{
ProviderFunc: azurerm.Provider,
})
}
KnownPlugins["terraform-provider-azurerm"] = exec
KnownPlugins["terraform-provider-azurerm"] = azurermProvider
}
15 changes: 15 additions & 0 deletions pkg/terraform/exec/plugins/local.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package plugins

import (
"github.com/hashicorp/terraform/plugin"
"github.com/terraform-providers/terraform-provider-local/local"
)

func init() {
localProvider := func() {
plugin.Serve(&plugin.ServeOpts{
ProviderFunc: local.Provider,
})
}
KnownPlugins["terraform-provider-local"] = localProvider
}
15 changes: 15 additions & 0 deletions pkg/terraform/exec/plugins/random.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package plugins

import (
"github.com/hashicorp/terraform/plugin"
"github.com/terraform-providers/terraform-provider-random/random"
)

func init() {
randomProvider := func() {
plugin.Serve(&plugin.ServeOpts{
ProviderFunc: random.Provider,
})
}
KnownPlugins["terraform-provider-random"] = randomProvider
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6dcdb2e

Please sign in to comment.