diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a5d1c40..c9c0b4e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -246,15 +246,15 @@ jobs: #aws iam list-instance-profiles-for-role --role-name service-hydrocron-api-sit-service-role # aws iam delete-policy-version --policy-arn arn:aws:iam::206226843404:policy/service-hydrocron-api-sit-service-policy --version-id v1 - aws iam remove-role-from-instance-profile --instance-profile-name service-hydrocron-api-sit-instance-profile --role-name service-hydrocron-api-sit-service-role + # aws iam remove-role-from-instance-profile --instance-profile-name service-hydrocron-api-sit-instance-profile --role-name service-hydrocron-api-sit-service-role #aws iam delete-instance-profile --instance-profile-name service-hydrocron-api-sit-instance-profile #aws iam detach-role-policy --role-name service-hydrocron-api-sit-service-role --policy-arn arn:aws:iam::206226843404:policy/service-hydrocron-api-sit-service-policy - aws iam delete-policy --policy-arn arn:aws:iam::206226843404:policy/service-hydrocron-api-sit-service-policy - aws iam delete-role --role-name service-hydrocron-api-sit-service-role + #aws iam delete-policy --policy-arn arn:aws:iam::206226843404:policy/service-hydrocron-api-sit-service-policy + #aws iam delete-role --role-name service-hydrocron-api-sit-service-role - aws lambda delete-function --function-name arn:aws:lambda:us-west-2:206226843404:function:service-hydrocron-api-sit-function + #aws lambda delete-function --function-name arn:aws:lambda:us-west-2:206226843404:function:service-hydrocron-api-sit-function - #terraform init -reconfigure -backend-config="bucket=podaac-services-${{ env.THE_ENV }}-terraform" -backend-config="region=us-west-2" - #terraform plan -var-file=tfvars/${{ env.THE_ENV }}.tfvars -var="app_version=${{ env.THE_VERSION }}" -out="tfplan" - #terraform apply -auto-approve tfplan + terraform init -reconfigure -backend-config="bucket=podaac-services-${{ env.THE_ENV }}-terraform" -backend-config="region=us-west-2" + terraform plan -var-file=tfvars/${{ env.THE_ENV }}.tfvars -var="app_version=${{ env.THE_VERSION }}" -out="tfplan" + terraform apply -auto-approve tfplan diff --git a/terraform/hydrocron-lambda-iam.tf b/terraform/hydrocron-lambda-iam.tf index eea4e81..03fd21b 100644 --- a/terraform/hydrocron-lambda-iam.tf +++ b/terraform/hydrocron-lambda-iam.tf @@ -1,7 +1,7 @@ # IAM roles resource "aws_iam_instance_profile" "hydrocron-service-profile" { - name = "${local.ec2_resources_name}-instance-profile" + name = aws_iam_role.hydrocron-service-role.name role = aws_iam_role.hydrocron-service-role.name }