generated from hashicorp/packer-plugin-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Subscription ID and Tenant ID to build variables (#439)
* Add Subscription ID and Tenant ID to build variables * Add docs
- Loading branch information
1 parent
b7642d6
commit e47bee8
Showing
4 changed files
with
52 additions
and
4 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
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,27 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
package arm | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/hashicorp/packer-plugin-sdk/multistep" | ||
"github.com/hashicorp/packer-plugin-sdk/packerbuilderdata" | ||
) | ||
|
||
type StepSetGeneratedData struct { | ||
GeneratedData *packerbuilderdata.GeneratedData | ||
Config *Config | ||
} | ||
|
||
func (s *StepSetGeneratedData) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction { | ||
|
||
s.GeneratedData.Put("TenantID", s.Config.ClientConfig.TenantID) | ||
s.GeneratedData.Put("SubscriptionID", s.Config.ClientConfig.SubscriptionID) | ||
return multistep.ActionContinue | ||
} | ||
|
||
func (s *StepSetGeneratedData) Cleanup(state multistep.StateBag) { | ||
// No cleanup... | ||
} |
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