Giter Site home page Giter Site logo

saas-terraform-connection's Introduction

CloudSploit Terraform Modules

This Terraform module is responsible for provisioning CloudSploit IAM resources(IAM trust/roles).

This module is considered a Global module and only needs to be provisioned 1 time per AWS Account.

Incorporating this Module

  • Add this code to your provider file
  • The account_id must be set & passed from the root module.
  • The cloudsploit_external_id must be obtained from CloudSploit and different AWS accounts have different external IDs.
  • The use_aws_gov can be set to a boolean value, it defaults to false
module "cloudsploit" {
  source                  = "[email protected]:cloudsploit/cloudsploit-terraform-scans.git"
  account_id              = "${var.account_id}"
  cloudsploit_external_id = "${var.cloudsploit_external_id}"
}

Outputs

  • cloudsploit_cross_account_role_arn - Cloudsploit cross account trust role. This is only output if use_aws_gov is set to false.
  • cloudsploit_cross_account_role_arn-gov - Cloudsploit cross account trust role for AWS gov. This is only output if use_aws_gov is set to true.

saas-terraform-connection's People

Contributors

majormoses avatar matthewdfuller avatar timothyhutz avatar tomgun11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

saas-terraform-connection's Issues

duplicate values

Error: aws_iam_role.cloudsploit_cross_account_role: resource repeated multiple times



Error: aws_iam_role_policy_attachment.cloudsploit_cross_account_attach: resource repeated multiple times

Help Guide people to the correct branch, version, etc

I have noticed (and even raised one myself) several PRs which are opened targeting solving problems in a post terraform 0.12 world where we can have almost nice things. Even as a user of this module I had forgot that I should use https://github.com/cloudsploit/cloudsploit-terraform-scans/tree/terraform-v0.12 rather than master when I popped back later. I also referred someone here and they said their setup is not working without grabbing one of the existing forks or making one yourself. I think if we are to have some non standard development strategy where master does not represent latest then I think its important that we call this out in the repository README.md.

Looking at this (at the time of writing this): https://github.com/cloudsploit/cloudsploit-terraform-scans/compare/terraform-v0.12

The following PRs can be closed:

  • #11 (can be closed)
  • #9 (can be closed but has IMO a slightly better solution than the one merged)
  • #8 (can be closed)

I am happy to submit a PR to both branches if I know what the plans are here.

Fails to retrieve module from GitHub

I'm trying to set up a new connection between CloudSploit and my AWS account using Terraform. I was directed to use this module from the Connect a New Account wizard. I have configured var.account_id and var.cloudsploit_external_id but left the source URL as-is from the example here.

module "cloudsploit" {
  source                  = "[email protected]:cloudsploit/cloudsploit-terraform-scans.git"
  account_id              = "${var.account_id}"
  cloudsploit_external_id = "${var.cloudsploit_external_id}"
}

When I attempt to run terraform get I am first prompted with an SSH server key verification prompt, and after passing that prompt I receive an error about failing to clone the repository.

NICWALLER-MBP-1:stack nic.waller$ terraform get
- module.cloudsploit
  Getting source "[email protected]:cloudsploit/cloudsploit-terraform-scans.git"
The authenticity of host 'github.com (192.30.255.113)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Error loading modules: error downloading 'ssh://[email protected]/cloudsploit/cloudsploit-terraform-scans.git': /usr/bin/git exited with 128: Cloning into '.terraform/modules/fe20c829940862d512e6142d2edffa62'...
Warning: Permanently added 'github.com,192.30.255.113' (RSA) to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

NICWALLER-MBP-1:stack nic.waller$ 

I am able to clone the repository without problem when I use git clone in my shell.

Workaround

I'm also able to use terraform get without error when I change the syntax for the source module to the following:

  source                  = "github.com/cloudsploit/cloudsploit-terraform-scans"

Additional Details

  • Terraform v0.11.14
  • macOS 10.15.2
  • git version 2.16.2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.