providers/google: Add account_file_contents to provider
This commit is contained in:
parent
9416d10ccc
commit
a8d0a70c03
|
@ -24,6 +24,7 @@ import (
|
|||
// provider.
|
||||
type Config struct {
|
||||
AccountFile string
|
||||
AccountFileContents string
|
||||
Project string
|
||||
Region string
|
||||
|
||||
|
@ -40,6 +41,9 @@ func (c *Config) loadAndValidate() error {
|
|||
if c.AccountFile == "" {
|
||||
c.AccountFile = os.Getenv("GOOGLE_ACCOUNT_FILE")
|
||||
}
|
||||
if c.AccountFileContents == "" {
|
||||
c.AccountFileContents = os.Getenv("GOOGLE_ACCOUNT_FILE_CONTENTS")
|
||||
}
|
||||
if c.Project == "" {
|
||||
c.Project = os.Getenv("GOOGLE_PROJECT")
|
||||
}
|
||||
|
|
|
@ -15,6 +15,12 @@ func Provider() terraform.ResourceProvider {
|
|||
DefaultFunc: schema.EnvDefaultFunc("GOOGLE_ACCOUNT_FILE", nil),
|
||||
},
|
||||
|
||||
"account_file_contents": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
DefaultFunc: schema.EnvDefaultFunc("GOOGLE_ACCOUNT_FILE_CONTENTS", nil),
|
||||
},
|
||||
|
||||
"project": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
|
|
Loading…
Reference in New Issue