Skip to content

Commit

Permalink
updated module and fixed already exists issue (#27)
Browse files Browse the repository at this point in the history
* feat: updated module and fixed already exists issue

* feat: updated module and fixed already exists issue

* feat: remove unuse variables

---------

Co-authored-by: anmolnagpal <[email protected]>
  • Loading branch information
theprashantyadav and anmolnagpal authored Oct 17, 2023
1 parent dff50c9 commit dd65bd0
Show file tree
Hide file tree
Showing 16 changed files with 294 additions and 54 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# These owners will be the default owners for everything in the repo.
* @anmolnagpal @clouddrove/approvers @clouddrove-ci
12 changes: 12 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## what
* Describe high-level what changed as a result of these commits (i.e. in plain-english, what do these changes mean?)
* Use bullet points to be concise and to the point.

## why
* Provide the justifications for the changes (e.g. business case).
* Describe why these changes were made (e.g. why do these commits fix the problem?)
* Use bullet points to be concise and to the point.

## references
* Link to any supporting jira issues or helpful documentation to add some context (e.g. stackoverflow).
* Use `closes #123`, if this PR closes a Jira issue `#123`
4 changes: 2 additions & 2 deletions .github/workflows/auto_assignee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
workflow_dispatch:
jobs:
assignee:
uses: clouddrove/github-shared-workflows/.github/workflows/auto_assignee.yml@master
uses: clouddrove/github-shared-workflows/.github/workflows/auto_assignee.yml@1.0.6
secrets:
GITHUB: ${{ secrets.GITHUB }}
with:
assignees: 'clouddrove-ci'
assignees: 'clouddrove-ci'
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:
jobs:
changelog:
uses: clouddrove/github-shared-workflows/.github/workflows/changelog.yml@master
uses: clouddrove/github-shared-workflows/.github/workflows/changelog.yml@1.0.6
secrets: inherit
with:
branch: 'master'
9 changes: 4 additions & 5 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- master

jobs:
readme:
readme-create:
name: 'readme-create'
runs-on: ubuntu-latest
steps:
Expand All @@ -18,24 +18,23 @@ jobs:
python-version: '3.x'

- name: 'create readme'
uses: 'clouddrove/github-actions@v9.0.2'
uses: 'clouddrove/github-actions@9.0.3'
with:
actions_subcommand: 'readme'
github_token: '${{ secrets.GITHUB }}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


- name: 'pre-commit check errors'
uses: pre-commit/[email protected]
continue-on-error: true

- name: 'pre-commit fix errors'
- name: 'pre-commit fix erros'
uses: pre-commit/[email protected]
continue-on-error: true

- name: 'push readme'
uses: 'clouddrove/github-actions@v9.0.2'
uses: 'clouddrove/github-actions@9.0.3'
continue-on-error: true
with:
actions_subcommand: 'push'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tf-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:
workflow_dispatch:
jobs:
complete:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master
_example:
uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@1.0.6
with:
working_directory: './_example/'
working_directory: './_example/'
4 changes: 2 additions & 2 deletions .github/workflows/tflint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:
workflow_dispatch:
jobs:
tflint:
uses: clouddrove/test-tfsec/.github/workflows/tflint.yaml@master
tf-lint:
uses: clouddrove/github-shared-workflows/.github/workflows/[email protected]
secrets:
GITHUB: ${{ secrets.GITHUB }}
4 changes: 2 additions & 2 deletions .github/workflows/tfsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
jobs:
tfsec:
uses: clouddrove/github-shared-workflows/.github/workflows/tfsec.yml@master
uses: clouddrove/github-shared-workflows/.github/workflows/tfsec.yml@1.0.6
secrets: inherit
with:
working_directory: '.'
working_directory: '.'
211 changes: 206 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,210 @@
# ignored files
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*
### Eclipse template

.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# PyDev specific (Python IDE for Eclipse)
*.pydevproject

# CDT-specific (C/C++ Development Tooling)
.cproject

# Java annotation processor (APT)
.factorypath

# PDT-specific (PHP Development Tools)
.buildpath

# sbteclipse plugin
.target

# Tern plugin
.tern-project

# TeXlipse plugin
.texlipse

# STS (Spring Tool Suite)
.springBeans

# Code Recommenders
.recommenders/

# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
.worksheet
### Windows template
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk
### Ansible template
*.retry
### macOS template
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Archives template
# It's better to unpack these files and commit the raw source because
# git has its own built in compression methods.
*.7z
*.jar
*.rar
*.zip
*.gz
*.tgz
*.bzip
*.bz2
*.xz
*.lzma
*.cab

# Packing-only formats
*.iso
*.tar

# Package management formats
*.dmg
*.xpi
*.gem
*.egg
*.deb
*.rpm
*.msi
*.msm
*.msp
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

/.idea/
# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries

# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml

# Gradle:
.idea/**/gradle.xml
.idea/**/libraries

# CMake
cmake-build-debug/

# Mongo Explorer plugin:
.idea/**/mongoSettings.xml

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/
# User-specific stuff:
.idea/*
# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# TFstste
*.tfstate*

deployment/_logs/ansible-log.json
deployment/_logs/ansible-log.log
deployment/_logs/facts/*
deployment/_logs/retry/*
_app/*
ansible-log.json
.terraform
terraform.tfstate

*.tfstate
*.tfstate.backup
.terraform
.idea
*.iml
/_test/go.sum
/_test/go.mod
/_example/.terraform.lock.hcl
*.terraform.lock.hcl
*.lock.hcl
28 changes: 17 additions & 11 deletions _example/example.tf
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
provider "aws" {
region = "eu-west-1"
region = "us-east-1"
}
locals {
name = "ses"
environment = "sandbox"
}

# An SES can either be created as a Domain identity type or Email address identity type
# To enable Email address identity type, pass the email addresses in emails attribute. eg emails = ["[email protected]","[email protected]"]
# To enable Domain identity type, let emails be empty and set domain . eg domain = "test.example.com"

module "ses" {
source = "./../"

name = "ses"
environment = "example"
label_order = ["name", "environment"]

domain = "clouddrove.com"
name = local.name
environment = local.environment
domain = "test.clouddrove.ca"
enable_email = true
emails = ["[email protected]"]
iam_name = "ses-user1"
emails = []
zone_id = "XXXXXXXX69XB8J3IEP"

enable_verification = false
enable_mx = false
enable_spf_domain = false
enable_verification = true
enable_mx = true
enable_spf_domain = true
}
16 changes: 8 additions & 8 deletions _example/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
output "domain_identity_arn" {
value = module.ses.domain_identity_arn
description = "ARN of the SES domain identity"
}
#output "domain_identity_arn" {
# value = module.ses.domain_identity_arn
# description = "ARN of the SES domain identity"
#}

output "id" {
value = module.ses.*.id
description = "The domain name of the domain identity."
}
#output "id" {
# value = module.ses[*].id
# description = "The domain name of the domain identity."
#}
4 changes: 2 additions & 2 deletions _example/versions.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Terraform version
terraform {
required_version = ">= 1.3.6"
required_version = ">= 1.6.1"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.48.0"
version = ">= 5.21.0"
}
}
}
Loading

0 comments on commit dd65bd0

Please sign in to comment.