No project description provided
Project description
Idem_gcp
gcp Cloud Provider for Idem
DEVELOPMENT
Clone the idem_gcp repository and install with pip.
git clone git@gitlab.com:my-user/idem_gcp.git
pip install -e idem_gcp
ACCT
After installation gcp Idem Provider execution and state modules will be accessible to the pop hub. In order to use them we need to set up our credentials.
Create a new file called credentials.yaml and populate it with profiles. The default profile will be used automatically by idem unless you specify one with –acct-profile=profile_name on the cli.
acct backends provide alternate methods for storing profiles.
The gcp provider uses the gcp acct plugin for authentication. A profile needs to specify the authentication parameters for gcp.
credentials.yaml
gcp:
default:
username: my_user
password: my_good_password
endpoint_url: https://console.gcp.com/api
Now encrypt the credentials file and add the encryption key and encrypted file path to the ENVIRONMENT.
The acct command should be available as it is a requisite of idem and idem_gcp. Encrypt the the credential file.
acct encrypt credentials.yaml
output:
-A9ZkiCSOjWYG_lbGmmkVh4jKLFDyOFH4e4S1HNtNwI=
Add these to your environment:
export ACCT_KEY="-A9ZkiCSOjWYG_lbGmmkVh4jKLFDyOFH4e4S1HNtNwI="
export ACCT_FILE=$PWD/credentials.yaml.fernet
USAGE
A profile can be specified for use with a specific state. If no profile is specified, the profile called “default”, if one exists, will be used:
ensure_user_exists:
gcp.user.present:
- acct_profile: my-staging-env
- name: a_user_name
- kwarg1: val1
It can also be specified from the command line when executing states.
idem state --acct-profile my-staging-env my_state.sls
It can also be specified from the command line when calling an exec module directly.
idem exec --acct-profile my-staging-env gcp.user.list
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file idem_gcp-0.1.1.tar.gz
.
File metadata
- Download URL: idem_gcp-0.1.1.tar.gz
- Upload date:
- Size: 51.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.3 requests/2.28.1 requests-toolbelt/0.10.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/5.0.0 keyring/23.9.3 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c4c88160773acbcbf074aedb76f416ea37c91a887e482bdee31c58fc5731ae7 |
|
MD5 | 2a1426413b569387d86b83ba994c8e9e |
|
BLAKE2b-256 | ff00bdd6baf7d789c07043846e71090ca66dc572dda53609817a25613c3e599e |
File details
Details for the file idem_gcp-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: idem_gcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 61.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.3 requests/2.28.1 requests-toolbelt/0.10.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/5.0.0 keyring/23.9.3 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d000a00d39db71c87a1e5f5e035671efb4c0e92e5c02a146fda7279f68f445d6 |
|
MD5 | 910ad9b99f76b14ef22c402056abf724 |
|
BLAKE2b-256 | 483ef5f4fd9bd4497a05c2db3df64741f1bc954cad0fda590514d58a6ccf401c |