If you want to share your terraform code other team members also you need to track the history of all infrastructure changes.Please go-head with bitbucket or github
> git init
>git add main.tf
>git commit - m 'Inital commit"
you should also create a file called .gitignore that tells git to ignore certain types of files.
Add below value
.terraform --> Ignore the folder
*.tfstate --> terraform uses to store state
*.tfstate.backup
First, you should commit the .gitinore file too
> git add .gitigore
>git commit -m "add add file"
Note: you will create the shared git repository also provide the permission of user.
Add endpoint orgin
>git remote add origin git@github.com:<your username>/<your repo name>.git
Push code to repo
>git push origin master
Note: your team-members have made, the you can pull command.
> git pull orgin master.
> git init
>git add main.tf
>git commit - m 'Inital commit"
you should also create a file called .gitignore that tells git to ignore certain types of files.
Add below value
.terraform --> Ignore the folder
*.tfstate --> terraform uses to store state
*.tfstate.backup
First, you should commit the .gitinore file too
> git add .gitigore
>git commit -m "add add file"
Note: you will create the shared git repository also provide the permission of user.
Add endpoint orgin
>git remote add origin git@github.com:<your username>/<your repo name>.git
Push code to repo
>git push origin master
Note: your team-members have made, the you can pull command.
> git pull orgin master.
No comments:
Post a Comment