-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(pulumi): add pulumi azure integration
- Loading branch information
1 parent
a70d6c0
commit 8672884
Showing
8 changed files
with
692 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,6 +61,7 @@ az: | |
prod: | ||
name: aks-my-prod | ||
``` | ||
### Ownbrew | ||
To install binary locally, add: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# POSH pulumi (azure) provider | ||
|
||
## Usage | ||
|
||
```go | ||
package plugin | ||
|
||
type Plugin struct { | ||
l log.Logger | ||
az *az.AZ | ||
cache cache.Cache | ||
kubectl *kubectl.Kubectl | ||
commands command.Commands | ||
} | ||
|
||
func New(l log.Logger) (plugin.Plugin, error) { | ||
inst := &Plugin{ | ||
l: l, | ||
cache: cache.MemoryCache{}, | ||
commands: command.Commands{}, | ||
} | ||
|
||
// ... | ||
|
||
inst.op, err := onepassword.New(l, inst.cache)); | ||
if err != nil { | ||
return nil, errors.Wrap(err, "failed to create onepassword") | ||
} | ||
|
||
inst.kubectl, err = kubectl.New(l, inst.cache) | ||
if err != nil { | ||
return nil, errors.Wrap(err, "failed to create kubectl") | ||
} | ||
|
||
inst.az, err = az.New(l, inst.cache) | ||
if err != nil { | ||
return nil, errors.Wrap(err, "failed to create az") | ||
} | ||
|
||
// ... | ||
|
||
inst.commands.MustAdd(pulumi.NewCommand(l, inst.op, inst.az, inst.cache)) | ||
|
||
// ... | ||
|
||
return inst, nil | ||
} | ||
``` | ||
|
||
### Config | ||
|
||
```yaml | ||
## az | ||
pulumi: | ||
path: .posh/pulumi | ||
configPath: .posh/config/pulumi | ||
passphrase: | ||
account: xxxx | ||
vault: xxxx | ||
itemId: xxxx | ||
field: password | ||
backends: | ||
prod: | ||
location: Germany West Central | ||
container: pulumi-state | ||
subscription: xxx | ||
resourceGroup: rg-my-name | ||
storageAccount: sa-my-name | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package pulumi | ||
|
||
type Backend struct { | ||
Location string `json:"location" yaml:"location"` | ||
Container string `json:"container" yaml:"container"` | ||
Subscription string `json:"subscription" yaml:"subscription"` | ||
ResourceGroup string `json:"resourceGroup" yaml:"resourceGroup"` | ||
StorageAccount string `json:"storageAccount" yaml:"storageAccount"` | ||
} |
Oops, something went wrong.