Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/fsxn_as_pvc_terraform.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
# Copyright (c) NetApp, Inc.
# SPDX-License-Identifier: Apache-2.0

name: "Code Quality: Terraform Validation for EKS/FSxN-as-PVC-for-EKS/terraform"

permissions:
contents: read

on:
pull_request:
paths:
- 'EKS/FSxN-as-PVC-for-EKS/terraform/**'
push:
paths:
- 'EKS/FSxN-as-PVC-for-EKS/terraform/**'
branches:
- main

jobs:
terraform:
name: Terraform
runs-on: ubuntu-latest
defaults:
run:
working-directory: 'EKS/FSxN-as-PVC-for-EKS/terraform'

steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit

- name: Checkout pull request
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Set up Terraform
uses: hashicorp/setup-terraform@ed3a0531877aca392eb870f440d9ae7aba83a6bd # v1.4.0
with:
terraform_wrapper: false
terraform_version: 1.12.1

Comment thread
kcantrel marked this conversation as resolved.
- name: Initialize Terraform
run: terraform init

- name: Validate Terraform configuration
run: terraform validate
50 changes: 50 additions & 0 deletions .github/workflows/fsxn_rotate_secret_terraform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
# Copyright (c) NetApp, Inc.
# SPDX-License-Identifier: Apache-2.0

name: "Code Quality: Terraform Validation for Management-Utilities/fsxn-rotate-secret/terraform"

permissions:
contents: read

on:
pull_request:
paths:
- 'Management-Utilities/fsxn-rotate-secret/terraform/**'
push:
paths:
- 'Management-Utilities/fsxn-rotate-secret/terraform/**'
branches:
- main

jobs:
terraform:
name: Terraform
runs-on: ubuntu-latest
defaults:
run:
working-directory: 'Management-Utilities/fsxn-rotate-secret/terraform'

steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit

- name: Checkout pull request
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Set up Terraform
uses: hashicorp/setup-terraform@ed3a0531877aca392eb870f440d9ae7aba83a6bd # v1.4.0
with:
terraform_wrapper: false
terraform_version: 1.12.1

Comment thread
kcantrel marked this conversation as resolved.
- name: Initialize Terraform
run: terraform init

- name: Validate Terraform configuration
run: terraform validate
2 changes: 1 addition & 1 deletion .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
uses: hashicorp/setup-terraform@ed3a0531877aca392eb870f440d9ae7aba83a6bd # v1.4.0
with:
terraform_wrapper: false
terraform_version: 1.6.6
terraform_version: 1.12.1

- name: Initialize Terraform
run: terraform init
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ data "aws_region" "current" {}
# associated with it that will set the initial password.
module "fsxn_rotate_secret" {
source = "github.com/Netapp/FSx-ONTAP-samples-scripts/Management-Utilities/fsxn-rotate-secret/terraform"
fsx_region = data.aws_region.current.name
secret_region = var.secrets_region != "" ? var.secrets_region : data.aws_region.current.name
fsx_region = data.aws_region.current.region
secret_region = var.secrets_region != "" ? var.secrets_region : data.aws_region.current.region
Comment thread
kcantrel marked this conversation as resolved.
aws_account_id = var.aws_account_id
secret_name_prefix = var.secret_name_prefix
fsx_id = aws_fsx_ontap_file_system.terraform-fsxn.id
Expand All @@ -72,8 +72,8 @@ resource "aws_fsx_ontap_storage_virtual_machine" "mysvm" {
# associated with it that will set the initial password.
module "svm_rotate_secret" {
source = "github.com/Netapp/FSx-ONTAP-samples-scripts/Management-Utilities/fsxn-rotate-secret/terraform"
fsx_region = data.aws_region.current.name
secret_region = var.secrets_region != "" ? var.secrets_region : data.aws_region.current.name
fsx_region = data.aws_region.current.region
secret_region = var.secrets_region != "" ? var.secrets_region : data.aws_region.current.region
aws_account_id = var.aws_account_id
secret_name_prefix = var.secret_name_prefix
svm_id = aws_fsx_ontap_storage_virtual_machine.mysvm.id
Expand Down
Loading
Loading