sample
turbot/flowpipe-samples/snapshot-isolate-gcp-compute-instance
Get Involved
Version
License
Snapshot and Isolate GCP Compute Instance
For a given GCP Compute instance, create a snapshot for all of its disks, detach the disks, and then create ingress and egress firewall rules blocking all traffic.
Requirements
Docker daemon must be installed and running. Please see Install Docker Engine for more information.
Installation
Download and install Flowpipe (https://flowpipe.io/downloads). Or use Brew:
brew tap turbot/tapbrew install flowpipeClone:
git clone https://github.com/turbot/flowpipe-samples.gitcd public_cloud/snapshot_isolate_gcp_compute_instanceflowpipe mod installConnections
By default, the following environment variables will be used for authentication:
JIRA_API_TOKENJIRA_URLJIRA_USERGOOGLE_APPLICATION_CREDENTIALS
You can also create connection resources in configuration files:
vi ~/.flowpipe/config/jira.fpcconnection "jira" "jira_conn" { base_url = "https://test.atlassian.net/" api_token = "ATATT3........." username = "abc@email.com"}vi ~/.flowpipe/config/gcp.fpcconnection "gcp" "gcp_conn" { connections = "path/to/connections.json"}For more information on connections in Flowpipe, please see Managing Connections.
Usage
- Run the pipeline and specify
gcp_project_id,gcp_instance_name,jira_project_key,jira_issue_typepipeline arguments:
flowpipe pipeline run snapshot_isolate_gcp_compute_instance --arg 'gcp_instance_name=flowpipe-test' --arg 'gcp_project_id=parker-aaa' --arg 'jira_project_key=SBT' --arg 'jira_issue_type=Task'Note: If no environment variables or configuration files are found, the mod will attempt to use Application Default Connections if configured.