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

optionally deploy Azure Bastion Host from the base deployment #406

Merged
merged 5 commits into from
Sep 16, 2021

Conversation

glennmusa
Copy link
Contributor

@glennmusa glennmusa commented Sep 10, 2021

Description

This change introduces the examples/remoteAccess module into the base deployment, allowing a user to deploy Azure Bastion Host and the jumpbox(es) by specifying deployRemoteAccess=true and a value for linuxVmAdminPasswordOrKey at deployment time.

To demo this (it's easiest to use the .devcontainer to generate a password with openssl) try:

my_password=$(openssl rand -base64 14)

az deployment sub create \
  --name "myRemoteAccessDeployment" \
  --location "eastus" \
  --template-file "src/bicep/mlz.bicep" \
  --parameters deployRemoteAccess="true" \
  --parameters linuxVmAdminPasswordOrKey="$my_password"

If a user attempts to set deployRemoteAccess=true but forgets to supply a password like this:

az deployment sub create \
  --name "myInvalidRemoteAccessDeployment" \
  --location "eastus" 
  --template-file "src/bicep/mlz.bicep" \
  --parameters deployRemoteAccess="true"

template validation will helpfully fail:

{
  "error": {
    "code": "InvalidTemplate",
    "message": "Deployment template validation failed: 'The provided value for the template parameter 'linuxVmAdminPasswordOrKey' at line '311' and column '21' is not valid. Length of the value should be greater than or equal to '14'. Please see https://aka.ms/arm-template/#parameters for usage details.'."
  }
}

Issue reference

The issue this PR will close #361

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles or validates correctly
    [ ] BASH scripts have been validated using shellcheck
  • All tests pass (manual and automated)
  • The documentation is updated to cover any new or changed features
  • Markdown files have been linted using the recommended linter. (See .vscode/extensions.json.)
  • Relevant issues are linked to this PR

@glennmusa glennmusa added the draft Issues that are being authored, not ready for adding to a release. label Sep 13, 2021
@glennmusa
Copy link
Contributor Author

Moved to draft so I can move the components into the /modules dir

@glennmusa glennmusa removed the draft Issues that are being authored, not ready for adding to a release. label Sep 14, 2021
@glennmusa
Copy link
Contributor Author

Moved to draft so I can move the components into the /modules dir

Ready for review, removed the draft tag.

@glennmusa glennmusa linked an issue Sep 14, 2021 that may be closed by this pull request
@jjansen23 jjansen23 self-assigned this Sep 16, 2021
@jjansen23 jjansen23 self-requested a review September 16, 2021 17:37
@jjansen23 jjansen23 removed their assignment Sep 16, 2021
@glennmusa glennmusa merged commit e0c6a34 into bicep Sep 16, 2021
@glennmusa glennmusa deleted the glenn/remoteAccessFromMain branch September 16, 2021 17:50
Breanna-Stryker added a commit that referenced this pull request Sep 17, 2021
* prefer local backends for terraform

* add a Bicep Azure Sentinel module (#385)

* Remove Client/Client Secret/Tenant Vars from Terraform Templates

Co-authored-by: Bree Stryker <[email protected]>

* add workflows to lint and build .bicep modules (#400)

* disable verbose lint output (#402)

* optionally deploy built-in Policy Initiatives for NIST 800-53, CMMC Level 3, or DOD IL5 (#397)

* log activities from subscriptions used in a deployment into the Operations log analytics workspace (#412)

* optionally deploy Azure Bastion Host from the base deployment (#406)

Co-authored-by: Vidya Bala <[email protected]>
Co-authored-by: Bree Stryker <[email protected]>
Co-authored-by: Glenn Musa <[email protected]>
Co-authored-by: Shawn Gibbs <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remote access in Bicep core deployment
2 participants